README.md in nakal-0.0.3 vs README.md in nakal-0.0.4
- old
+ new
@@ -1,10 +1,11 @@
# Nakal
Automated visual testing of Android/iOS applications
## Installation
+You need to install [imagemagick](http://www.imagemagick.org/script/index.php) on your machine
Add this line to your application's Gemfile:
gem 'nakal'
@@ -20,21 +21,33 @@
If you are using cucumber, include following Lines in your env.rb
require "nakal/cucumber"
Nakal.platform = :android
- Nakal.directory= "<your_project_dir>/baseline_images/droid"
- Nakal.device_name = "samsung_galaxy_s3"
+
+ for ios, set:
+
+ Nakal.platform = :ios
+
and then put this line in your automation code, at all places where a new screen loads:
- diff = nakal_execute("current_screen_name")
+ diff_metric = nakal_execute("current_screen_name")
-Now, execute your test by passing env variable NAKAL_MODE=build to build the baseline images
+Now, execute your test by passing env variable NAKAL_MODE=build to build the baseline images. All baseline images will be stored in baseline_images folder in current directory
once baseline is built, next execution onwards, start using environment variable NAKAL_MODE=compare to compare against baseline.
any difference will be put in the same directory with image file named "current_screen_name_diff.png"
+## Important
+
+* This works best when your tests are running against mocked data
+* If test data keeps changing for each test, use diff_metric (output of nakal_execute method above) to determine if the change is acceptable.
+
+For setting custom directory, use:
+
+ Nakal.directory= "<desired_directory>"
+ Nakal.device_name = "nexus7"
For cropping the notification bar OR scroll bar, create a config/nakal.yml file in execution directory
eg: