This is a intense, hands-on and exercise driven Advanced Test Driven Development course is written and delivered by Uncle Bob Martin and focuses on the design of clean, robust, and maintainable unit and acceptance tests. You will learn the principles of test design, and the practices of keeping tests clean. More importantly, they will learn the principles of designing applications for testability. Exercises include the refactoring of bad tests, the writing of clean tests, and the design and refactoring of applications to make them testable.
This three-day hands-on Advanced Test Driven Development will explain the principles and practices of Test Driven Development as described in Agile Software Development, Principles, Patterns, and Practices
by Uncle Bob. You will also receive this book as part of the course materials.
Exercises are in Java, but are applicable to C#, C++, and other object oriented languages.
Day 1
Moderated Discussion of:
- Fears, concerns, confounds & blockages
- Professionalism, Clean Code, and TDD
- Push-back: What Managers really want.
Why TDD?
- The Three Laws of TDD.
- Understanding the Costs and Benefits.
Clean Tests
- Test Smells
- Multiple Logical Asserts
- Accidental Complexity
- Too Slow
- Scope Too Wide
- Slang
- Cleaning Tests.
- Composed Asserts
- Composed Results
Testing Behavior vs. State
- Mocking and Stubbing
- Ontology of Test Doubles
Exercises
- Initial Setup.
- Coverage
- Critiquing some good and bad tests.
- Cleaning Tests
- Review The Presenter Model for UI testability.
Coding Dojo
- Group Exercise
- TDD under the microscope.
Day 2
F.I.R.S.T Principles.
- Making Tests Fast.
- Database Isolation
- Web Container Isolation
- Impact Analysis
- Isolating Tests
- Repeatable Tests
- Hosting, Mocking.
- Test Hierarchies.
- Self Validating Tests
- Testing Tools, the good and the bad.
- Timely Tests.
Test Conventions and Heuristics
- Naming Conventions
- Statistical testing.
- Principles of Test Encapsulation : Testing Private Methods.
- Testing Inheritance Hierarchies
- Test per Class
- Splitting Test Files
Writing Maintainable Tests.
- The Fragile Test "Problem"
- Interface Sensitivity
- Abstract APIs.
- Behavior Sensitivity
- Data Sensitivity
- Context Sensitivity
- Over-specification
- Sensitive Comparison and Equality
- Test Sensitivity
Preserving Tests
- When are Tests Discarded.
- Solutions.
Exercises
- Fitnesse
- Wiki
- Tests
- Fixtures
- Setup.
- Acceptance Tests Smells
- Critiquing Acceptance Tests.
Day 3
Metrics
- Coverage
- Combining Cyclomatic Complexity and Coverage
- Brathwaite's Correlation
- Wall Metrics.
S.O.L.I.D. The Principles of TEST design.
- How the principles of OO are used to design good tests.
Static Analysis Tools
Behavior Driven Development (BDD)
GUI Testing
- Testing Through The GUI
- Testing Around the GUI.
- Stubbing the GUI.
- Stubbing the applications.
The Levels of Testing
- The Dilemma of Manual Testing.
- Unit Tests
- Component Tests.
- Integration Tests.
- System Tests.
- Exploratory Tests.
Functional and Performance Testing.
Legacy Code.
Convincing Others.
Exercises
- Refactoring applications to Separate GUI
- Testing the GUI separately
- Applying the Principles
- Applying the Levels