What is end-to-end (E2E) testing?

Authors

Phill Powell

Staff Writer

IBM Think

Ian Smalley

Staff Editor

IBM Think

End-to-end testing, defined

End-to-end (E2E) testing is a software testing methodology that validates an entire application workflow from beginning to end.

E2E testing confirms that integrated components (like the front end, back end, databases and third-party services) work smoothly together. It also strives to incorporate real-world user scenarios.

There’s a full complement of software testing types now available. You can test specific areas of an entire application, zooming in on the particular aspect that’s of interest, even down to unit testing its smallest incremental level. Maybe you might want to test how well the software performs various specific functions or how its different components all fit together. In this case, you’d do well to explore functional testing or integration testing.

But let’s say your goal is getting the most complete picture of how a software application operates. You want to see the app in action—from start to finish—and see how efficiently it handles its subsystems and associated dependencies.

Beyond those steps, let’s suppose you also want to gain a general sense of how well the user interface (UI) works. So, whatever UI testing approach you choose needs to address app performance from a user’s perspective.

E2E testing provides the kind of comprehensive testing framework that offers a beginning-to-end view of app behavior and a means for evaluating the quality of the user experience (UX).

Because E2E testing is ambitious enough to stake out the entire application development lifecycle, it’s not surprising to discover that E2E testing requires more commitment, resources and time.

E2E testing differs considerably from a “black box” testing strategy, where operation is boiled down to a “pass/fail” assessment. This strategy means that we find out only whether the application works as billed. For this reason, E2E isn’t the ideal choice for every purpose. It’s typically a time-consuming testing process that’s best used in situations when testers genuinely require an evaluation of each stage of app performance.

The latest tech news, backed by expert insights

Stay up to date on the most important—and intriguing—industry trends on AI, automation, data and beyond with the Think newsletter. See the IBM Privacy Statement.

Thank you! You are subscribed.

Your subscription will be delivered in English. You will find an unsubscribe link in every newsletter. You can manage your subscriptions or unsubscribe here. Refer to our IBM Privacy Statement for more information.

Seven steps of E2E testing

The E2E testing process is based on these steps:

1. Test planning and management

The process begins with testers devoting some thinking to how the application will be operated by real users. Part of this stage is considering what the app’s most important user interactions will be, and how workflows will be routed within the app.

The different test scenarios should reflect a reasonable array of real-world scenarios and user journeys, and testers should document these scenarios and chart out the various steps involved in each.

Testers also need a test management system so test cases can be kept in an organized and easily accessible fashion. Test suites fulfill this function, grouping test cases according to user journeys, certain features or modules and components.

2. Test environment setup

This stage concerns the test environment, and it’s another step that requires some premeditation. Ideally, testers should develop a staging environment that strongly resembles the production environment.

Testers fill this staging environment with the individual components that would normally be integrated into the software development process, such as application programming interfaces (APIs), databases and other necessary components. And, in the instance that real performance data can’t be accessed, testers might opt to employ synthetic data instead.

3. Testing tool selection

The next aspect of designing E2E tests is selecting the proper testing tools, specifically the necessary frameworks and automation tools. Automation tools prove essential to running E2E tests because they streamline the testing process and run tests faster. When testers evaluate the entire performance of an application, such time savings aid efficiency.

Exactly which tools testers use depends on the application type. Testers equipping web applications typically choose tools like Cypress or Selenium. Testers working with mobile apps opt for tools like Appium. 

4. Test creation and execution

We've approached the stage where testers formulate the test scripts that outline different use scenarios as they pertain to all related components, like the front end, back end, databases and APIs.

When E2E tests are running, testers evaluate the application’s behavior as a workflow progresses, checking to ensure that data integrity is maintained throughout test execution. If testers choose not to use test scripts, they need to conduct manual testing for test scenarios instead.

5. Result validation

Testing methods are only as useful as what they reveal, and during this stage it’s time to carefully evaluate the test data that testing has generated. Testers compare test results and their associated metrics against expected outcomes to see what can be learned from the test coverage and what deficiencies or errors still currently exist within the code.

6. Defect resolution

Testers now go to work fixing whatever issues were uncovered by testing. Testers study error messages and performance logs to see where failures are rooted. When testers have successfully debugged application problems, the tests are re-run to see whether the issues have been remediated and performance has been optimized through the testing process.

This stage is where testers run normal quality assurance (QA) functions, with the goal of establishing seamless data quality.

7. Automation

The final step of E2E testing involves harnessing the power of automation to see that automated tests are properly integrated as a regularly occurring activity. That means adding test automation from a tool like the open source framework Playwright into the continuous integration and continuous delivery (CI/CD) pipeline so necessary tests are run on a regular, routine basis.

Testers that use the CI/CD pipeline can then detect performance issues earlier in the software development process, when they are able to mitigate them quickly and easily.

How Infrastructure is Powering the Age of AI

Is Your Infrastructure Ready for the Age of AI?

Learn how infrastructure decisions shape AI success. This conversation sets the stage, then the guide helps you explore how IT teams are adapting systems and strategies to support automation and enterprise AI.

E2E testing best practices

Want to perfect your end-to-end testing practices? Consider these tips.

Triage essential workflows

