Empowering your IT Initiatives

HBI has a proven track record of meeting demanding quality and delivery schedules in highly competitive markets.
Testing Home PREV TOC NEXT
Compiled by Kavitha Manoharan

 

 
Software Testing Techniques

Introduction

Software testing is a critical element of software quality assurance and represents the ultimate process to ensure the correctness of the product. The quality product which always enhances the customer's confidence thereby increases the business economics. In other words, a good quality product means zero defects, which is derived from a better quality process in testing.

The definition of testing is not well understood. People use a totally incorrect definition of the word testing, and that this is the primary cause for poor program testing. Examples of these definitions are such statements as “Testing is the process of demonstrating that errors are not present”, “The purpose of testing is to show that a program performs its intended functions correctly” and “Testing is the process of establishing confidence that a program does what is supposed to do”.

Testing the product means adding value to it i.e., raising the quality or reliability of the program. Raising the reliability of the product means finding and removing errors. Hence one should not test a product to show that it works; rather, one should start with the assumption that the program contains errors and then test the program to find as many of the errors as possible. Thus a more appropriate definition is: "Testing is the process of executing a program with the intent of finding errors."

Why do we need to Test ?

Defects can exist in the software, as it is developed by human who can make mistakes during the development of software. However, it is the primary duty of a software vendor to ensure that software delivered does not have defects and the customers day-to-day operations do not get affected. This can be achieved by rigorously testing the software. The most common origin of software bugs is due to:

  • Poor understanding and incomplete requirements
  • Unrealistic schedule
  • Fast changes in requirements
  • Too many assumptions and complacency

White Box Testing

White box testing is testing from the inside--tests that go in and test the actual program structure. This testing technique takes into account the internal structure of the system or component. The entire source code of the system must be available. Because the complete internal structure and working of the code is available.


The purpose of white box testing is to verify whether a component conforms to design.
White box testing helps to derive test cases to ensure:
  • All independent paths are exercised at least once.
  • All logical decisions are exercised for both true and false paths.
  • All loops are executed at their boundaries and within operational bounds.
  • All internal data structures are exercised to ensure validity.
White box testing helps to:
  • Traverse complicated loop structures
  • Cover common data areas
  • Cover control structures and sub-routines
  • Evaluate different execution paths
  • Test the module and integration of many modules
  • Discover logical errors, if any.
  • Helps to understand the code

Black Box Testing

Black box testing is testing that occurs from the viewpoint of an end user. Black box tests find bugs such as incorrect functions, interface problems, and database errors. This Functional tests examine the observable behavior of software as evidenced by its outputs, without any reference to internal functions. This kind of tests is from the user point of view, which means as if the user is testing as in the normal business functions.

The purpose of black box testing is to verify whether a component conforms to specification.

Black box testing is absolutely mandatory for acceptance testing. The customer must be able to understand these tests, so that he/she will know for sure whether or not you've met the contract requirements.

  • Black box tests normally determine the quality of the software. It is an advantage to create the quality criteria from this point of view from the beginning.
  • In black box testing, software is subjected to a full range of inputs and the outputs are verified for its correctness. Here, the structure of the program is immaterial.
  • Black box testing technique can be applied once, unit and integration testing is completed.
  • It focuses on functional requirements.
  • It is compliment to the white box testing.
The main objective of the black box testing is to find:
  • Incorrect or missing functions
  • Interface errors
  • Errors in data structures or external database access
  • Performance errors
  • Initialization and termination errors.

Types of testing

  • Unit testing
  • Integration testing
  • Functional testing
  • Acceptance testing
  • Pilot testing
  • Performance testing
  • Installation testing
  • Usability testing

Unit Testing

Written by developers
Tests individual components
Unit tests are written before code

Automated test frameworks
JUnit
CPPUnit
etc.

Integration testing

Testing of components when brought together Different strategies:
big bang: test all components together at once.
bottom-up: test layer by layer, from bottom up.
top-down: test layer by layer, from top (UI) down.
Unintegrated components are simulated by stubs during integration testing.

Functional testing

A whole-system test.
Also called “requirements testing”.
Uncovers differences between use-case model and observed system behavior.

Acceptance testing

Benchmark testing
       Testing against a specific set of test cases.

Competitor testing
       Evaluation wrt competitor product

Shadow testing
       Evaluation w.r.t legacy system

Pilot testing

Field testing

Alpha test:

system is tested by users in development environment

Beta test:

system is tested by users in the deployment environment

Performance testing

Stress testing – simultaneous requests
Volume – large amounts of data
Security testing – is it secure?
Timing tests – are timing constraints violated?
Recover tests – can system recover from errors?

Installation testing

Testing of system in deployment environment (after beta test)

Usability testing

User interface testing.
Testing Home
PREV
TOC NEXT