Test Selection and Adequacy Criteria

Introduction :

Test case selection is one of the crucial factors in determining how the testing process is to be conducted. Test adequacy criteria is thus a key to show how the test suites are going to be filled in. The message of the term is simple - adequacy criteria defines or sets a limit or boundary which is sufficient enough to stop testing


Testing cannot have a definite end, but a benchmark has to be set up to determine that all necessary functional requirements have been checked thoroughly and the system is performing as per the required specifications.

  • Test case :It is a set of inputs, execution conditions, and also contains pass/fail criteria.
  • Test case specification :It is a requirement that one or more test case must satisfy.
  • Test Suite : A collection of test cases.
  • Test execution :The process of execution of test cases.
  • Adequacy Criteria :This is the condition/predicate which is either true or false for a specific pair of program & test suite.

The idea behind the concept of test case selection is arriving at a conclusion whether our test cases within the test suite full fill the expected results. The test adequacy criteria thus defines the properties of a program that must be satisfied to ensure success of the program without any errors.

Test case selection and adequacy criteria aims to full fill the following :

  • Statement Coverage - A test case is designed with an aim to cover all the statements in a program. The test adequacy criteria in this case would be to execute all the statements.
  • Branch Coverage - The test adequacy criteria is to make sure the test cases cover the branches or the condition statements.
  • Path Coverage - Here, the adequacy criteria ensures that a specific path is covered, that is, from the entry point to exit.
  • Mutation adequacy - A program is injected with a fault. This is called the mutant program. Now the original and the mutant program are executed. If during this, both these programs produce different outputs, on any of the test cases, then a fault is detected. If fault is detected we say the mutant is dead or killed. The percentage of dead mutants in comparison with the mutants that are not equal to original program determines the adequacy measurement, also called the mutation score or mutation adequacy.

Categories of test data adequacy criteria :

Out of the many ways of classifying adequacy criteria, one common method is by using the source of information.

  1. Specification-based - Based on the requirement specification, test adequacy criteria is set. Testing is based on the features of the specification. Test criteria thus ensures that the requirements have been fully exercised.
  2. Program-based - Determines testing requirements as per the program under test.
  3. Combined specification and program based criteria - Combines both the concepts to carry out testing.
  4. Interface Based Criteria - Testing requirements are fixed based on the type of input and the range of inputs to be given to a program.

Apart from the source based approach, one can devise test plans based on the type of test approach to be undertaken. The following represent the three basic types of software testing approaches :

  • Structural Testing : Adequacy criteria is prepared to Cover a specific portion of a given program.
  • Error Based Testing : According to our knowledge about occurrence of some common errors, we prepare test cases to check the behaviour of a program.