hands-scrolling-through-images-on-ipad-with-laptop-in-the-background
integration

End-to-end vs integration tests: what's the difference?

Posted by Brian Borg on Nov 19 2020

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

  • Integration testing starts at the very early stages of development. Bugs are caught earlier, rather than later, in the cycle.
  • End-to-end testing is done when the product is almost ready for release.
  • It's easy to integrate with daily builds and easy to test in the development environment.
  • It may be impossible to perform until the product is nearing completion.
  • Tests run faster compared to end-to-end tests.
  • Tests run slower compared to integration testing.
  • Aims to test how external systems work with internal modules, one by one.
  • Aims to test the user experience from start to finish.
  • Used to test a single process from third-party software that will be used in conjunction with your software.
  • Can be used for either a single process being executed from start to finish or various different processes involving different applications.

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.

integration testing end-to-end