Automação E2E web com Playwright e TypeScript, estruturada com Page Object Model e fixtures customizadas, rodando em GitHub Actions com relatório HTML.
🇬🇧 Web E2E automation with Playwright and TypeScript — Page Object Model, custom fixtures and an HTML report on GitHub Actions CI.
App alvo: Swag Labs / saucedemo.com.
- Page Object Model — telas encapsuladas (
LoginPage,InventoryPage,CartPage,CheckoutPage). - Fixtures customizadas — Page Objects injetados nos testes (
fixtures/pages.ts), specs limpos e DRY. - TypeScript strict — tipagem forte em locators e ações.
- Locators resilientes —
data-teste roles em vez de seletores frágeis. - Auto-wait nativo do Playwright — sem
sleepmanual. - Trace, screenshot e vídeo automáticos em falhas.
- Tags —
@smoke,@negative,@regression. - CI — execução headless + relatório HTML como artifact.
pages/ → Page Objects
fixtures/ → injeção dos Page Objects (test.extend)
tests/ → specs (login, checkout)
playwright.config.ts
- Node.js 18+
npm ci
npx playwright install --with-deps chromium
npm test # headless
npm run test:headed # com navegador visível
npm run test:ui # modo UI interativo
npm run report # abre o último relatório HTMLFiltrar por tag:
npx playwright test --grep @smokeLogin
- Login válido → catálogo (
inventory) locked_out_user→ bloqueado com erro- Credenciais inválidas → mensagem de erro
Compras & Checkout
- Adicionar itens → badge do carrinho atualiza
- Fluxo completo de compra → "Thank you for your order!"
Jose Luis Vieira — QA Engineer | Automation (Web, Mobile & API) GitHub · LinkedIn