Test automation
Automation levels and the test pyramid, locators in UI tests, the object repository, flaky tests and running automated tests in CI.
5 articles in reading order
- Test automation levels and the test pyramidUnit, integration and end-to-end tests: the cost and speed of each level, the test pyramid and the ice cream cone anti-pattern.
- Locators in UI testsLocators in UI tests: by role, label, placeholder, test id, text, CSS and XPath, resilience to changes, the order of choice and waiting for elements.
- Object repository and the Page Object patternObject repository and Page Object: moving UI locators out of tests, page and component objects, pages and elements as data, maintenance, Screenplay.
- Flaky testsFlaky tests: tests that pass and fail on the same code. Causes, research data, detection by run history, quarantine, retries and their risks, fixes.
- Automated tests in CIAutomated tests in CI: pipeline triggers, stages by speed, parallelism and sharding, JUnit XML reports, retries, artifacts, results in test runs.