...
E2E tests are important in software development because they ensure that the application meets the user's requirements and specifications. They help to identify any bugs, defects or inconsistencies in the application, and prevent problems that could arise in production.
Why do we need E2E tests?
Automated end-to-end (E2E) testing is an essential practice in software development for several reasons. Firstly, it increases efficiency and productivity by simulating the user's behavior and testing the entire system's functionality in one go, eliminating the need for manual testing of individual components. Additionally, automated E2E testing provides improved accuracy and reliability compared to manual testing. It can simulate complex scenarios and edge cases that are difficult to replicate manually, resulting in more accurate and reliable results. This practice is also cost-effective, as it can identify issues early in the development cycle, thereby preventing costly errors from making it to production. Automated E2E testing provides a faster feedback loop on the system's performance and functionality, allowing the team to fix issues promptly and avoid delays in the development process. Lastly, it leads to better quality software by identifying defects and bugs early in the development cycle, resulting in better customer satisfaction and retention.
Getting Started
Before starting any testing, ensure that you have a complete understanding of the feature and its functionality. To get started, follow these steps:
...
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.
Demo data usage
To ensure that the test contains the necessary metadata, you may follow the procedures outlined below:
Utilize the user interface - Suppose the test scenario involves editing patient information. In this case, you can use the UI to create a new patient record for testing purposes.
Leverage demo data - If the test case only requires data viewing, the demo data available in the RefApp can suffice. Check the demo data module to know more.
Generate the required data - In case the above solutions are inadequate, you can use the API to create the necessary data ahead of the test.
Open reports from GitHub Actions / Bamboo
...