---
marp: true
theme: default
paginate: true
title: "04 Automation Strategy"
---

# Automation Strategy First

- Automate repeatable, high-value, stable checks
- Keep manual testing for discovery and UX judgment
- Treat automation as engineering product code

References: https://martinfowler.com/articles/practical-test-pyramid.html

---

# Test Pyramid in Practice

- More fast unit/service checks, fewer UI E2E
- UI tests cover user-critical journeys only
- Balance confidence with execution cost

References: https://martinfowler.com/articles/practical-test-pyramid.html

---

# Flaky Test Mitigation

- Quarantine non-deterministic tests quickly
- Remove shared state and timing dependencies
- Track reliability trends over time

References: https://testing.googleblog.com/2016/05/flaky-tests-at-google-and-how-we.html

---

# Maintainable Test Architecture

- Use page objects/screenplay where appropriate
- Centralize fixtures and test data builders
- Keep assertions explicit and readable

References: https://playwright.dev/docs/intro | https://docs.pytest.org/en/stable/

---

# BDD: When and When Not

- Use Gherkin for shared understanding
- Avoid turning feature files into low-level scripts
- Prefer business-readable scenarios

References: https://cucumber.io/docs/gherkin/reference/

---
