Answer the question
In order to leave comments, you need to log in
What is the name of testing the method of a real request to the backend?
What is the name of testing, in which a real automated HTTP request is made to the backend, and then it looks, firstly, the response from the server, and secondly, the state of the storages. For example, we make a request to create a new comment on an article. Then we check, firstly, that the response has the correct HTTP status and the correct response body, and secondly, we climb into the database and check that the commentary was really created there, in one copy, to the desired article, with the desired text, etc. .
Answer the question
In order to leave comments, you need to log in
This is not a unit test!
This is an integration test.
A unit test tests one aspect of one part.
The integration test will check several parts .
You have several parts:
1. The part of the backend that understands HTTP
2. The part of the backend that gets into the database
3. The part of the backend that generates the response
4. The part of the backend that sends the response via HTTP
Roughly speaking, if the test cannot clearly say where exactly it went wrong and only gives a direction where just dig, then you observe the integration.
see two tests:
1.
test_sum_a_and_b() - Failed
2.
test_login() - Failed
In which of these two will you quickly figure out where to fix and what to fix and why to fix?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question