A compact framework built for an automation assessment, covering UI and API testing in one Playwright project.
What it covers
- UI journeys on a demo shop: sorting products by price, adding items to the cart and completing checkout.
- API tests against a public REST API: listing, creating and deleting users, with typed responses and checks on the fields that come back.
- Login and protected routes: a valid login reaches the secure area, and a signed-out visitor is sent back to the login page.
How it’s built
- Page objects for the login, inventory, cart and checkout pages keep locators out of the tests.
- The API key comes from an environment variable, never from the code.
- Failed tests retry once and record a trace for debugging in Playwright’s trace viewer.