This is my solution for the Applitools Hackathon. The project uses WebdriverIO v5, Applitools Eyes and mocha to provide UI automation tests for 3 tasks presented in the hackathon instructions.
Each task had to be automated in traditional manner (meaning using only WebdriverIO without Applitools) and in modern way (meaning using WebdriverIO with Applitools).
Traditional test code for version 1 of the app is TraditionalTestsV1.spec.ts. Traditional test code for version 2 of the app is TraditionalTestsV2.spec.ts. They happen to be the same. The reason for that is: I worked on tests for version 1 until I was satisfied completely and then I ran the same tests on version 2 of the app. I have to admit writing modern tests using Applitools made it much easier for me to enhance my script for traditional tests.
Modern test code for version 1 of the app is in ModernTestsV1.spec.ts. Modern test code for version 2 of the app is in ModernTestsV2.spec.ts. They are also the same since with Applitools there is a lot less maintenance work to be done.
Each task had to be run against version 1 of the demo app which is "bug free". Also, each task had to be run against version 2 of the demo app which is full of bugs.
Traditional script results ran against version 1 of the app are Traditional-V1-TestResults.txt.
Traditional script results ran against version 2 of the app are Traditional-V2-TestResults.txt.
Modern script results ran against version 1 of the app are here > Eyes Batch Results in my Applitools Dashboard app.
Modern script results ran against version 2 of the app are here > Eyes Batch Results in my Applittols Dashboard app.
All tests run headless, and you can check execution status in the console.
- NodeJS version
v10.16.3
or higher. Once downloaded it will also download node package manager (npm) for you.- to check node version:
node --version
- to check npm version:
npm --version
(used version6.13.7
)
- to check node version:
- installed browsers:
- Chrome - used version
83.0.4103.106(64-bit)
- Firefox - used version
77.0.1(64-bit)
- Edge Chromium - used version
83.0.478.54(64-bit)
- Chrome - used version
Note:
Test scripts developed and tested on Windows 10 Enterprise
.
-
clone this repository
git clone https://github.com/mareru/applitools-hackathon-2020.git
-
on the command line go to the project root folder
applitolls-hackathon-2020
-
to install dependencies run the command
nmp install
-
set environment variable
APPLITOOLS_API_KEY
needed to run modern scripts with Applitools Eyes:Mac: export APPLITOOLS_API_KEY='YOUR_API_KEY' Windows: set APPLITOOLS_API_KEY='YOUR_API_KEY'
You can get the key by creating the account on the Applitools website.
Once you create the account and log in to the Applitools Eyes Test Manager application, there you can find the key value. -
delete Traditional-V1-TestResults.txt and Traditional-V2-TestResults.txt prior to running traditional tests in order to have clean test results.
-
run the traditional tests against version 1 of the app:
npm run test:traditional:v1
run the traditional tests against version 2 of the app:
npm run test:traditional:v2
run the modern tests against version 1 of the app:
npm run test:modern:v1
run the modern tests against version 2 of the app:
npm run test:modern:v2
Marijana Rukavina - Githhub