Professional Documents
Culture Documents
Chapte Two
Chapte Two
TESTING FUNDAMENTALS
SOFTWARE TESTING LIFE CYCLE (STLC)
Software Testing Life Cycle (STLC): Since testing has been identified as a process SDLC,
there exists a need for well-defined series of steps to ensure effective testing.
The testing process divided into a precise sequence of steps is termed as ST life cycle
(STLC).
Test Design
Test Execution
Identify reporting procedures, bug classification, databases [for testing], bug severity levels and
project metrics.
TEST DESIGN
The activities here are:
Creating Test Cases and Test Data: Objectives of the test cases are identified and the type of
testing (positive or negative) is also decided for the input specifications.
Selecting the testing environment and supporting tools: Details like hardware
configurations, testers, interfaces, operating systems etc. are specified in this phase.
Creating the procedure specification: This is a description of how the test case will
be run. This form of sequenced steps is used by a tester at the time of executed test
cases.
TEST EXECUTION
As soon as the developer gets the bug-report, he performs the following activities:
Reproducing the bug: This is done to confirm the bug position and its whereabouts so as to avoid the
failures.
After these, the results from manual and automated testing can be collected and the following
activities can be done: reliability analysis (are the reliability goals being met or not), coverage analysis
and overall defect analysis.
WHAT ARE THE ENTRY AND EXIT CRITERIA FOR TESTING?
Entry criteria
Test environment has been set-up and all other necessary resources such as tools and
devices are available.
Exit criteria
The commonly considered exit criteria for terminating or concluding the process of
testing are:
Desired and sufficient coverage of the requirements and functionalities under the test.
A precise description of the correct output of the program for that set of input data.
Principle 2: A programmer should avoid attempting to test his or her own
program.
Most programmers cannot effectively test their own programs because they cannot bring
themselves to shift mental gears to attempt to expose errors.
If this is the case, it is likely that the programmer will carry the same misunderstanding
into tests of his or her own program
This does not mean that it is impossible for a programmer to test his or her own program.
Rather, it implies that testing is more effective and successful if someone else does it.
Developers can be valuable members of the testing team when the program specification
and the program code itself are being evaluated.
Note that this argument does not apply to debugging (correcting known errors);
debugging is more efficiently performed by the original programmer.
Principle 3:A programming organization should not test its own Programs
We’ve seen numerous experiments that show many subjects failed to detect certain
errors, even when symptoms of those errors were clearly observable on the output
listings.
Put another way, errors that are found in later tests were often missed in the results from
earlier tests.
Principle 5: Test cases must be written for input conditions that are invalid and
unexpected, as well as for those that are valid and expected.
There is a natural tendency when testing a program to concentrate on the valid and
expected input conditions, to the neglect of the invalid and unexpected conditions.
Therefore, test cases representing unexpected and invalid input conditions seem to have a
higher error detection yield than do test cases for valid input conditions.
Principle 6: Examining a program to see if it does not do what it is supposed to
do is only half the battle; the other half is seeing whether the program does what
it is not supposed to do.
For instance, a payroll program that produces the correct paychecks is still an erroneous
program if it also produces extra checks for nonexistent employees, or if it overwrites the first
record of the personnel file.
Principle 7: Avoid throwaway test cases unless the program is truly a throwaway
program.
Saving test cases and running them again after changes to other components of the
program is known as regression testing.
It is important to be able to verify every requirement, both explicitly stated and simply expected.
At every stage of software development, it is necessary to consider the testability aspect of a product.
What procedure should one use to test the requirement, and how easily can one verify it?
To make a product testable, designers may have to instrument a design with functionalities not
available to the customer.
QUALITY CRITERION
Formulate a set of relevant questions concerning the quality criteria and seek a “yes” or “no”
answer for each question.
Divide the number of “yes” answers by the number of questions to obtain a value in the range of 0
to 1.