Thanks for taking a look! This is primarily a portfolio project, but the guidelines below keep it tidy and make contributions easy to review.
- Install JDK 21+ and Maven 3.9+ (Chrome is resolved automatically by WebDriverManager).
- Clone the repo and run the smoke suite to confirm your setup:
mvn clean test -Dsuite=smoke.xml
- Branch off
mainusing a descriptive name, e.g.feat/checkout-couponsorfix/cart-badge-wait. - Keep commits focused and write imperative, descriptive messages (e.g. "Add wait for cart badge to settle").
- Open a pull request into
main; CI must be green before merge.
- Page Objects live in
src/main/java/.../pagesand expose intent-revealing methods (addProductToCart), never raw locators, to callers. - No
Thread.sleep. Synchronise with the helpers inBasePage(explicit waits only). - Keep locators in one place per page as
private static final Byfields; prefer SauceDemo'sdata-testattributes where available. - Add an
@Stepannotation to user-facing page actions so they appear in Allure. - Match the existing formatting (see
.editorconfig). Runmvn -q test-compilebefore pushing.
- Put TestNG tests under
src/test/java/.../testsand register new classes intestng.xml. - Annotate tests with
@Epic/@Feature/@Story/@Severityand a cleardescriptionso the Allure report stays readable. - For BDD, add scenarios under
src/test/resources/featuresand step definitions undersrc/test/java/.../bdd.
mvn clean test # full regression suiteAll tests should pass and the build should be clean.