QA Engineer Assessment Solution
Introduction
Hello, I'm Ricardo and this is my solution for the challenge. I based this solution on a boilerplate I've been working for some time. The tests case is located here and the user for the test can be edited there.
Folder structure
- /
- .idea - Run configuration for your convenience
- .run - The folder aggregating the latest test run artifacts
- tests - Base tests folder, contains E2E tests
- e2e
- base.conf.js - Base configuration for tests E2E or not
- docker-compose.yml - A Docker compose file to bring up a local Zalenium grid
Bootstrapping
My custom webdriverIO-based project however needs at least Node 12 LTS.
If you're running nvm
, you can simply run:
# nvm install 12
nvm use 12
Install the dependencies
npm install
There are several options to run the tests as highlighted by this table:
Description | Automation Protocol | npm script | Configuration file |
---|---|---|---|
On any local Android device | webdriver/UIAutomator2 | test:e2e /test:e2e:local |
local.conf.js |
Against BrowserStack | webdriver/UIAutomator2 | test:e2e:bs |
bs.conf.js |
To run a specific feature file pass --spec
flag to the command with the path, something like:
npm run test:e2e -- --spec tests/e2e/features/TaskSearch.feature
For specfic Scenarios, in the --spec
file passed, add the line number of the Scenario
npm run test:e2e -- --spec tests/e2e/features/TaskSearch.feature:6
To run the test locally you'll need:
- To have everything in place to run appium. Get
appium-doctor
withnpm install appium-doctor
and take care of it. - A local Android device USB-connected to the device running the test.
- Google's
Photos
app installed on the device.
To run the test on BrowserStack you'll need:
- To define
BROWSER_STACK_USER
andBROWSER_STACK_PSW
Reporting
There are two reports you can browse.
Allure
If it was not done automatically, you can generate the report after a test run with
npm run report:generate
You can then serve and open it by
npm run report:open
Multiple Cucumber
You should be provided a link to the automatically generated HTML file after the test run.
Either way, the last run report always kept in .run/reports/cucumber
.