Software Testing Methodologies: Unit 1
Software Testing Methodologies: Unit 1
UNIT 1
SYLLABUS:
Software Testing: Introduction, Evolution, Myths & Facts, Goals, Psychology, Definition, Model
for testing, Effective Vs Exhaustive Software Testing. Software Testing Terminology and
Methodology: Software Testing Terminology, Software Testing Life Cycle, relating test life cycle
to development life cycle Software Testing Methodology.
1.1. INTRODUCTION
Software Testing Definition:
IEEE definition states “Testing is the process of exercising or evaluating a system or system
component by manual or automated means to verify that it satisfies specified requirements”.
1.2 (A). EVOLUTION OF SOFTWARE TESTING:
In the early days of software development, Software Testing was considered only as a debugging
process for removing the errors after the development of software.
By 1970, software engineering term was in common use. But software testing was just a beginning
at that time.
In 1978, G.J. Myers realized the need to discuss the techniques of software testing in a separate
subject. He wrote the book “The Art of Software Testing” which is a classic work on software
testing.
Myers discussed the psychology of testing and emphasized that testing should be done with the
mind-set of finding the errors not to demonstrate that errors are not present.
By 1980, software professionals and organizations started talking about the quality in software.
Organizations started Quality assurance teams for the project, which take care of all the testing
activities for the project right from the beginning.
In the 1990s testing tools finally came into their own. There was flood of various tools, which are
absolutely vital to adequate testing of the software systems. However, they do not solve all the
problems and cannot replace a testing process.
Gelperin and Hetzel have characterized the growth of software testing with time. Based on this, we
can divide the evolution of software testing in following phases:
o Debugging-oriented phase (before 1957)
o Demonstration-oriented phase (1957-78)
o Destruction-oriented phase (1979-82)
o Evolution-oriented phase (1983-87)
o Prevention-oriented phase (1988-95)
o Process-oriented phase (1996 onwards)
Myth: ―The purpose of the testing is to check the functionality of the software
Truth: Today all the testing activities are driven by quality goals. Ultimately, the goal of testing
is also to ensure quality of the software. There are various things related to quality of the software,
for which test cases must be executed.
The immediate goal of testing is to find errors at any stage of software development.
More the bugs discovered at an early stage, better will be the success rate of software testing.
BUG PREVENTION:
CUSTOMER SATISFACTION:
From the user’s perspective, the prime concern of testing is customer satisfaction only. If we want the
customer to be satisfied with the software product, then testing should be complete and thorough. Testing
should be complete in the sense that it must satisfy the user for all the specified requirements mentioned in
the user manual, as well as for the unspecified requirements which are otherwise understood. A complete
testing process achieves reliability, reliability enhances the quality, and quality in turn, increases the
customer satisfaction, as shown in Fig.
Post-implementation goals:
These goals are important after the product is released.
REDUCED MAINTENANCE COST:
The maintenance cost of any software product is not its physical cost, as the software does not wear out.
The only maintenance cost in a software product is its failure due to errors. Post-release errors are costlier
to fix, as they are difficult to detect. Thus, if testing has been done rigorously and effectively, then the
chances of failure are minimized and in turn, the maintenance cost is reduced.
IMPROVED SOFTWARE TESTING PROCESS:
A testing process for one project may not be successful and there may be scope for improvement. Therefore,
the bug history and post-implementation results can be analyzed to find out obstacles in the present testing
process, which can be rectified in future projects. Thus, the long-term post-implementation goal is to
improve the testing process for future projects.
1.5 PSYCHOLOGY FOR SOFTWARE TESTING:
Software testing is directly related to human psychology. Though software testing has not been defined till
now, but most frequently it is defined as –
“Testing is the process of demonstrating that errors are not present.”
So, the purpose of testing is to show that software performs its intended functions correctly. This definition
is correct, but partially. If testing is performed keeping this goal in mind, then we cannot achieve the desired
goals as we will not be able to test the software as a whole. It may hide some bugs. If our goal is to
demonstrate that a program has errors; we will design the test cases which have higher probability to
uncover the bugs instead of showing that software works.
“Testing is the process of executing a program with the intent of finding errors.”
We should not have a guilty feeling for our errors and for human beings. This psychology factor brings the
concept that we should concentrate on discovering and preventing the errors and not to feel guilty about
them. Therefore, testing cannot be a joyous event unless you cast out your guilt.
1.6. SOFTWARE TESTING DEFINITIONS:
“Testing is the process of executing a program with the intent of finding errors.”- Myers
“A successful test is one that uncovers an as-yet-undiscovered error.” - Myers
“Testing can show the presence of bugs but never their absence.”- W. Dijkstra
“Program testing is a rapidly maturing area within software engineering that is receiving
increasing notice both by computer science theoreticians and practitioners. Its general aim is to
affirm the quality of software systems by systematically exercising the software in carefully
controlled circumstances”. - E. Miller
“Testing is a support function that helps developers look good by finding their mistakes before
anyone else does.” -James Bach
“Software testing is an empirical investigation conducted to provide stakeholders with
information about the quality of the product or service under test, with respect to the context in
which it is intended to operate.” -Cem Kaner
“The underlying motivation of program testing is to affirm software quality with methods that
can be economically and effectively applied to both large-scale and small-scale systems.” -Miller
“Testing is a concurrent lifecycle process of engineering, using and maintaining testware (i.e.
testing artifacts) in order to measure and improve the quality of the software being tested.” -
Craig
Thus, software testing can be defined as,
“Software testing is a process that detects important bugs with the objective of having
better quality software.”
1.7. MODEL FOR SOFTWARE TESTING:
Exhaustive or complete software testing means that every statement in the program and every
possible path combination with every possible combination of data must be executed. But soon,
we will realize that exhaustive testing is out of scope.
The testing process should be understood as a domain of possible tests. There are subsets of these
possible tests. But the domain of possible test becomes infinite, as we cannot test every possible
combination.
Complete testing requires the organization to invest a long tine which is not cost-effective.
Therefore, testing must be performed on selected subsets, that can be performed within the
constrained resources. This selected group of subsets, but not the whole domain of testing, makes
effective testing.
Now let us see in detail why complete testing is not possible:
(ii) The complete path testing, if performed somehow, doe not guarantee that here will not be
errors.
For example, if a programmer develops a descending order program in place of ascending order
program then exhaustive path testing is of no use.
Every Design Error cannot be Found:
How do we know that the specifications are achievable? Its consistency and completeness must be
provided, and in general that is a provably unsolvable problem.
“A mistake in coding is called error, error found by tester is called defect, defect accepted by
development team then it is called bug, build does not meet the requirements then it Is failure.”
Example:
#include<stdio.h>
int main ()
{
int value1, value2, ans;
value1 = 5;
value2 = 3;
ans = value1 - value2;
printf("The addition of 5 + 3 = %d.", ans);
return 0;
}
When you compile and run this program you see the printed statement as below:
The addition of 5 + 3 = 2. So, after compiling and running this program, we realize the program
has failed to do what it was
supposed to do. The program was supposed to add two numbers but it certainly did not add 5 and
3. 5 + 3 should be 8, but the result is 2. There could be various reasons as to why the program
displays the answer 2 instead of 8. For now, we have detected a failure. As the failure has been
detected a defect can be raised.
TEST CASE:
Test case is a well-documented procedure designed to test the functionality of a feature in the system. The
primary purpose of designing test case is to find errors in the system. For designing the test case, it needs
to provide a set of inputs and its corresponding excepted outputs.
Testware: The documents created during testing activities are known as testware. It includes test plans,
test specification, test case design, test reports etc.
Incident: An incident is the symptom associated with a failure that alerts the user about the occurrence of
a failure.
Test oracle: An oracle is the means to judge the success or failure of a test i.e. to judge the correctness of
the system for some test. The simplest oracle is comparing actual results with expected results by hand.
The tester who designs the test cases must understand the cause-and effect
connections also.
Some attributes of good test cases are
a) Criticality and high-risk priority are given highest priority
b) Good test case is one which is capable of finding high probability of
c) finding an error
d) Test cases are not overlap or be redundant
e) Good test case is one which always follow the modular approach
f) Test case always able to find an undercover error
Selection of test case design techniques
Basically, there are two testing techniques Black-box and white box testing techniques
Black-box testing techniques – in this generate test cases without knowing the internal
working of a system
Creating test cases and test data
Test cases are created based on testing objecting, test data means input data given to the
test cases.
Setting up the test environment and supporting tools
Environment includes h/w configurations, testers, tools, interfaces, manuals. Tools like
QTP, load runner
Creating test procedure specification
It is sequence of steps, this procedure used by the tester at the time of testing
Test Execution:
In this phase, all test cases are executed and test results are documented in the test incident reports, test
logs, testing status, and test summary reports.
Responsibilities at various levels for execution of the test cases are outlined in the following table.
Test Execution Level Person Responsible