Portfolio · Case study · UI test automation In progress
UI tests that stay fast, stable and easy to change.
We’re building an end-to-end test suite in TypeScript with Playwright for a sample web application. It uses the page-object pattern to keep tests readable, runs in parallel across browsers to stay fast, and produces HTML reports that show exactly what happened when a test fails.
- Project
- Reference build · sample web app
- Service
- UI automation framework
- Stack
- Playwright · TypeScript
- Status
- In progress
The problem we’re solving
Most UI test suites become slow and fragile.
UI automation often starts well and then decays. Selectors are copied into dozens of tests, so one small UI change breaks everything. Fixed waits make runs slow and flaky. Tests run one after another and take hours. When something fails, nobody can tell why without re-running it by hand.
Teams end up ignoring red builds, and the suite stops protecting anyone.
Our approach
Structure first, speed built in.
- Page-object pattern: each page’s selectors and actions live in one class, so a UI change is fixed in one place.
- Parallel by default: isolated tests run side by side across Chromium, Firefox and WebKit.
- No fixed waits: Playwright’s auto-waiting and web-first assertions remove the main cause of flaky tests.
- Readable reports: HTML reports with screenshots, videos and traces for every failure.
How it’s structured
Tests describe behaviour. Page objects handle the details.
A test reads like a user story. How to find a button or fill a form is hidden inside the page object, so tests stay short, and maintenance happens in one place.
export class LoginPage {
constructor(private page: Page) {}
email = () =>
this.page.getByLabel('Email');
password = () =>
this.page.getByLabel('Password');
submit = () =>
this.page.getByRole('button', { name: 'Sign in' });
async login(email: string, pass: string) {
await this.email().fill(email);
await this.password().fill(pass);
await this.submit().click();
}
}test('user can sign in', async ({
loginPage, dashboardPage
}) => {
await loginPage.goto();
await loginPage.login(user.email, user.pass);
await expect(dashboardPage.heading())
.toHaveText('Welcome back');
});
test('wrong password shows an error',
async ({ loginPage }) => {
await loginPage.goto();
await loginPage.login(user.email, 'wrong');
await expect(loginPage.error())
.toBeVisible();
});playwright-framework/
├── pages/ page objects
├── fixtures/ shared setup
├── tests/ specs by feature
├── data/ test data helpers
├── utils/ common helpers
└── playwright.config.ts
browsers · workers · reportsStable locators
Role, label and test-id locators instead of brittle CSS paths.
Custom fixtures
Page objects and logged-in sessions injected into tests automatically.
Isolated tests
Each test gets a fresh browser context, so order never matters.
Fast login
Authentication state saved once and reused, skipping repeated logins.
Speed & reporting
Fast feedback, and failures you can understand
Parallel runs
- Multiple workers run tests at the same time
- Cross-browser projects: Chromium, Firefox and WebKit
- Sharding splits large suites across CI machines
- Smoke and full regression tags for different pipelines
Readable HTML reports
- Pass/fail summary by browser and test file
- Screenshot and video captured on failure
- Step-by-step trace to replay exactly what happened
- Published as a CI artifact for the whole team
Project status
Where we are now
This project is actively being built. We’ll publish measured results (run times, stability and coverage) once the suite is complete.
- Framework setup in TypeScript
- Page-object structure and fixtures
- Parallel, cross-browser configuration
- End-to-end tests for core user journeys
- HTML reports with traces and videos
- Test data helpers
- CI pipeline with sharded runs
- Visual regression checks
- Accessibility checks on key pages
Tech stack
Tools we’re using
Test framework
Playwright Test
Language
TypeScript, Node.js
Browsers
Chromium, Firefox, WebKit
Reporting
Playwright HTML reporter, trace viewer
Code quality
ESLint, Prettier
CI/CD
CI pipeline with sharded runs (next step)
Is your UI test suite slowing you down?
We build UI automation that stays fast, stable and easy to maintain as your product grows.