Integration Tests – What Is an Integration Test Exactly?

integration-teststerminologytesting

My friends and I have been struggling to classify exactly what is an integration test.

Now, on my way home, I just realised, that every time I try to give a real world example of an integration test, it turns out to be an acceptance test, ie. something that a business person would say out loud that specs out what the system should be delivering.

I checked the Ruby on Rails documentation for their classification of these testing types, and it's now completely thrown me.

Can you give me a short academic description of an integration test with a real world example?

Best Answer

At the moment I like this statement : "It’s not important what you call it, but what it does" made by Gojko Adzic in this article.

You really need to specify with the people talking about the tests what you intend to test.

There are a lot of people having different views, depending on what their role is.

For testers a general accepted test methodology in the Netherlands is TMap. TMap makes the following distinction.

  • unit test
  • unit integration test
  • system test
  • system integration test
  • acceptance test (all kinds/levels)
  • functional acceptance test
  • user acceptance test
  • production acceptance test

They have more specific kind of tests that can be performed within the above mentioned tests. Look at this word doc for an overview.

Wikipedia also has a nice overview.

The book the pragmatic programmer says:

  • a unit test is a test that exercises a module
  • integration tests show that the major parts of a system work well together

Looking at these different sources and putting in some of my own experiences and opinions I would start by making distinctions by three categories

  • who does the testing in general
  • what is tested
  • what is the goal of the test

    • Unit test: test logic in classes by programmers to show code level correctness. They should be fast and not dependend on other parts of the system that you don't intend to test
    • Functional acceptance test: test use case scenario's on a limited (specially created) data set done by the test department to show that every specified scenario works as specified.
    • User acceptance test: test use case scenario's on production like data done by representatives of the users to make them formally accept the application
    • Integration test: Test communication paths between different parts of the module done by the test department or by developers to show that all modules work correctly together.

My list above is just a start and a suggestion but I really do think: "It’s not important what you call it, but what it does"

Hope this helps.

26-10-2016 Edit: Just recently a very nice introduction was placed on YouTube Unit tests vs. Integration tests - MPJ's Musings - FunFunFunction #55

Related Topic