Automated Tests
Tests must have a well defined output, which is valid or not, and this will pass or fail the test.
Structure
A test can be separated in 3 steps.
Given (Arrange)
The definition of all necessary information to execute the behavior to be tested. (Data input)
When (Act)
Where you execute the behavior.
Then (Assert)
Where you compare the return information with the expected one. (Basically is the expect)
Coverage
Coverage in tests means the amount of code that the tests run on. It is not related to success or failure percentage.

Last updated