Introduction to automated testing
Tests guarantee quality, detect errors, facilitate maintenance, accelerate development with continuous integrations and secure deployments.
Types of tests
- We will focus on Unit tests
- Integration
- End to End
Unitary
- Unit tests have to be atomic
- It is recommended not to have dependencies on other components
- They must be specialized in the piece we are testing
Integration
- How do the elements work together?
- They should not be greater than the unitary ones
End to End
The user managing the application
- Isolated flow
- Specific objective
- Proof of improbable cases
Triple A
Arrange - Imports and initiations, that is, arranging everything
Act - Apply stimuli, call methods, simulate clicks or events
Assert - What should have happened? expect()