Test Case Design Techniques

Test Case design techniques are one of the important topics in Software testing.

Why the test case design techniques are so important?

One of the factors that influence the cost of testing is the number of test cases. The more the number of test cases, the longer it will take to execute and analyse these tests. Also simply using random choice of inputs for these test cases proved as a bad idea in finding defects.

Also complete testing is impossible in most of the testing scenarios. So as testers, we need to make the test as complete as possible.

In the sense that finding the maximum number of defects with minimum number of test cases as possible.Testers are employing various techniques in order to achieve this.

One of the classifications for test case design techniques represented in the below picture.

Test_Case_design_techniques

Test_Case_design_techniques 

It is important for testers to understand the following :

  • Which technique is best suited for a given problem?

  • Which combination of these techniques are effective for a specific test ?

In order to answer these questions, we need to have an overall idea of all the testing techniques available.

Lets discuss the main idea behind the above classification.

1.Black- box (Specification based) techniques:

Here the software system considered as a black box. So the implementation of the black box is unknown. Because of that, the function of the system is completely understood in terms of its inputs and outputs.

Also the only information used for the identification of test cases is the specification document.

Advantages:

  • test cases are independent of implementation, so if the implementation changes, the test
    cases are still useful
  • test case development can occur in parallel with the implementation

Disadvantages:

  • significant redundancies may exist among test cases
  • possibility of gaps of untested software

Various techniques under black-box techniques are :

  • Equivalence class partitioning
  • Boundary value analysis
  • Decision tables
  • State transition diagrams
  • Use case testing

2. White-box (Structure based ) techniques:

      This is called white – box because testers design test cases based on the implementation. So the coverage aspects helps to state explicitly the extend to which the software item has been tested. Moreover it is completely defined by implementation, it is difficult to find the missing requirements(requirements that are not implemented) if any.

The various structure based (code-based ) techniques are:

  • Statement Coverage
  • Branch Coverage
  • Decision Coverage
  • Condition Coverage
  • Path Coverage
  • Loop testing

3. Experience based techniques:

      In this technique, testers employ knowledge gained from experience. Hence this can be used in situations where documentation is poor and/or testing schedule is tight. This can’t be a primary test technique because of less documentation and less coverage aspects.

The various types of experienced based test case design techniques are:

  • Error guessing
  • Exploratory testing
  • Fault attacks

These are the main fundamentally different categories of test case design techniques. 

Which one is best ? 

It is generally true that code-based testing is most appropriate at the unit level, whereas specification-based testing is most appropriate at the system level.

However each of these categories have certain advantages and disadvantages.Hence various combinations of these individual techniques can yield better results.

More details on the mentioned sub categories will be discussed on the upcoming blog posts. Stay tuned!!!