HMRC Digital Worthing Pre interview Exercise for Test Engineer Candidates - AndyStatic/HMRC_Digital_Worthing GitHub Wiki
Test framework from scratch to test the following test website: http://automationpractice.com/index.php
Scenario 1. Create a new account
Scenario 2. Login, find the most expensive dress and add it to the cart, log out
Scenario 3. Back in again, ensuring the dress is still in the cart
Used approach: Cucumber(BDD) + Selenium + Java + Maven
How to run:
- In /src/test/java/steps/hooks/Hooks.java point your driver(s) location
Note: In /src/main/java/config/config.properties you can choose which driver to use
- Via mvn command: mvn clean compile test
In InelliJ IDEA it also can be run via /src/test/java/runner/TestRunner.java
What can be improved:
- Randomized email or taken from data source for creating new user. Currently needs to be changed manually in all scenarios.
- Use DataTable for data population in Scenario 1, so populate it all in 1 step. Pros - this will minimize amount of steps. Cons - one step - one action sometimes is more preferred approach from test management point of view.
Issues:
- "Find the most expensive dress and add it to the cart"
My approach was chosen in order to got to 3rd scenario without failing. So passing are only first 2 scenarios: When user selects sorting dresses from High to Low, application doesn't sort dresses correctly or algorithm of sorting is a black box, and there are a lot of unseen prices are taken into account. So dress visually is not the most expensive one.
-
Drop down list controls didn't work as planned. So workaround was used.
-
Time was spent more than 2 hours, because for issue number 2.