Description
This course introduces Java developers to the tools and
techniques
involved in Test Driven Development. The course is workshop based, with
delegates spending the majority of their time applying the techniques
they have learnt to sample applications.
Normally the course is delivered using JUnit,
TestNG, JMock, Eclipse, Ant and Spring - but other tools and IDE's can
be used if required.
Prerequisites
Delegates should be experienced and confident Java
developers.
List of Modules
Core Concepts
The evolution of TDD
from XP
Defining your intent
through tests
Writing just enough
code to pass
Adding tests and
refining the code
Testing up to the
point of boredom
Triangulating on hard
problems
Refactoring the
working code
Refactoring the test
cases
Building a suite of
test cases
Tooling up for TDD
Choosing between
JUnit 4 and TestNG
The architecture of
JUnit and TestNG
Automatically
triggering unit tests from ANT
Displaying test
results in HTML via stylesheets
Writing your own unit
testing tool in Java
Integrating unit
testing into your build process
Generating metrics
for test coverage and quality
The TDD Philosophy in Depth
Moving up and down
the gears
You aren't going to
need it
Finding the simplest
solution
Devaluing up front
architecture
Agreeing on common
standards
Providing an escape
route
Refactoring in Depth
Refactoring as the
second hat
Refactoring is
essential to TDD
IDE support for
refactoring
Refactoring to keep
the code alive
Detecting smells in
code and tests
The most productive
refactorings
Adding Refactorings to Eclipse
The architecture of
the Eclipse framework
The structure of a
simple Eclipse plug-in
Generating an AST
from the current code
Applying refactorings
as Visitor objects
TDD and Software Processes
Common objections to
TDD
Obstacles to
deploying TDD
Using TDD with agile
processes
Using TDD with heavy
processes
Unit Testing and Mock Objects
Problems testing
classes with dependencies
Using mocking to
replace dependencies
Different types of
data collection in mocks
Errors and Crash Test
Dummy mocks
Using the test as the
mock (Self Shunt)
Automatically
generating mock objects
Mocking databases and
Web Services
Dependency Injection and Spring
Externalizing
dependencies using Factories
Dependency Injection
and Inversion of Control
Using Spring to
manage class dependencies
Using Spring to
facilitate mocking
Adopting Test Driven Development
Determining if TDD is
right for you
Designing a trial
project for TDD
Suggestions for
encouraging TDD
Metrics which can
validate TDD
TDD and maintaining
legacy code
For details of this
training product please contact us
now: