Software verification

Black-box testing

The programme test cases in black box testing are based on the system specification. Inputs from the test data may reveal anomalous outputs (ie. defects). Test planning can begin early in the software development process. The main problem with black box testing in the selection of inputs.

Equivalence partitioning

This when the system inputs and outputs are partitioned into equivalence sets. If an input should be between four and ten, then choose a number less than four, a numbr between four and ten and a number greater than ten.

Choose test cases at the boundaries of these sets.

Compared to white-box testing

  • Potential combinatorial explosion of test cases (valid and invalid data).
  • Often not clear whether the selected test cases uncover a particular error.

White-box testing

Sometimes this is called structural testing or glass box testing. It is the derivatiion of test cases according to the programme structure. The objective is to exercise all programme statements (not all path combinations). There are four types of white-box testing:

  1. Statement testing - test single statements.
  2. Loop testing.
  3. Path testing - execute every path.
  4. Branch testing - every outcome from every condition is tested.

Compared to black-box testing

  • Potentially infinite number of paths to be tested.
  • White-box testing often tests what is done, instead of what should be done.
  • Cannot detect missing use cases.

Static verification

This is verifying the conformance of a software system and its specification without executing the code. It involves analysis of source text by humans or software on any documents produced as part of the software process. It discovers errors early in the software process. There are two main techniques for static verification:

  1. Walkthroughs - four to six people examine the code and list perceived problems, then meet to discuss afterwards.
  2. Programme inspections - a more formal approach using checklists.

This is usually more cost effective than testing for defect detection at the unit and module level. Over 60% of programme errors can be detected in software inspections.

No Comments

Back to top