Automation Framework Project
Combine everything into a framework you can show in interviews and reuse at work.
On this page · 5 min · Advanced
On this page
- Learning objectives
- Explanation
- Code example
- Step by step
- Real-world use
- Common mistakes
- Best practices
- Remember this
- Practice exercise
- Mini quiz
- Related topics
- My notes
- Reading time
- 5 min
- Difficulty
- Advanced
- Updated
- Oct 29, 2026
Related tutorials
Learning objectives#
- Structure an automation repository
- Combine UI, API and data layers
- Run it in CI with reports
- Document it for others
Explanation#
Target application: any demo shop or your own project from this site.
Layers: config (env-based URLs), fixtures (page objects, API clients, test users), data factories, page objects, specs (smoke, regression, API).
CI: smoke + API on pull requests, full regression nightly across browsers, reports uploaded as artifacts.
README: how to install, run locally, add a test, and the conventions used.
Code example: Framework layout#
shop-automation/
├─ playwright.config.ts projects: setup · chromium · firefox · webkit · mobile
├─ fixtures/
│ └─ index.ts test.extend({ loginPage, cartPage, api, customer })
├─ pages/ LoginPage.ts · ProductPage.ts · CartPage.ts · CheckoutPage.ts
├─ api/ ProductsApi.ts · OrdersApi.ts
├─ data/ factories.ts (unique customers, products)
├─ tests/
│ ├─ auth.setup.ts log in once → storageState
│ ├─ smoke/ @smoke home · search · add to cart · checkout
│ ├─ regression/ cart rules · coupons · account
│ └─ api/ products CRUD · orders · validation errors
├─ .github/workflows/ pr.yml (smoke + api) · nightly.yml (full, sharded, all browsers)
└─ README.md setup · run · conventions · report screenshots
A maintainable framework with fast PR feedback, nightly cross-browser regression and clear reports.
This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.
Step-by-step explanation#
- Start with config, one page object and one smoke test.
- Add API clients and data factories.
- Grow smoke and regression suites.
- Add CI workflows and reports, then document.
Real-world use case#
A portfolio piece that demonstrates real automation engineering skills, not just recorded scripts.
Common mistakes#
Recorded scripts are a starting point; move locators into page objects.
Others cannot run or extend the framework.
Best practices#
- Layers: config · fixtures · pages · api · data · tests
- Tags like @smoke for selective runs
- CI on PR and nightly
- Document conventions
Remember this#
Pages act, tests assert, factories feed data.
@smoke on PRs, full suite nightly.
A README makes it a framework.
Practice exercise#
Your task: Run only tests tagged @smoke.
Show solution
npx playwright test --grep @smoke
Mini quiz#
Which suite should run on every pull request?
Want more? Practise all Automation Testing MCQs · Automation Testing interview questions
My notes#
Saved in this browser.