Add End-to-end tests using playwright
Goal
Support quality assurance by enabling automated end-to-end testing using Playwright
Description When we bring about changes in the frontend with StEPs and TICs, quality is ensured there by manual tests by directly interacting with a browser. This has many advantages: People notice unfamiliar changes more easily and react more flexibly. The disadvantages certainly include: people "tire" more quickly and do not reliably test all places if they are perceived as unrelated to the intended change.
Therefore, it is important to automate the tedious part of testing, especially on regressions.
End-to-end tests examine directly in the browser the output of the server. This makes them very different from unit tests, which specifically test only individual detached code snippets but not the big picture.
We have chosen a modern and very well maintained library to help us write and run end-to-end tests:
This StEP integrates Playwright into our ecosystem and enables end-to-end test writing and execution.
Actions
What is needed in detail to achieve the above goal?
- Integrate playwright related commands into makefile. Make the command easy but in the meanwhile useful!
- Directory structure would be : ./tests/e2e/*
- Defining correct configs under: ./playwright.config.js
- To have a better control over login credentials, an automated login process would be very useful since playwright is capable of using precaptured sessions as well as pre-defined steps that happen before every tests.
- Under ./tests/e2e/, every desired test should be placed in order for playwright to read the file and conduct the test.
Short description of the integration effort Low complexity.
Implementation ELAN implements and maintains this StEP.
Links