Skip to Content

Automated End-to-End Testing – A Blessing or A Curse?

Camilla Tran
Aug 19, 2024

When I talk to my developer colleagues, I often get, “You like to write tests??? That’s great! Most developers don’t like to write tests.”. Well, the truth is that I love to write tests when the system is stable. However, it can be frustrating to have many failed tests in the test suite. Automated end-to-end (E2E) tests may be challenging when the frontend is unstable, but it works great on a stable system. In this blog post, I will enlighten some advantages and disadvantages of automated E2E tests in front-end development.

There are several test automation technologies such as Selenium, Cypress, Playwright, etc. While there are some differences between these tools, what they all have in common is their ability to perform automated E2E for front-end applications.

Advantages

  1. Broad Test Coverage
    Automated E2E tests provide broad test coverage by simulating real user interactions with the application. This ensures that all components of the application work together as expected. E2E tests help to validate the entire user journey unlike unit tests and integration tests.
  2. Early Bug Detection
    You can catch bugs early in the development cycle with a well-maintained E2E test suite. This is especially important when working on large-scale applications with multiple features and dependencies. By running these tests as a part of the CI/CD pipeline, it is possible to identify and fix issues before they reach production. In return, you have saved time and resources.
  3. Enhanced Confidence in Releases
    Automated E2E tests play a vital role in ensuring that new code changes do not disrupt existing functionalities. The tests will reduce the likelihood of manual regression testing and improve the overall software quality. This is especially crucial in Agile or DevOps environments where frequent releases are the norm.

Disadvantages

  1. High Maintenance Costs
    One of the significant downsides of automated E2E tests in frontend is the maintenance costs. When the UI or underlying services change frequently, E2E tests may fail often. Thus, the tests can lead to false positives or negatives. To prevent test failures, the test suite needs regular updates, which can be both time-consuming and resource-intensive.
  2. Slow Feedback Loop
    Automated E2E tests may often take longer to execute compared to unit or integration tests. This is primarily because they simulate real user interactions and involve multiple layers of the application. This can slow down the feedback loop, especially in large applications where the test suite is extensive.
  3. Complex Setup and Environment Dependencies
    Setting up a reliable automated E2E testing environment can be challenging. These tests often require a fully functional environment that mirrors production. That means the environment needs access to databases, credentials, APIs, and third-party services. Thus, the tests may have several dependencies and can easily fail.

Despite the disadvantages, automated E2E tests in frontend play a vital role in the overall quality and reliability of the application. Keep in mind that the construction of the tests plays a big role. If your tests focus too much on happy paths or fail to cover edge cases, they might pass while significant bugs remain undetected.

In conclusion, automated E2E tests in frontend can be both a blessing and a curse. The key is to invest time in maintaining a stable test environment and to construct good and meaningful tests. Then, in the end, you will see the power of automated E2E tests!

About the author

Camilla Tran

Senior Consultant | Norway
Camilla is a Senior Consultant at Sogeti Norway as a Technical tester with a developer background. She has always had a special interest in technology from an early age and has a general bachelor’s degree in Informatics. Her Master’s degree in Informatics is specialized in Interaction Design, Game, and Learning Technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

Slide to submit