README prepared by Smit Sarang
macOS guide :
Have NODE installed in system
- open terminal and pull this repo
- go to repo
- run "chmod +x setup.sh"
- this will install npx and install package.json dependencies
- Now you can run command "npx cypress open" to open cypress window
- Select and run test name "amazon-buy-product.cy"
- Post test run, you can observe "/screenshots" folder to refer test run screenshot img.
What can be expected more?
- As test suits grow, we have some functions which we use often like launchingURL post doing some cleaup, storing screenshot, login functions and some more. Hence commands can be expanded with such generic functions.
- Even at each verification level screenshots can be taken and stored, to better have visible reference.
- API can be automated.
- Reporters can be added, so we do have one HTML file containing all required information.
- More conditions can be added to code to give more test coverage.
Trade offs made:
- Manually created amazon account.
- removed "target" attribute of product search result hyper link becauase, Because Cypress runs in the browser, it will most likely not have multi-tabs support. We do have access to the browser automation APIs to actually switch tabs. To focus on functional automation first, link was opened in the same tab.
- Cleared cookies before launching browser to prevemt duplicatation of items added in cart. Hence, current coverage only includes single item purchasing flow.