The terms 'end-to-end' and 'integration testing' seem to have a lot of people in the software testing world conflicted. We've trawled the internet and found many different opinions, so we thought we'd compare the two, provide some context and create a definitive guide.
What is end-to-end testing?
End-to-end testing verifies that your software works correctly from the beginning to the end of a particular user flow. It replicates expected user behavior and various usage scenarios to ensure that your software works as whole. End-to-end testing uses a production equivalent environment and data to simulate real-world situations and may also involve the integrations your software has with external applications.
According to Atlassian, 'they're comparatively more expensive to perform and require regular maintenance when automated.' They recommend 'having a few key end-to-end tests and relying more on lower level types of testing to be able to quickly identify breaking changes.'
What is integration testing?
A typical software project consists of multiple software units, usually coded by different developers. Integration testing combines those software units logically, and tests them as a group.
Essentially, integration testing verifies whether or not the individual modules or services that make up your application work well together. The purpose of this level of testing is to expose defects in the interaction between these software modules when they are integrated.
Key differences
Both of these types of testing sit further up the agile testing pyramid than unit or component testing. When testing your products, you'll have to decide which tests you want to run. The decision will depend on budget and on the aspect of your application that you're testing. The answer will change on a case-by-case basis, so it's best to know a bit about your choices and the differences between them.
Integration testing |
End-to-end testing |
|
|
|
|
|
|
|
|
|
|
Which test do you need?
The answer is, it's very rarely one or the other — sorry it's not more straightforward.
Google's testing blog suggests a 70/20/10 split between unit, integration and end-to-end tests is a good, general rule of thumb. If a project has large number of integrations, it should have more integration tests. And, if you've got a huge amount of complex user interfaces, you'll probably need more end-to-end checking. The right mix will depend on the nature of your project.
If you're still struggling to decide whether you need end-to-end or integration testing, we'd be happy to lend a hand. Check out our blog for more information on different types of testing methods or get in touch to discuss OnPath Testing services.