Answer the question
In order to leave comments, you need to log in
How to name integration tests?
How to name integration tests? Here are the names of unit tests to give more or less clear. For example, "sum_two_numbers" is the sum of two numbers, and so on with slight variations.
But how to give names to integration tests, where there are a bunch of different conditions and situations, is not clear.
Answer the question
In order to leave comments, you need to log in
Moved the comments to a separate answer.
"for example, a script for issuing books to a reader for a subscription."
Divide the tests into 3 groups
Positive: where a book is successfully issued / several books for different periods
Negative: all of your listed + failures of the database, services, an empty answer, etc.
Validation: where issuance requests are made incorrectly, arguments are not passed, etc.
in such cases there should be no changes in the database.
An example of rentBook_negative_cases
naming:
-rentedByOtherCustomer
-cannotRentAgeStrictedBook (positive is also a case when we can give out this book)
-bookRentOverlimit
Generalize. Select direction.
If this is a test of everything and everything, then do not name it in any way (especially since this is already a different type of testing). Otherwise, in general, formulate for yourself what exactly is included in the test compared to what is not included in it. That is, what distinguishes this integration test from another integration test (of the same product).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question