Tests must have a well defined output, which is valid or not, and this will pass or fail the test.
There must not be dependencies between tests, they must be able to be executed separately.
A test can be separated in 3 steps.
The definition of all necessary information to execute the behavior to be tested. (Data input)
Where you execute the behavior.
Where you compare the return information with the expected one. (Basically is the expect)
expect
Coverage in tests means the amount of code that the tests run on. It is not related to success or failure percentage.
success
failure
Last updated 1 month ago