ultra-coding-qa-automation-test
The expected outcome is an automated test framework for the https://www.saucedemo.com/ dummy website.
I'll be brief in this section, since the test scenarios were written using BDD, their steps are very easy to follow and straightforward.
- Logging into Swag Labs with a valid user
- Logging into Swag Labs with an invalid user should fail
- Add products to the cart
- Remove products from the cart
- Opening the cart (review cart content)
- Remove products from the cart
- Do a successful checkout
- Do a failed checkout using invalid personal information details
- Do a failed checkout using an empty cart
To use this project you will need:
- Install JavaSE-OracleJDK (v17.x.x or later)
- Install Node
nvm v16.15.0
npm v6.14.4
git clone https://github.com/claudiaerp/ultra-challenge-wdio-interface-automation.git
npm install
to install the project dependencies
To run specific scenarios by tag, do:
npm run report:clean && npx wdio run config/wdio.chrome.conf.ts --cucumberOpts.tagExpression="@<tag>"
You can generate the HTML report by running:
npm run report:sandwich
To clean up your reports/ folder, run
npm run report:clean
UI Automation Framework with Typescript and WebdriverIO using Page Object Model pattern. I chose this pattern because makes the solution cleaner and easy to understand. Test cases are easy to maintain, page objects can be added, modified an reused with no struggle.
│ WebdriverIO
├── ...
├── features
│ ├── login
│ ├── login.feature
├── pages
│ ├── login
│ ├── LoginPage.ts
├── reports
├── test-data
│ ├── users.json
├── step-definitions
│ ├── login
│ ├── LoginSteps.ts
└── ...
features
folder contains BDD tests
pages
folder contains the page classes that contain web elements
reports
folder contains test results in JSON and HTML reports
test-data
folder contains mock users and their information, to be used in tests
step-definitions
folder where map the Gherkin(BDD) to functions
To debug scenarios using break points, use run select by spec by tag
launch
https://app.circleci.com/pipelines/github/claudiaerp/ultra-coding-qa-automation-test
- On the latest build, click
test
onWorkflow
column - Click
test
job - All Steps ran on this build will display
- Click
ARTIFACTS
tab - Click
reports/cucumber-html-reports/cucumber-html-reports/overview-features.html
link - A Cucumber HTML report will display showing the test results