User journeys often differ significantly, and while it’s important to include as many of them in your testing as possible, you will likely need to prioritize your testing. This approach should concentrate on first testing your most important user journeys.

How you define “important” will vary somewhat. However, generally, we’re talking here about those tests that are conducted with regular frequency because of their steady and ongoing importance to an organization—like site login, for example.

The other part of this step is breaking down workflows into manageable steps for easier testing. 

Choose stable selectors

Selectors are patterns that call out the reactive elements within the Document Object Model (DOM) of a webpage. Selectors serve as addresses that assist testing frameworks in locating screen elements like input fields, text elements and buttons.

Similarly, it’s best to use “data-*” attributes or other stable identifiers. Fragile selectors like class names should be avoided. Further, a DOM structure can go through different iterations, so it’s probably best used carefully. 

Ensure test independence

What goes into making a good test? Success can take several forms, but the best testing examples usually share some attributes. For starters, testers should be able to call upon the same test whenever it might be required, so it’s considered desirable to make sure that tests are repeatable.

Similarly, the testing needs to be able to run free and unencumbered by external influences, such as third-party availability and network timing issues. These issues can produce unreliable results. 

Make tests manageable

Without effective management to rein in scope creep, it’s easy for E2E tests to become too large. When that occurs, tests can get bogged down and difficult to run. So, test performance suffers accordingly.

That’s why, where feasible, it makes sense to offload some of the heaviest processing tasks. Primarily, this means logic verification activities, which testers can perform as part of unit testing and integration testing. This method allows E2E tests to remain devoted to validating user behavior trends and synchronizing software systems.

Empower test automation

Probably the single greatest thing a tester can do to encourage efficient and comprehensive testing is to unleash the vast processing power represented by test automation. That’s the key way to ensure that testing occurs with proper frequency.

It’s also the prime means of limiting the ongoing presence of human errors in tests, in addition to automating repetitive testing chores. When working with cross-browser applications and mobile apps, many testers opt for cloud-based testing services.

Establish test environments

Creating and maintaining test environments is a crucial part of system testing. Testers should optimize the test environment and make it as agile as possible to enable quick setup and immediate testing.

It’s also critically important that test environments provide deep isolation to protect test results from undue interference from outside sources.

Foster a team approach

E2E testing works best when all affiliated parties are on board. That’s how testers can use high-quality test results that prove especially valuable during code revisions. In particular, DevOps teams and QA teams need to maintain close communication and collaboration to help ensure optimal software quality.

It’s also important to educate QA teams so they have a clear understanding of the organization’s business requirements and don’t inadvertently compromise them during revisions.

Finally, alert all relevant stakeholders to project developments.

Dedicate time to API testing

APIs are critically important to running applications because they allow the various involved components within an application to communicate with each other.

API testing focuses on API functionality and can weed out any logic-based problems before testers ever evaluate the functionality of the UI.

Enact multiple test executions

When you run multiple tests, you should take advantage of your system’s ability to multitask multiple tests by running tests in parallel. This method holds especially true for cloud-based testing configurations, but it’s good guidance across the board.

When you run tests in parallel, you cut down the amount of time needed for test execution, plus you enable quicker feedback from those tests.

Revisit and revise tests as needed

As we’re now constantly reminded, little in the computer realm remains the same for long. Things change and situations evolve, and so do applications. Because of this constant change, the work of testers is never fully finished.

It’s smart to revisit your E2E test cases periodically and see whether anything has changed that might negatively affect their analytical performance. 

AI meets E2E

Artificial intelligence (AI) is invigorating and revolutionizing nearly all aspects of computing. For E2E testing, the major benefits of AI are roughly like the advantages AI introduces to other forms of software testing. Basically, that AI makes E2E testing occur quicker, drives the process to become more efficient, and keeps applications better protected against errors.

Beyond these aspects, AI is assisting the E2E testing process by generating test cases based on application behavior and user flows. This approach includes “self-healing” tests that can correct themselves based on system recognition of UI changes.

AI can monitor tests in evolving apps and adapt those tests based on notable changes it perceives. And when it’s time to run those tests, AI can do so at hyperfast speeds. Furthermore, it can identify areas that might require extra follow-up testing.

For organizations wanting to avoid the hefty expense of on-premises infrastructure, there’s AI-imbued testing that can be run on the cloud. For companies engaged in software publishing, AI can help them run the needed software testing on a faster basis, thus enabling quicker product releases.

Finally, in contrast to prevailing notions about AI “taking over” any business activities, AI is making it easier for nontechnical users to engage in the testing process. It brings more people into the process through AI-powered tools that require less assumed knowledge on the part of testers.

Related solutions
IBM enterprise application service for Java

A fully managed, single-tenant service for developing and delivering Java applications.

Explore Java Apps
DevOps solutions

Use DevOps software and tools to build, deploy and manage cloud-native apps across multiple devices and environments.

Explore DevOps solutions
Enterprise application development services

Cloud application development means building once, iterating rapidly and deploying anywhere.

Explore application development services
Take the next step

Discover how teams are accelerating app modernization with generative AI. Learn how to evolve legacy stacks and improve performance across every tier of your architecture.

Explore app modernization Start building with IBM cloud