Closed DevonGifford closed 10 months ago
moved to the following issue:
This pull request introduces a comprehensive end-to-end (E2E) testing environment using Playwright. The goal is to automate the testing of user flows and interactions across the application, ensuring a robust and reliable user experience.
We have identified a comprehensive list of components, utilities, and application functionalities that require unit and integration testing. Will write unit tests to verify isolated functionality and integration tests to confirm correct interaction with other parts of the application.
Reference to new ticket created:
In the future, we plan to integrate these E2E tests with our CI/CD pipeline. This will allow us to run tests automatically on every code push, ensuring that any breaking changes are caught immediately.
Therefore the new and unused: .github/workflows/playwright.yml
Reference to new ticket created:
End-to-end testing is a methodology used to test whether the flow of an application is performing as designed from start to finish. The purpose of carrying out end-to-end tests is to identify system dependencies and to ensure that the right information is passed between various system components and systems.
Our end-to-end tests cover key user flows and functionalities such as:
We use Playwright for end-to-end testing in our application. Playwright is a Node.js library to automate Chromium, Firefox, and WebKit browsers with a single API.
We use the npm init playwright@latest
command to set up Playwright. This command sets up a testing environment, including installing necessary dependencies and setting up a basic test structure.
Tests are written in the tests/e2e
directory. We use the .spec
extension for end-to-end tests to distinguish them from unit and integration tests (which use the .test
extension).
When writing tests, we aim to cover all the key user flows and functionalities mentioned in the test scenarios. Each test should be atomic, testing one functionality or flow, and should be independent of other tests.
Tests can be run using the yarn playwright test
command. We’ve also added a script to our package.json
for convenience, so tests can also be run with npm run test:e2e
.
Playwright provides a command npx playwright show-report
to view the test report. This report includes information on passed and failed tests, as well as any errors or logs.
In the future, we plan to integrate our end-to-end tests with our CI/CD pipeline. This will allow us to run tests automatically on every code push, ensuring that any breaking changes are caught immediately.
Description
The application requires comprehensive end-to-end tests that cover critical user workflows and scenarios. The task at hand involves configuring Playwright to automate these tests.
Actionable Items
Testing Considerations