Tuesday, March 29, 2016

What makes a good test?

In agile development, the team is responsible not only for development, but also for testing. However, many developers are challenged with the notion that not just any test is a good test.
Here is a fairly comprehensive list of criteria which good tests meet:

  1. Valid: It measures what it is supposed to measure. It tests what it ought to test.
  2. Clear: Test instruction and test objective should be clear.
  3. Comprehensible: The language of the test should be comprehensible to the reader.
  4. Relevant: It appropriately and accurately covers a significant portion of the Object Under Test. 
  5. Focused: It should do one, and only one thing (“Single Purpose Principle”).
  6. Detailed: Failure conditions should be sufficiently specific to discover the source of the defect. 
  7. Practical: It is easy to conduct and requires a low amount of preparation.
  8. Fast: It should take only an insignificant amount of time.
  9. Efficient: It only consumes a reasonable amount of resources.
  10. Unique: For one specific attribute of the software, there is only one test.
  11. Repeatable: If it is repeated, the result will not differ.
  12. Reproducible: It should yield the same result, regardless of where it is executed.
  13. Independent: It should not rely on the results of other tests.
  14. Economical: It should require lower creation and maintenance efforts than the value of the test (risk covered)

Violation of these criteria may (or may not) be a problem. However, they provide a good guideline when designing tests. regardless of whether these are acceptance, system or component (unit) tests.

Working with the list

When your test process has problems, check a sample of your tests against this list and try to discover hotspots for improvement.

When creating your first couple tests, you should pick some criteria from the list which seem to be the most difficult to achieve. Then design your tests to actually meet these criteria.

No comments:

Post a Comment