bcgov / cas-reporting

This is for the Clean Growth Digital Services team for work related to reporting.
Apache License 2.0
0 stars 0 forks source link

Use Nx Atomizer to split E2E testing into chunks #241

Open joshgamache opened 1 month ago

joshgamache commented 1 month ago

Description:

e2e tests currently work, but could they work **better?** This ticket aims to address that question. We should be able to use Nx Atomizer, an automatic e2e test splitter. It breaks e2e runs into smaller pieces, allowing for CI to be rerun on any flaky tests or identify any errors faster.

Dev story:

I want to use Nx Atomizer because it will automatically split E2E tests and this will help me to allow for easier identification/reruns of flaky tests and allow for parallelization.

Development Checklist and tasks:

Consideration and notes

Definition of Ready (Note: If any of these points are not applicable, mark N/A)

Definition of Done (Note: If any of these points are not applicable, mark N/A)

joshgamache commented 1 month ago

A POC branch was run using Nx Atomizer to split up the e2e tests. The result was that e2e was flakier than berfore. More errors regularly appeared. A potential cause of this is due to the extra overhead of restarting/reseting playwright and running so many in parallel. Additionally, with splitting them and Matrixing them, they each need to spin up a development server to run the tests against.

Will explore further to see if there are any benefits we can draw out of Nx with regards to e2e.

BallardRobinett commented 1 month ago

A POC branch was run using Nx Atomizer to split up the e2e tests. The result was that e2e was flakier than berfore. More errors regularly appeared. A potential cause of this is due to the extra overhead of restarting/reseting playwright and running so many in parallel. Additionally, with splitting them and Matrixing them, they each need to spin up a development server to run the tests against.

Will explore further to see if there are any benefits we can draw out of Nx with regards to e2e.

would this be helped by the Nx Replay caching? Part of this card: https://github.com/bcgov/cas-reporting/issues/232