![]() |
Pattern 6: Automate testing *** |
| Back to Diagram 1 - Getting started | Back to Diagram 2 - Useability | Back to Diagram 3 - Adding detail | Back to Diagram 4 - Workflow/security |
|
View
sensitizing image - Diego Riveira mural |
You are using TIMEBOXES (4) and GRADUAL STIFFENING (5) to manage
the project.
This means frequent changes and refactoring of code and design. How do you control the costs of such changes
while maintaining quality and usability?
Therefore
Refactor continuously. Use automated test tools wherever possible. Make sure that you apply the tests to
all browsers that might be used, including TWO-YEAR OLD BROWSER (10) versions
for public sites. Retest at every incremental change to the code or layout and RETEST
WHEN CONTENT UPDATED (9).
You just cannot test things like left/right button usage consistency or many other aspects of usability automatically.
Therefore do USABILITY TESTING (7) and GET-IT? (8) tests early
in the project and after each significant refactoring.
This is another process pattern that could apply equally well to non-web projects.
It is a principle of XP that if testing is good, then everyone should test all the time. XP is thus said to
be test-driven and defines simplicity as ‘just enough code to make all the tests work’. Unit tests and key-task
tests should be based on known use cases. XP also uses the output from its short cycles to refactor code. Examples
of refactoring include creating a superclass to abstract common features, creating new plug-points, splitting classes
or methods into two, and renaming components to be more descriptive. Refactoring HTML might involve introducing
cascading style sheets, removing frames, changing the SITE MAP (12) or changing the navigation.
Doing all these things frequently relies on the presence of automated testing tools, of course.
Fowler (1999) describes well the techniques necessary for refactoring code. Dynamic binding technology, like that
supplied by MetaDyne, makes refactoring in real time possible.
For regression testing a number of tools is available. There are now some products that automate stress testing
such as SafeTest (www.attenda.com). For Java work many companies currently use Junit for unit testing and Ant (which
I understand is free) for integration tests. Junit and Ant are described well at:
www-106.ibm.com/developerworks/library/j-ant/
| Browse the language | What is Wu? | Look at an example pattern sequence | Structure of the patterns |
| Comment on Wu | Contributors | Return to TriReme home page | Links to related sites |