
Problem
A take-home QA assessment: automate the sign-in and shopping flows of an e-commerce demo store in a way that's readable and maintainable.
Approach
- Page Object Model:
LoginForm,MyAccountandClothinghold the locators and actions; tests never touch locators directly. - Seven TestNG tests: sign-in form shown, invalid credentials, missing fields, email format highlighting (red and green), successful login, sorted product listing, and add to cart.
- Maven build, with Surefire running the
testng.xmlsuite.
Result
- 7 of 7 tests passed in the 2022 run (TestNG reports included in the repository).
- In 2026 the code was cleaned up for publishing: the test account, other email addresses and a machine-specific driver path were removed from the code and are now passed as system properties. The suite compiles on Java 11; the demo store itself is no longer online.
What this shows
Maintainable UI automation with page objects, positive and negative test design, and keeping credentials out of source code.