The goal of integration testing is to check how system components work together. It is done at a higher level than unit testing, where individual parts are already tested separately.
Integration testing can involve two or more components.
The goal of integration testing is to check how system components work together. It is done at a higher level than unit testing, where individual parts are already tested separately.
Integration testing can involve two or more components.
As an example, let’s take a system made of three components:
Browser — a browser app for adding cookies
Storage — a service that stores cookie information
Quality Service — a service that checks cookie quality
It turned out that the component Quality Service is not ready yet, so to test the interaction between Browser and Storage we use a stub.
Stubs can be written by developers or testers.
Stub simulates the work of Quality Service and returns two possible responses:
Integration testing of the interaction between the browser and the storage, where a stub is used instead of the quality service, comes down to checking two main scenarios:
Positive scenario
Negative scenario
In the positive scenario, when two components integrate successfully, we expect the server to return an HTTP response with code 200 OK to the client’s request. But there are also other response codes shown in the table.
| Code | Description | Example | Comment |
|---|---|---|---|
| 1xx | Informational | 102 Processing | The request is being processed |
| 2xx | Success | 200 OK | The request was completed successfully |
| 3xx | Redirection | 301 Moved Permanently | The resource has been moved to a different address |
| 4xx | Client Error | 400 Bad Request 403 Forbidden |
The client’s request contains an error The client does not have permission to access this resource |
| 5xx | Server Error | 500 Internal Server Error | An error occurred on the server while processing the request |
The system under test consists of two components: client and server.
The frontend developer created the client part — “Form for sending an HTTP request”, and the backend developer wrote the logic on the server. They agreed on the rules for successful data exchange and aligned the API.
Perform integration testing of the client–server interaction.
Request format agreement:
Expected response in case of successful integration:
Уровень повышен!
Временное предложение
Премиум со скидкой!