File size: 2,391 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# Migration from Cypress to Playwright for GoAlert Testing
- Status: accepted
- Date: 2022-09-13
**Acceptance Criteria**: Clear Consensus
Technical Story: Due to several limitations with Cypress, such as flaky selector chains and difficulty in testing popup links and oauth flows, it was decided to migrate to Playwright for a more robust testing environment.
## Context and Problem Statement
We aim to address the shortcomings of Cypress used in GoAlert, such as its flaky selector chains, the inability to test popup links and separate servers/hosts, and the frequent breaking changes with updates. How can we improve the test infrastructure to be more reliable and maintainable?
## Decision Drivers
- Cypress's limitations in handling complex test scenarios
- The need for better integration with existing IDEs
- Requirement for concurrent tests and multi-tab/window testing capabilities
## Considered Options
- Continuing with the current setup and adding workarounds for Cypress's limitations
- Migrating to Playwright for testing
## Decision Outcome
Chosen option: "Migrate to Playwright", because it offers better integration with existing IDEs, allows for more flexible testing capabilities such as handling multiple tabs/windows, and supports concurrent test execution.
### Positive Consequences
- Improved test reliability and maintainability
- Enhanced ability to test complex user interactions and flows
- Reduction in time and maintenance cost due to less frequent breaking changes
### Negative Consequences
- Initial setup and migration effort
- Learning curve associated with adopting a new testing framework
## Pros and Cons of the Options
### Continuing with Cypress
- β
Good, because it is already in place and the team is familiar with it.
- β Bad, because it introduces complexity and maintenance challenges.
- β Bad, because it does not support certain types of tests, leading to limited coverage.
### Migrating to Playwright
- β
Good, because it resolves existing issues with Cypress.
- β
Good, because it allows for more robust and comprehensive testing.
- β Bad, because of the initial effort required to set up and learn the new system.
## Links
- [Relevant Issue](https://github.com/target/goalert/issues/2589)
- [Migration Commit](https://github.com/target/goalert/pull/2608)
- [Playwright Documentation](https://playwright.dev/)
|