What is an integration test?

605 views

I’ve recently become aware of a company that was running an integration test, but the test went out to all users in the production environment. What type of test is this?

In: Technology

5 Answers

Anonymous 0 Comments

Software application testing can generally be divided into four different levels. The lowest levels are easiest to automate, whereas the highest levels require human verification.

1. Unit tests.
This is the smallest level, where each component within a software application is tested **individually**, without relying on any other components. These tests are automated and can (usually) be run in a matter of seconds. In software, components often interact with other components. In the case of unit tests however, these other components are substituted with “fake” other components that always have the outcome one would expect if said component was working correctly. This process is called “faking”, “mocking” or “stubbing”.
*Example: if I press the Post-button, it should send the contents of my form to a (fake) form handler.*
2. Integration tests.
On this level, we’re testing how the **different components of a software application work together**. These tests can be automated, but usually take long to execute because they require multiple components to be up and running.
*Example: if I press the Post-button, it should send the contents of my form to a form handler, which should then store my post into a database and redirect me to a new page.*
3. System tests.
On this level, we’re testing our **entire application**. System tests are done in an environment that closely resembles the live (“production”) environment. They do not only verify that the application is functionally working correctly (this part may be automated), but also that it matches the (technical/functional/business) requirements set by the client/product owner. Testing at this level is preferably done by co-workers who were not directly involved with the development of a feature (Four Eyes Principle).
*Example: if I go to the comment section on the site, I can post a comment and be redirected to said comment, all according to the specs the client agreed on.*
4. (User) Acceptance tests.
The final level, in which the **client**/product owner determines if the application matches their **needs** and if it is ready to be released. If we pass this stage, the application is ready for deployment to production.
*Example: does the comment section match our needs and wishes? Was this agreed upon?*

I noticed some people mentioning regression tests (ensuring old features still work whenever a new feature is released). These aren’t so much a separate level, as they test a different scope *within* a level (old functionality vs. new functionality). Regression testing takes place on all levels.

System and integration tests are often mixed up. Integration tests are usually performed in a short-lived, containerized environment that is created on the fly and destroyed after the tests, whereas system tests are performed on a more long-lived testing environment. In your example, it is likely that someone messed something up in the config of a test environment and somehow used user data from a live/production environment.

You are viewing 1 out of 5 answers, click here to view all answers.