REFACTOR THE TESTWARE

From Test Automation Patterns
Revision as of 08:00, 28 June 2018 by Seretta (talk | contribs)
Jump to navigation Jump to search
.................................................................................................................Main Page / Back to Process Patterns / Back to Test Automation Patterns

Pattern summary

Testware must be refactored regularly just as application code.

'James Tony': Tests have technical debt too! It may be harder to measure than the technical debt of the code being tested, but cutting corners when writing tests can lead to a build-up of technical debt that can slow you down to a crawl in the future

Category

Process

Context

Use this pattern for long lasting automation projects in order to keep maintenance costs low. For short lived solutions you will not need it

Description

Refactoring means that scripts and test data should be checked regularly:

  • are the automated test cases still valid and useful? .
  • can the automation scripts be improved?.
  • can similar scripts be merged?
  • is the data up to date?
  • is the documentation up to date?
  • is the technical implementation as efficient as it can be? For example, wait times, communication methods etc. See article mentioned under Experiences below.

Implementation

After you have determined what should be refactored schedule when to execute the updates and control that they get done:

Potential problems

Refactoring will often be postponed when a project is running out of time. Be careful not to build up too much technical debt

Issues addressed by this pattern

AUTOMATION DECAY
DATA CREEP
OBSCURE TESTS
REPETITIOUS TESTS
SCRIPT CREEP

Experiences

I recently came across an article on LinkedIn by Bhushit Joshipura, called "Efficient Running of Test Automation". He describes a series of technical "fine-tuning" that enabled him to reduce the execution time of a set of automated tests from 4.5 hours to less than 1.5 hours. A good example of technical re-factoring. You can read it here:
linkedin

If you have used this pattern, please add your name and a brief story of how you used this pattern: your context, what you did, and how well it worked - or how it didn't work!
.................................................................................................................Main Page / Back to Process Patterns / Back to Test Automation Patterns