- Setup the solution with its Dockerized image -
Docker compose with selenium-hub, selenium-node/chrome, selenium-node/firefox
- Parallel execution of tests -
Chrome:3 instances, Firefox:1 instance
- Reporting of the results -
Allure and Multiple cucumber Json reporter
- Documentation
- Kubernetes deploying - Work in Progress
- Making use of
wdio-image-comparison-service
- Test will run, parallely based on node instances aavailable with
selenium-hub
chrome/firefox
nodes - BDD testing with
Cucumber
- Reporting with
Allure
- Reporting with
multiple-cucumber-json-reporter
- Given, Scenario, Step definitions and helper files written in
typescript
- Docker compose is used to start the
selenium-hub
- Need node-js and java
(allure-reporter)
Node.js
- 10 or higherJava
- 8 or higher
- Install Node dependencies:
npm install
- Install docker and run
selenium:hub
:
npm run selenium
- Running tests:
npm run test
To stop docker containers:
npm run selenium:stop
volvo.campaign.modal.feature
- Tests related to modal dialog ex: cookie policyvolvo.campaign.nav.feature
- Tests related to navigable elements in application ex: hamburger menu optionsBuy
,Own
etc.volvo.campaign.screenshot.feature
- Creates and image comparison test.
- Allure report is automatically generated to open the reports
npm run report:allure
- Multiple cucumber json reporter will open automatically, but to open manually.
npm run report
- WebdriverIO can run parallel test/features in case of multiple nodes availability with selenium hub.
so We have configured
chrome=3
andfirefox=1
instance/node. - When run
docker-compose up -d --scale chrome=3
ornpm run selenium
, we are spinning three chrome instances. - Webdriver IO will run all test in parallel in chrome due to available nodes
- Webdriver IO will run sequentially in Firefox because of single instance/node.
- We can use kubernetes to provision the nodes in selenium-hub based on demand ( Work in Progess)
- selenium-hub :
http://localhost:4444/grid/console