{"id":15653070,"url":"https://github.com/saikrishna321/nakal_java","last_synced_at":"2025-04-30T21:10:02.836Z","repository":{"id":69803083,"uuid":"52590688","full_name":"saikrishna321/nakal_java","owner":"saikrishna321","description":"A tool to automate Visual Regression testing for Android , iOS and Web","archived":false,"fork":false,"pushed_at":"2018-03-02T12:05:32.000Z","size":10818,"stargazers_count":30,"open_issues_count":3,"forks_count":28,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-30T21:09:56.141Z","etag":null,"topics":["baseline-image","comparing-images","maskimage"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saikrishna321.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-26T08:40:24.000Z","updated_at":"2022-02-01T11:18:42.000Z","dependencies_parsed_at":"2023-03-09T06:00:20.498Z","dependency_job_id":null,"html_url":"https://github.com/saikrishna321/nakal_java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saikrishna321%2Fnakal_java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saikrishna321%2Fnakal_java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saikrishna321%2Fnakal_java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saikrishna321%2Fnakal_java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saikrishna321","download_url":"https://codeload.github.com/saikrishna321/nakal_java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251782776,"owners_count":21642987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["baseline-image","comparing-images","maskimage"],"created_at":"2024-10-03T12:44:36.509Z","updated_at":"2025-04-30T21:10:02.783Z","avatar_url":"https://github.com/saikrishna321.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\t\u003cbr\u003e\n\t\u003cimg width=\"600\" src=\"https://github.com/saikrishna321/nakal_java/blob/master/Nakal.png\" alt=\"nakal\"\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/h1\u003e\n\n[![Build Status](https://travis-ci.org/saikrishna321/nakal_java.svg?branch=master)](https://travis-ci.org/saikrishna321/nakal_java)\n\nAutomated visual testing of Android/iOS/Web applications.\n\n![ScreenShot](https://raw.githubusercontent.com/saikrishna321/nakal_java/master/difference_HomeScreen1.png)\n\nNakal is used to add visual validations in your existing test framework (using appium or selenium-webDriver etc).\n\n## Installation\nYou need to install [imagemagick](http://www.imagemagick.org/script/index.php) on your machine\n\nAdd this to your pom.xml \n```\n\t\u003crepositories\u003e\n\t\t\u003crepository\u003e\n\t\t    \u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\t\u003c/repository\u003e\n\t\u003c/repositories\u003e\n    \n\t\u003cdependency\u003e\n\t    \u003cgroupId\u003ecom.github.saikrishna321\u003c/groupId\u003e\n\t    \u003cartifactId\u003enakal_java\u003c/artifactId\u003e\n\t    \u003cversion\u003ef4dcb0054e\u003c/version\u003e\n\t\u003c/dependency\u003e\n```\n\n## Usage\n\nFollowing mandatory properties need to be set before running test:  \n  * nakal.platform=ios/android\n  * nakal.maskimage=image which needs to be considered for masking\n  * nakal.mode=build/compare\n\nFor Example:\n\n```\nNakalExecutor nakalExecutor = new NakalExecutor();\n     //Compare mobile native app screen\n     @Test\n     public void compareImagesExecutor(){\n         Assert.assertTrue(nakalExecutor.nakalExecutorNativeCompare(\"HomeScreen\"));\n     }\n     //Compare mobile-web/desktop-browser app screen\n     @Test\n     public void compareImagesExecutor(){\n         Assert.assertTrue(nakalExecutor.nakalExecutorWebCompare(driver, \"GoogleScreen\"));\n      }\n```\n\n\n1. 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\n\n2. Once baseline is built, next execution onwards, start using environment variable NAKAL_MODE=compare to compare against baseline.\nany difference will be put in the same directory with image file named \"difference_current_screen_name.png\"\n\nAll mask images should and be stored at /ios/mask-images/fileName.png /android/mask-images/fileName.png.(mask images with transparent background has been created using gimp tool- eg:https://github.com/saikrishna321/nakal_java/tree/master/android/mask_images)\nMASKIMAGE value in the env should be the same fileName which is stored under the mask_images(For ex: ./mask_images/nexus5.png and MASKIMAGE=\"nexus5\").\n\n#Running the tests\n\nmvn clean -Dtest=AndroidTest test -Dnakal.platform=android -Dnakal.mode=build -Dnakal.maskimage=nexus5 (captures a baseline image)\n\nmvn clean -Dtest=AndroidTest test -Dnakal.platform=android -Dnakal.mode=compare -Dnakal.maskimage=nexus5 ( compares expected and actual image)\n\n## Ignore certain regions of the image\n\n1. Create nakal.yaml under the root directory.\n2. You can specify the areas of a screen you want to mask/ignore while comparing in nakal.yaml as below\n\n```\nnexus5:\n  HomeScreen: {mask_region_1: [69, 441, 357, 553],mask_region_2: [50, 1600, 371, 1652]}\n  SearchScreen: {mask_region_1: [66,424,340,478],mask_region_2: [76,524,440,578]}\n```\n3.If you want to set certain threshold while comparing. You can pass option as:\n\n```\nnakalExecutor.nakalExecutorNativeCompare(\"HomeScreen\",3)\n```\n\n\n\u003ch2\u003eRuby Client\u003c/h2\u003e\n\thttps://github.com/rajdeepv/nakal\n\n\n## Contributing\n\n1. Fork it ( http://github.com/\u003cmy-github-username\u003e/nakal_java/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaikrishna321%2Fnakal_java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaikrishna321%2Fnakal_java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaikrishna321%2Fnakal_java/lists"}