[go: up one dir, main page]

DEV Community

DEEPIKA K
DEEPIKA K

Posted on

End-to-End Testing: What, Why and How?

Considering the present scenario, software applications are built on various layers of code, subsystem networks, and third-party integrations. The whole system has become so complex, that even if one component fails, the entire product crashes.

Hence, the importance of the stability of each component in the application system is vital for the success of the overall product. That’s where end-to-end testing comes into play.

What is End-to-End Testing?

End-to-end testing is a methodology which is used to verify that the functionality and performance of an application flow match the expectations from start to end.

Generally, end-to-end testing is executed after performing functional and system testing. The main objective of carrying out end-to-end testing is to make sure that correct information is being passed between various systems, components, networks, interfaces, and databases.

And that the integrated components in an application function as per the expectations.

Different End-to-End Testing Methods

End-to-end testing is performed in two ways which includes:

1. Horizontal End-to-End Testing: It works from the user’s perspective. It goes through an application’s business login from start to end. It is performed once changes to systems or subsystems are complete.

2. Vertical End-to-End Testing: This type of testing tests an application’s architecture in layers or in other words - the tests happen sequentially from top to bottom. Under this, each subsystem or component is tested independently from start to finish.

Vertical end-to-end testing helps achieve higher test coverage as each component is tested with a special focus. If there is a layer that does not have a user interface, then vertical testing is the recommended testing for it.

Alt Text

PC:https://stackoverflow.com/questions/19378183/difference-between-system-testing-and-end-to-end-testing

Benefits of End-to-End Testing

Here are some of the benefits of end-to-end testing:

1. Expands Test Coverage: End-to-end testing helps achieve increased test coverage which mitigates risk and ensures a quality software release.

2. Validates Software Functions: End-to-end testing validates all the given software functions at every level on multiple systems and ensures that the end user experience is working as per the expectations.

3. Enhances Application Productivity: End-to-end testing ensures that all components communicate in expected ways with each other. This way, all bugs that could hinder a user are detected and corrected faster. Thus, helping increase application productivity.

4. Reduces Effort and Costs Significantly: When done regularly and before the release, end-to-end testing helps catch bugs earlier, before the change is deployed in production. Thus, saving time and cost of fixing those bugs in production.

5. Ensures Interaction Accuracy: As end-to-end testing also involves front-end testing, it ensures that the application behaves as expected with a consistent user experience across multiple platforms, devices and environments.

6. Reusability of the Test Cases: End-to-end testing can be used to execute tests that are repeatable during the different processes of an application’s development cycle. Thus, end-to-end are reusable test cases too, usually.

7. Easy to Locate Errors in Distributed Environment: End-to-end testing allows testing an application on cloud environments easily too.

8. Reduces Future Risks: As an application is tested thoroughly after every iteration and sprint in end-to-end testing, the chances of failure and future risks gets diminished.

9. Build Confidence in the Application: End-to-end testing increases confidence in the functioning and performance of the application as the application goes through a comprehensive testing of the user flows at different points across different platforms and devices before its release.

How to Create End-to-End Test Cases?

End-to-end test cases can be classified in three parts:

End-to-end testing involves testing the user flows from start to end.

Thus test cases can be created by following below steps:

  1. Go through all the business requirement specifications

  2. Go through all acceptance criterias

  3. Based on steps 1 and 2, construct all end-to-end user flows/journeys and mark them as test cases

  4. From the test cases created in step 3, also see what would happen if the user did something unexpected - like entering wrong data, clicking on something by mistake etc and create all edge scenarios

5.Figure out what test cases might need different types of data for testing and arrange that

6.Figure out what all environments - devices and browsers would be needed for test execution and mark test cases accordingly

How to Perform End-to-End Testing?

End-to-end testing can only be done once all the components are ready for testing and are communicating with each other. Usually, by this time, testers are ready with the test cases.

There are two different approaches to doing this testing:

Manually
Automated

For horizontal end-to-end testing, manual testing makes sense the first time this testing is done for a product. This is because automated testing is beneficial only when the product is stable and is known to work as expected.

Above statement does vary in case of vertical end-to-end testing, such that unit testing can be done by the developer along with other development tasks. And then the integration tests and the end-to-end tests can be executed manually.

Now let's break down the above steps when you have to do manual testing and then automate those test cases too.

  1. Execute all the positive end-to-end test cases

  2. Execute all the negative and edge cases

  3. Make sure that the test cases are executed on all environments - devices and browsers that your target users might be using

  4. Make sure to report all the bugs and discrepancies found, as soon as they are found

  5. Once all the reported bugs (at least the major ones) have been fixed and verified, run all the end-to-end test cases once again and repeat steps 1 to 3

  6. If the product is majorly stable, start with test automation. But before that mark the test cases that you will automate first. Start with automating the test case that is the main user scenario. This ensures that the main user scenario is executed every time there is a change. And, any discrepancies are reported sooner rather than later

  7. After that automate other test cases and scenarios that are supposed to remain stable and unchanged in future. Always start with automating the high priority test cases first.

If you don’t have a test automation setup yet and you are looking for one then here is an article that can help you choose a test automation tool that will suit you - 10 Points to Help You Choose the Right Test Automation Tool

Top comments (0)