Mindmap
Unit Tests
Inhalt der Mindmap
Unit Tests
- When doing tests, you're focusing on one element of the software at a time -hence the common term unit testing-
Solitary Tests
- A solitary test does not care on other components of the app, they only care about the tested component. They uses test double objects to replace collaborators.
- Verifies behavior
- By setting expectations (expected method calls)
- by recording and replaying (expected methods and parameters calls)
- Two objects (elements) are involved: - Control Object: Replay Expectations, Validates, and more options. - Mock Object: Conforms the protocol (contract) required by the SUT. Sets Expectations
- Verifies State
- Test Doubles
- Test doubles are collaborators which are needed in the unit test, but they're not going to be tested.
- Dummy
- An object only used for parameters
- Fake
- An implemented object which it is NOT suitable for production
- Mock
- Pre-Programmed object with expectations about its methods calls.
- Stub
- An object which normally only answers of the tests
Sociable Tests
- Called sociable tests because they uses other components of the app to perform the tests
- Verifies State
are Made of
- Elements
- System-Under-Test (SUT) or Object-Under-Test (OUT)
- Object with the functionality to be tested
- Collaborators
- Object in the tests which are not being tested, but they're required by the test or by the SUT
- System-Under-Test (SUT) or Object-Under-Test (OUT)
- Sections
- setup (data/expectations)
- exercise
- Verification
- Clean up
- Elements
Considerations
- Driving TDD
- Fixture Setup
- Test Isolation
- Coupling Tests to Implementations
- Design Style
Informationen
- Beschreibung
- Mindmap am Unit Tests, erstellt von Herber Madrigal am 01/10/2015.
- Erstellt von
- Herber Madrigal
- Aufrufe
- 1
- Bewertung