Saturday, 14 July 2012

Testing via Error Guessing


The purpose of error guessing is to focus the testing activity on areas that have not been handled by the other more formal techniques, such as equivalence partitioning and boundary value analysis.  Error guessing is the process of making an educated guess as to other types of areas to be tested.  For example, educated guesses can be based on items such as metrics from past testing experiences, or the tester's identification of situations in the Functional Design Specification or Detailed Design Specification, that are not addressed clearly.

Examples of Error Prone Situations

Though metrics from past test experiences are the optimum basis for error guessing, these may not be available.  Examples of error prone situations include:
  • initialization of data, (e.g., repeat a process to see if data is properly removed)
  • wrong kind of data, (e.g., negative numbers, non-numeric versus numeric)
  • handling of real data, (i.e., test using data created through the system or real records, because
  • programmers tend to create data that reflects what they are expecting)
  •  error management, (e.g., proper prioritization of multiple errors, clear error messages, proper retention of data when an error is received, processing continues after an error if it is supposed to),         calculations, (e.g., hand calculate items for comparison)
  • restart/recovery, (i.e., use data that will cause a batch program to terminate before completion and determine if the restart/recovery process works properly)
  • proper handling of concurrent processes, (i.e., for event driven applications, test multiple processes concurrently)


Example of an Unclear Specification

An example of a test based on an unclear specification is illustrated using a specification from a function called billing:

  • For accounts with a total balance owed > or = $10.00, for which the run date is = or > 30 days from the date of service, calculate a $3.00 or 1% late fee, whichever is greater.


The specification does not clearly state how to handle the late fee if the balance owed > $10.00, but the balance owed is composed of amounts owed that have different dates of service, and the amount owed for which the run date is = or > 30 days from the date of service is < $10.00.  Using error guessing a test is designed to address this situation:

  • Balance owed of $13.00 is composed of amount owed of $6.00, (which has a run date - date of service < 30 days), and amount owed of $7.00, (which has a run date - date of service > 30 days).