Relevance, Inc.

Google
Custom Search
  • Development
  • Audits
  • Training
  • Clients
  • Open Source
  • Books
  • Jobs
  • About
  •  Blog

Test-Driven Development in Java (A Relevance, Inc. Training Offering)

Training > Agility

Mark Twain said, “Everyone talks about the weather, but nobody does
anything about it…” Do you feel the same way about unit testing your
software? It’s easy to talk about the importance of testing, but it’s
another thing to actually do something about it. If you are ready to
take the next step forward, instructor Scott Davis can show you how
natural and enjoyable it is to let the tests drive your software
development process.

But what if you haven’t been testing all along? What if you don’t have
100% test coverage (or even know what that means)? This class places
special emphasis on testing your existing codebase as well.
We’ll talk about refactoring large, unwieldy, “untestable” classes
into more manageable pieces. What you’ll end up with is a highly
cohesive, loosely-coupled application that is not only easier to test,
but better architected at the same time.

Course length:

2 days

Class size:

Up to 18

Supplied Materials:
  • Working Effectively with Legacy Code
  • Course CD
Prerequisites:
  • Experience in Java
Setup:

Students:

  • Computer with Java installed
  • TDD or BDD framework of student’s choice
  • Editor or IDE of student’s choice
  • Internet access

Instructor:

  • Computer with Java installed
  • Projector

Module Outline

1. Why Test?

  • finding problems early (and cheap)
  • getting past the excuses
  • building for today
  • engineering rigor
  • why agile works

2. XUnit Frameworks

  • tests
  • assertions
  • setup and Teardown
  • running Tests
  • writing FAIR Tests

3. BDD

  • executable documentation
  • testing at multiple levels
  • common vocabulary for all team members
  • stories
  • behaviors

4. Test Coverage

  • the need for coverage
  • types of coverage
  • running coverage reports
  • using coverage reports
  • other metrics

5. Refactoring

  • DRY code
  • intentional code
  • cohesive code
  • code smells
  • how to refactor
  • common refactorings

6. Mocking

  • isolating code with stubs
  • testing behavior with mocks
  • writing mock-friendly code
  • letting mocks improve your design
  • when it gets to be too much…

7. Refactotum

  • contributing to open source
  • working on your own code
  • using tools and metrics to find problems
  • test-driven refactoring

Justin Gehtland helping attendees at a tutorial at RailsConf 2008.

Justin Gehtland helping attendees at a tutorial at RailsConf 2008.

Photo courtesy James Duncan Davidson. Used with Permission.

200 North Mangum Street Suite 204 Durham, NC 27701
phone 919.442.3030 fax 866.577.4607 info@thinkrelevance.com

Related Links

  • interview on feedback loops 03/03/2009
  • how do you know pairing works? 02/10/2009
  • agile: from tactics to strategy 02/04/2009
  • javacript testing with screw.unit 01/31/2009
  • it's ok to break the build! 01/22/2009
  • fiveruns conversation with glenn 12/01/2008
  • glenn and josh on dynamic languages, testing 10/10/2008
 
    • About
    • Development
    • Blog
    • Audits
    • Books
    • Training
    • Jobs
    • Clients
    • Open Source
    © Copyright 2008, All Rights Reserved Relevance Inc.
  • See Us Speak
  • Contact Us
    200 North Mangum Street Suite 204 Durham, NC 27701
    phone 919.442.3030 fax 866.577.4607 info@thinkrelevance.com