Automated web testing (2023)
ADR started in February 2023.
Context and problem statement
What technical solution for end-2-end (e2e) testing on web applications to start with?
Requirements
- Tests can be run from the command line, with no link to an external service (no SaaS)
- Test reports can be generated in HTML format
- Language must be part of: .NET, Go, TypeScript
- (Optional) Pipelines for code lifecycle & test execution are easy to make
Considered options
- Tools
- Cucumber (GitHub org)
- Cypress (docs, sources ★ 42.6k)
- Jest (docs, sources ★ 41.4k)
- Playwright (docs, sources ★ 47.7k)
- Guides: Page Object Models, BDD
- Selenium (docs, sources ★ 25.8k)
- tebeka/selenium: no update since 2021
- sourcegraph/go-selenium: no update since 2017
- Taiko (sources ★ 3.2k)
- Patterns
- Page Object
- BDD (Behavior-Driven Development)
- Gherkin language
Decision outcome
- 🟡 Cypress is an proven solution but there is a risk the company change its open source strategy over time (and restrict for example the featureset or license model)
- 🟠 Jest is very interesting for unit/integration testing, maybe not well suited for e2e testing.
- 🟢 Playwright has a very good documentation and featureset, not linked to a company ← we have our winner!
- 🟠 Selenium has no strong drivers in Go (as of today) and doesn't have the modern features the recent technologies have
- 🔴 Taiko doesn't have the same audience as the other massively used tools