Jul 5, 2008

Software Testing Concepts

What Is Software Testing?

Primary role of testing is not demonstration of correct performance, but the exposure of hidden defects." - G. J. Myers

•It is not sufficient to demonstrate that the software is doing what it is supposed to do.

It is more important to demonstrate that the software is not doing what it is not supposed to do.

What Testing Actually Is?

•Identifying the differences between expected and actual results
•Process of executing a program (or part of it) with the intention or goal of finding defects
•Detecting specification errors and deviations from the specifications.

Essentials Of Software Testing

•TESTING IS DESTRUCTIVE PROCESS : A CREATIVE DESTRUCTION
•TESTING NEEDS A SADISTIC APPROACH
•If a test does not detect a defect actually present, is it successful or unsuccessful?
•Test that detects a defect is valuable investment: it has helped in improving the product..
•The quality of the test process determines the success of test effort
•The longer the defect remains, the more expensive it is to remove it
•Prevent defect migration by using early life cycle testing techniques..
•Use appropriate software testing tools where required
•Testing is largely a problem of economics
•Exhaustive input testing is impossible..
•Each test case should provide maximum yield (probability that the test case will expose a previously undetected error)
•Investment is measured by the time and cost to produce, execute and verify test and communicate
•Investment is limited by schedule and budget..
•If sole purpose of a test is to validate specifications were implemented, then:
» testing is an unnecessary and unproductive activity
»testing is designed to compensate for ineffective software development
•It is risky to develop software and not test it.
•High pressures to deliver software as quickly as possible: test process must provide maximum value in shortest time..

•Testing is no longer:
»after-programming evaluation
»adjunct to the SDLC
•It is:
»key integral part of EACH phase of SDLC
•Highest payback comes from detecting defects early or preventing defects:
»avoid incorrect design and coding so as to avoid correcting defects later..

•Aim is to reduce the time ‘wasted’ in defect removal: concentrate on defect prevention.
•Misconceptions:
»Anyone can test software: no particular skill is required!
»Testers can test for quality at the end of a project!
»Defects found mean blaming the developers.

•A programmer should avoid testing his or her own program
•A team should avoid testing its own program
•Thoroughly inspect the results of each test
•Establishing that a program does what it is supposed to do is only half the battle:
»The other, more important half is seeing whether the program is doing what it is not supposed to do..

•Good testing MUST examine:
»users’ requirements
»design objectives
»user interface
»internal structure
»AND then execute the code..

Principles of Testing


•Testing is not something done as a formality at the end of development; it is done throughout the SDLC to detect defects as early as possible and prevent defect migration to subsequent phases
•SOFTWARE TESTING =
»Verification (Static Testing)
»+
»Validation (Dynamic Testing).


•Good testing does not just happen
•It must be planned
•Automation is not the only answer
•Avoid ‘Anti-testing’ messages.