Test Driven Development and Refactoring Techniques

Three-Day Course Outline

Introduction

Craftsmanship – What this course is really about
Attitude
Keeping Code Clean
The Iterative Development Cycle
The Safety Net of Automated Tests
Design Evolution
Code Rot
The Two Values of Software
Form and Function

 

Refactoring

The Purpose of Refactoring
The Rules of Simple Design
  Taking Small Steps
When should you Refactor?
What skills are needed?
Code Smells
The Single Responsibility Principle
Names
  Method Names
  Class and Interface Names
  Name related Refactorings
The Rubicks Cube Analogy
When NOT to refactor
Test Coverings
Performance

 

Test Driven Development

The Three Laws of TDD
The Litany of Benefits
  Debug Time
  Change with Immunity
  Documentation by example
  Isolation of modules
Craftsmanship and Professionalism
  Test Coverage
Instructor Demo
  What does this really look like?
  Sneaking up on a simpler solution
  Introduction to JUnit
The Development Cycle
Focus on the interface
Exercise

 

Test Doubles

Testing a System of Objects
Mock Objects
Fakes
Stubs
The Self-Shunt pattern
Exercise
Mock Object Tools

  JMock

  EasyMock

 

Testing GUIs

The Humble Dialog
Model-View-Presenter
Thin GUIs
Web GUIs

 

Summary

It’s really about design
Productivity and Predictability
The demise of debugging
TDD in your group

 

Automated Acceptance Testing

The Role of QA in an Agile Environment
The Definition of Done
Separate Core System Logic from Execution Environment
Iterative Specification

 

FitNesse: An Open Source tool for Test Automation

Wiki
Tests
  Fixtures provide link between tests and SUT
  Action Fixture
  Column Fixture
  Row Fixtures
  Do Fixture
  Table Fixture
Using FitNesse in your organization
  Configurations

 

Conclusion

Review of main topics
Q&A Informal Discussion
Close