Applitools Visual Hackathon is a hackathon aimed at creating awarenesss of the differences between functional testing of web applications and using Visual AI tools to conduct testing. Applotools eyes SDK is a platform that uses Artificial intelligence to check for differences in a web application that would have otherwise been difficult to identify with a nacked eye and too cumbersome to validate using functions and assertions in the tests.
To run the tests locally on your machine install package dependencies that are listed in the package.json. The installation will ensure that both cypress and eyes sdk is installed. The installation instructions will also cover installation on Windows, macOS and Linux operating systems.
$ npm ci or npm install
$ npx cypress run
$ npm run test:visual:dev
$ npm run test:functional:dev
$ npx cypress open
PageObjects found under the directory cypress/pageObjects are used to encapsulate the test logic so that in the event of a change its only the objects that change and not the tests themselves. Page Objects ensure that the written tests are not only clear but simple to understand for anyone onboarding on to the repository as a new contributor.
To run applitools visual AI one needs to export their api_key which is unique to their terminal and export it so that the tests can detect it. To obtain an API_KEY one nees to sign up on the Applitool site. The API_KEY is used to identify where the visual tests will be uploaded and subsequently where the test dashboard will be located.
set APPLITOOLS_API_KEY = 'Your_api_key'
export APPLITOOLS_API_KEY = 'Your_api_key'
After exporting the API_Key no other configuration is needed.