Software Testing - Software Testing Basics

29.
What is coverage and what are the different types of coverage techniques?
Coverage is a measurement used in software testing to describe the degree to which the source code is tested. There are three basic types of coverage techniques as shown in the following figure:

Software Testing Image

  • Statement coverage: This coverage ensures that each line of source code has been executed and tested.
  • Decision coverage: This coverage ensures that every decision (true/false) in the source code has been executed and tested.
  • Path coverage: In this coverage we ensure that every possible route through a given part of code is executed and tested.

30.
A defect which could have been removed during the initial stage is removed in a later stage. How does this affect cost?
If a defect is known at the initial stage then it should be removed during that stage/phase itself rather than at some later stage. It's a recorded fact that if a defect is delayed for later phases it proves more costly. The following figure shows how a defect is costly as the phases move forward. A defect if identified and removed during the requirement and design phase is the most cost effective, while a defect removed during maintenance is 20 times costlier than during the requirement and design phases.

Software Testing Image

For instance, if a defect is identified during requirement and design we only need to change the documentation, but if identified during the maintenance phase we not only need to fix the defect, but also change our test plans, do regression testing, and change all documentation. This is why a defect should be identified/removed in earlier phases and the testing department should be involved right from the requirement phase and not after the execution phase.

31.
What kind of input do we need from the end user to begin proper testing?
The product has to be used by the user. He is the most important person as he has more interest than anyone else in the project.

Software Testing Image

From the user we need the following data:
  • The first thing we need is the acceptance test plan from the end user. The acceptance test defines the entire test which the product has to pass so that it can go into production.
  • We also need the requirement document from the customer. In normal scenarios the customer never writes a formal document until he is really sure of his requirements. But at some point the customer should sign saying yes this is what he wants.
  • The customer should also define the risky sections of the project. For instance, in a normal accounting project if a voucher entry screen does not work that will stop the accounting functionality completely. But if reports are not derived the accounting department can use it for some time. The customer is the right person to say which section will affect him the most. With this feedback the testers can prepare a proper test plan for those areas and test it thoroughly.
  • The customer should also provide proper data for testing. Feeding proper data during testing is very important. In many scenarios testers key in wrong data and expect results which are of no interest to the customer.

32.
Can you explain the workbench concept?
In order to understand testing methodology we need to understand the workbench concept. A Workbench is a way of documenting how a specific activity has to be performed. A workbench is referred to as phases, steps, and tasks as shown in the following figure.

Software Testing Image

There are five tasks for every workbench:
  • Input: Every task needs some defined input and entrance criteria. So for every workbench we need defined inputs. Input forms the first steps of the workbench.
  • Execute: This is the main task of the workbench which will transform the input into the expected output.
  • Check: Check steps assure that the output after execution meets the desired result.
  • Production output: If the check is right the production output forms the exit criteria of the workbench.
  • Rework: During the check step if the output is not as desired then we need to again start from the execute step.

Software Testing Image