
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 component 1 with component 2 (using a stub instead of component 3) comes down to checking two main scenarios:
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 |
---|---|---|
1xx | Informational | 102 — request is being processed (Processing) |
2xx | Successful | 200 — request completed successfully (OK) |
3xx | Redirection | 301 — resource has been moved (Moved Permanently) |
4xx | Client Error | 400 — client request contains an error (Bad Request) 403 — client is not allowed to access this resource (Forbidden) |
5xx | Server Error | 500 — server error occurred while processing the request (Internal Server Error) |
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.
Take the role of the client and check if the components work together successfully.
Request format agreement:
Expected response in case of successful integration:
Уровень повышен!
Временное предложение
Премиум со скидкой!