Task: Automate Customer Test
Purpose
  • Transform the acceptance criteria of a user story into executable form.
Relationships
RolesPrimary Performer: Additional Performers:
Outputs
Steps
General

XP teams represent detailed requirements as automated customer tests. Automating the tests insures they are detailed, unambiguous, and executable. Typically, each acceptance criteria is translated into at least one automated test.

There are lots of ways to do this:

  • For a batch program reading inputs and producing outputs: create test input files, capture actual output, and compare it against expected output.
  • Write functional tests as programs. You can use a unit testing framework as a base or create a little scripting language the programmers can use.
  • Allow the customer to easily specify tests (spreadsheets, flat text files) and create a small tool to read the input and expected output. The tool runs the input against the system and checks that the actual output matches the expected output.
  • Build an input recorder to allow customers to define the tests.
  • Use simple file-based tools to check the results.

It is important to build the automation simply and incrementally as you need it. It is too easy to lose control and invest too much time in test automation instead of business value. Don't overdo it.