End-to-End Testing Overview

End-to-end (E2E) testing is a type of testing that involves simulating a user's journey through an application. E2E testing is very useful for catching critical issues in your system before it gets in the hands of real end users. Let’s take a look at end-to-end testing and dive into the two main types: vertical and horizontal.

Purpose of End-to-End Testing

The goal of this form of functional testing is to ensure that the system is working properly from start to finish. By performing end-to-end testing, the tester is able to identify critical bugs and ensure an application works from start to finish.

End-to-End Testing Example

Let’s look at a car as an example. If you conduct an end-to-end test for a car, you are looking at the functionality from starting the car all the way to turning it off after a nice drive. When testing, you are looking at individual modules (starting the engine, shifting the gear into drive, turning the wheel, slowing down, etc.) and ensuring that the car works properly when transitioning between modules.

Furthermore, you are understanding the relationship between each module and its effect on one another. For example, if the car is in park and you press the gas, you don’t go anywhere. However, once you put the car into drive, you can then press the gas and the car will move.

You, the test driver, operate the car as a real-world user would, in order to ensure all use cases are fully operational.

If all parts of the car work from the start of your test drive to when you pull back into the garage, and you've had a seamless driving experience, then you've performed a successful end-to-end test.

Horizontal vs. Vertical Testing

When it comes to software E2E testing, the two methods that are commonly used are horizontal and vertical. While both methods of approach are viable, horizontal testing is more common for more complex software than vertical, since horizontal testing covers the user experience across multiple applications.

Horizontal

A horizontal E2E test is when user flows are verified across multiple applications, from start to finish; it is going to ensure that every process and relationship between applications is working properly.

With horizontal testing, you need to be sure that all environments are set up and everything is ready to go. Since you are testing across all applications, it is a requirement to have all applications functioning. So, while this method is very comprehensive, it may not be the best fit if you aren't far enough into development itself.

The beauty of horizontal testing is that you are going to be testing from the user's perspective. If you are able to navigate the site and interact between all applications without any errors, then you have completed a successful horizontal E2E test.

Vertical

Thinking vertically (up and down), a vertical test is going to focus on each layer of an individual application. So, rather than testing across applications, you are testing within a single system. Vertical testing requires diligence, as you must begin at a very granular level until you eventually are able to reach the user interface or API layer of an application itself.

As you are maintaining your testing within a single application, it is important to be prepared with testing or development strategies to ensure you are structured as to how you approach your testing. Whether you choose unit testing, continuous testing, or behavior-driven strategies, it is important to stay consistent.

With vertical testing, you are going to ensure that you cover the entirety of a single application. You will be able to test more quickly than horizontal, as you are working with one application, rather than many.

Automation in E2E Testing

One of the most common strategies for E2E testing is to use some form of automation. Both horizontal and vertical E2E testing are extremely time consuming, yet repetitive tasks, making them prime targets for automation.

Using a tool like Selenium or Cypress, you can write "scripts." Each script will be a different user flow that your application should support. For example, you might have a script for client payment that simulates the behavior of a client user trying to submit a payment through your application. Since most fairly complex platforms will have many scripts, or user stories, running E2E tests manually can take days.

With these automation tools you can run your entire suite of E2E testing scripts in minutes. Plus, tools like Cypress even offer recordings of the simulated user actions so if something goes wrong, you can watch the recording and see exactly where something failed.

For MVPs with relatively small feature sets, we recommend hiring a QA resource to perform your end-to-end tests. But once your application begins to scale up its features, we strongly recommend taking the time to implement an automated E2E testing tool.

E2E Testing Goal

Ultimately, the goal of E2E testing is to simulate real user experiences on your application. Proper E2E testing can be crucial for finding bugs or potential issues before live users encounter them.

We hope our overview of end-to-end testing methodologies and tools was helpful. Still have questions? Email us at resources@aloa.co and we’ll get back to you.

The views expressed in this post are the writer's and do not necessarily reflect the views of Aloa or AloaLabs, LLC.

Ready to learn more?

Running a business is hard,
Software development shouldn't be ✌️

or call  (615) 505 4255