Answer the question
In order to leave comments, you need to log in
Is it correct to cover every parameter of JSON REST api with tests?
Short question:
There is a JSON API with 30 parameters. If you apply a per-field threshold + tests for the absence of each required field + 1 test for only required fields + 1 test for all fields at once, you get more than 100 tests.
1) Is it normal for manual testing? If not, what is the best way to limit it? Unfortunately, the choice here does not depend on me.
2) Is this normal for automated testing?
3) Did I miss something?
In detail with an example and a description of the tests:
Answer the question
In order to leave comments, you need to log in
1) Is it normal for manual testing? If not, what is the best way to limit it? Unfortunately, the choice here does not depend on me.
1. For each method, all regex expressions are prepared and checked for the correctness of the selection for the expected input data according to the "white" list (this applies not only to the API, but to everything):
parameter1 -> regex expression1
parameter2 -> regex expression2
etc.
2. These expressions are added to their methods, according to the correspondence table.
3. Each method is checked to ensure that the response with incorrect input data contains all the necessary information to understand what is happening.
4. Then 2-3 times run the entire process of the business logic with this API.
5. Everything is OK - you can "chat".
Writing more than 100 tests is not such a problem if the tests themselves are structured, such as making base / derived tests there, etc.
True, if you get carried away, you may need to test the tests themselves.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question