• Presenters: Vera Peeters
  • Type: ipresentation + workshop
  • Duration: 90
  • Audience: preferably you have some experience with any one of the XUnit frameworks
Objectives

Explore the concept simple design, and apply this idea to a well known framework.

Abstract

When can we say that a design is simple and good?

A nice and easy checklist (Kent Beck's white book) is that the code has to

  1. run all the tests
  2. communicate everything
  3. contain no duplication
  4. contain a minimum number of classes and methods
Another idea in the agile philisophy is that you should never implement features that you think will be useful later, but that you don't really need right now. It is definitely not forbidden to think about those features now, and to assure yourself that you don't paint yourself in a corner. But you don't want to burden the living design with hooks for future whistles and bells.

How does JUnit, or any one of the XUnit frameworks behave if we look at them from this perspective? Does this depend on your own environment, on your own requirements? Is it better to use an existing framework or utility? Is it better to write and control the utilities you need yourself? When does a framework become a standard?

The session starts with a short presentation. Afterwards, there is a group excercise, "My own minimal framework". This excercise starts from real life situations where attendants are currently using tools and frameworks to support unit-testing. From these real life situations, they will explore their actual needs, and they will be able to analyze the pro's and con's of the choices they have made in the past.

Benefits of participating

You will reflect on

  • Why and when do you use existing frameworks?
  • Why and when do you use house-grown utilities?
  • Why and when does someone else use existing frameworks?
  • Why and when does someone else use house-grown utilities?
What will the organisers learn

I will reflect on

  • Why and when do I use existing frameworks?
  • Why and when do I use house-grown utilities?
  • Why and when does someone else use existing frameworks?
  • Why and when does someone else use house-grown utilities?
Session Outline

  • Simple design (5 min)
  • JUnit 4.1 (5 min)
  • XUnit (5 min)
  • Need-driven design or Featurism (5 min)
  • Minimal test framework (5 min)
  • Flexibility and complexity (5 min)
  • My own minimal framework (groups) (60 min)
    • List stories: which unit test frameworks do you use? (5 min)
    • form groups (5 min)
    • tell stories in group (10 min)
    • select 1 story --> analyse
      • features actually used? (5 min)
      • unsupported needed features? (5 min)
      • unnecessary complexity? (5 min)
      • solution? (10 min)
    • present stories to group (15 min)