|
| 1 | +# Automated web testing ADR - February, 2023 |
| 2 | + |
| 3 | +## Context and problem statement |
| 4 | + |
| 5 | +What technical solution for end-2-end (e2e) testing on web applications to start with? |
| 6 | + |
| 7 | +## Requirements |
| 8 | + |
| 9 | +* Tests can be run from the command line, with no link to an external service (no SaaS) |
| 10 | +* Test reports can be generated in HTML format |
| 11 | +* Language must be part of: .NET, Go, TypeScript |
| 12 | +* (Optional) Pipelines for code lifecycle & test execution are easy to make |
| 13 | + |
| 14 | +## Considered options |
| 15 | + |
| 16 | +* **Tools** |
| 17 | + * [Cucumber](https://cucumber.io/) ([GitHub org](https://github.com/cucumber)) |
| 18 | + * [Godog](https://github.com/cucumber/godog) _official_: active development |
| 19 | + * [GoBDD](https://github.com/go-bdd/gobdd) _unofficial_ ([docs](https://go-bdd.github.io/gobdd/)): no release since 2021 |
| 20 | + * [Cypress](https://www.cypress.io/) ([docs](https://docs.cypress.io/), [sources](https://github.com/cypress-io/cypress) _β
42.6k_) |
| 21 | + * Guides: [Page Object Model by BrowserStack](https://www.browserstack.com/guide/cypress-page-object-model), [Cucumber](https://testersdock.com/cypress-cucumber-bdd/) |
| 22 | + * [Jest](https://jestjs.io/) ([docs](https://jestjs.io/docs/getting-started), [sources](https://github.com/facebook/jest) _β
41.4k_) |
| 23 | + * [Playwright](https://playwright.dev/) ([docs](https://playwright.dev/docs/intro), [sources](https://github.com/microsoft/playwright) _β
47.7k_) |
| 24 | + * Guides: [Page Object Models](https://playwright.dev/docs/pom), [BDD](https://dev.to/jankaritech/behavior-driven-development-bdd-using-playwright-n1o) |
| 25 | + * [Selenium](https://www.selenium.dev/) ([docs](https://www.selenium.dev/documentation/), [sources](https://github.com/SeleniumHQ/selenium) _β
25.8k_) |
| 26 | + * [tebeka/selenium](https://github.com/tebeka/selenium): no update since 2021 |
| 27 | + * [sourcegraph/go-selenium](https://github.com/sourcegraph/go-selenium): no update since 2017 |
| 28 | + * [Taiko](https://taiko.dev/) ([sources](https://github.com/getgauge/taiko) _β
3.2k_) |
| 29 | +* **Patterns** |
| 30 | + * Page Object |
| 31 | + * BDD (Behavior-Driven Development) |
| 32 | + * Gherkin language |
| 33 | + |
| 34 | +## Decision outcome |
| 35 | + |
| 36 | +* π‘ **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) |
| 37 | +* π **Jest** is very interesting for unit/integration testing, maybe not well suited for e2e testing. |
| 38 | +* π’ **Playwright** has a very good documentation and featureset, not linked to a company β _we have our winner!_ |
| 39 | +* π **Selenium** has no strong drivers in Go (as of today) and doesn't have the modern features the recent technologies have |
| 40 | +* π΄ **Taiko** doesn't have the same audience as the other massively used tools |
| 41 | + |
| 42 | +## Implementation examples |
| 43 | + |
| 44 | +* [hobbyfarm/e2e-testing](https://github.com/hobbyfarm/e2e-testing) |
0 commit comments