Closed jayasanka-sack closed 1 year ago
@larslemos @samuelmale could you please review this?
@jayasanka-sack seems the dev3 server is rejecting traffic from our test server. Assuming this is an issue why not consider using https://ethiohri-dev.globalhealthapp.net/ ?
Thanks for reviewing the PR @ebambo and @samuelmale. The Github action was failing due to wrong sources path provided in the workflow file. Fixed with 834ab3a.
P.S.
AFAIK this repo is using https://ethiohri-dev.globalhealthapp.net/
as the backend by default.
Summary
This PR aims to ensure that end-to-end tests be run automatically as part of pull requests or individual commits. This will provide a more streamlined and efficient testing process, allowing tests to be run automatically as part of the development workflow.
▶️ Watch Demo!
Running tests
Once everything is set up,
To run a specific test by title:
Check this documentation for more running options.
Writing New Tests
In general, it is recommended to read through the official Playwright docs before writing new test cases. The project uses the official Playwright test runner and, generally, follows a very simple project structure:
When you want to write a new test case, start by creating a new spec in
./specs
. Depending on what you want to achieve, you might want to create new fixtures and/or page object models. To see examples, have a look at the existing code to see how these different concepts play together.Github Action integration
The e2e.yml workflow is made up of two jobs: one for running on pull requests (PRs) and one for running on commits.
Open reports from GitHub Actions
To download the report from the GitHub action/Bamboo plan, follow these steps:
The report will show you a full summary of your tests, including information on which tests passed, failed, were skipped, or were flaky. You can filter the report by browser and explore the details of individual tests, including any errors or failures, video recordings, and the steps involved in each test. Simply click on a test to view its details.
Sample runs:
Debugging Tests
Refer to this documentation on how to debug a test.