Day 1
Morning
Code exercise to make sure that everybody’s development environment is working and to assess the group’s knowledge of unit testing and testing techniques.
A dive into the core competencies in study groups of 2-5 people.
Lunch
The landscape of developer testing
- Background, concepts and motivation
- Relation to traditional testing and agile testing
Unit testing
- Naming
- Arrange/act/assert
- Lifecycle
- Matchers
The first exercise is revisited and the test code gets improved.
Afternoon
Testability and its drivers
- Observability, controllability, smallness ()
- Indirect input/output
- Temporal coupling, state, domain-to-range ratio
Fundamental testing techniques:
- Boundary value analysis and equivalence partitioning
- Truth tables and state transition testing.
Programming by contract (if time permits)
Day 2
Morning
Test doubles and dependencies
- Stub, Mock, Spy, Fake, Dummy
- Mocking frameworks
- Dependencies: Constructor injection/Setter injection/factory method override
Exercise to practice the above adjusted to fit each study group’s level.
Lunch
Classic test-driven development
- The TDD cycle: Red-Green-Refactor
- Red to green patterns
- Test order
Exercise that can be remade to fit London school TDD for advanced participants
Afternoon
Wrap up and air cushion if some part of the training took an unusual amount of time.
Remaining participant questions.
If time permits, optional topic like SOLID, BDD, London school TDD, duplication, more complex tests, etc.
Legend
Exercise in study groups Hands-on coding exercise