testingrepositorye2e-testingplaywright

Where to locate E2E tests relies on more than one repository


This topic does not seem to have any best-practice documentation.

I maintain two main repositories: The MainRepository1, the MainRepository2.

Four E2E tests were created to be executed every time each main repository completes deployment steps.

What is the best place to locate the tests?
The code should not be duplicated.

Are there any best practices here?

Avoid duplications of tests


Solution

  • Use environment Variables to keep automation code app environment agnostic like dev- qa- stage - prod.

    This way you run the same tests in multiple environments by passing changes as environment variables or through command line arguments.

    This applies to any automation not only to playwright.