1. Software Testing
Methodologies and Tools
UNIT I:Introduction: Purpose of Testing, Dichotomies, Model for Testing,
Consequences of Bugs,Taxonomy of Bugs. Flow graphs and Path testing: Basics
Concepts of Path Testing, Predicates, Path Predicates andAchievable Paths, Path
Sensitizing, Path Instrumentation, Application of Path Testing.
2. • What is testing?
• Testing is the process of exercising or evaluating a system or system components by
manual orautomated means to verify that it satisfies specified requirements.
• SOFTWARE TESTING:
• Software testing is a process of identifying defects in software and checking whether
the software meets specified requirements or not
• Defect
• The variation between the actual results and expected results is known as defect. If a
developer finds an issue and corrects it by himself in the development phase then it’s
called a defect.
• Bug:If testers find any mismatch in the application/system in testing phase then they
call it as Bug.
• Error: We can’t compile or run a program due to coding mistake in a program. If a
developer unable to successfully compile or run a program then they call it as an error.
• Failure: Once the product is deployed and customers find any issues then they call the
product as a failure product. After release, if an end user finds an issue then that
particular issue is called as failure.
3. • The Purpose of Testing
• MYTH: Good programmers write code without bugs. (It’s wrong!!!)
• History says that even well written programs still have 1-3 bugs per
hundred statements.
• Productivity and Quality in Software: Productivity is measured by the sum of
the costs of the material, the rework, and thediscarded components, and the
cost of quality assurance and testing.
• There is a tradeoff between quality assurance costs and manufacturing costs:
If sufficient time is not spent in quality assurance, the reject rate will be high
and sowill be the net cost. If inspection is good and all errors are caught as they
occur,inspection costs will dominate, and again the net cost will suffer.
• The biggest part of software cost is the cost of bugs: the cost of detecting them,
thecost of correcting them, the cost of designing tests that discover them, and
the cost of running those tests.
• Testing and Test Design are parts of quality assurance should also focus on
bugprevention. A prevented bug is better than a detected and corrected bug.
4. • Phases in a tester's mental life:
• Phases in a tester's mental life can be categorized into the following 5 phases:
• 1. Phase 0: (Until 1956: Debugging Oriented) There is no difference between testing and
debugging.
• 2. Phase 1: (1957-1978: Demonstration Oriented) the purpose of testing here is to show
that software works. This failed because the probability of showing that software works
'decreases' as testing increases. I.e. the more you test, the more likely you will find a
bug.
• 4. Phase 3: (1983-1987: Evaluation Oriented) the purpose of testing is not to prove
anythingbut to reduce the perceived risk of not working to an acceptable value
(Statistical Quality Control). Notion is that testing does improve the product to the
extent that testing catches bugs and to the extent that those bugs are fixed. The
product is released when the confidence on that product is high enough. (Note: This is
applied to large software products with millions of code and years of use.)
• 5. Phase 4: (1988-2000: Prevention Oriented) Testability is the factor considered here.
One reason is to reduce the labor of testing. Other reason is to check the testable and
non-testable code. Testable code has fewer bugs than the code that's hard to test.
Identifying the testing techniques to test the code is the main key here.
5. • Test Design:
• We know that the software code must be designed and tested, but
many appear to be unaware that tests themselves must be designed
and tested. Tests should be properly designed and tested before
applying it to the actual code.
• Testing isn’t everything:
• There are approaches other than testing to create better software.
Methods other than testing include:
• 1. Inspection Methods: Methods like walkthroughs, desk checking,
formal inspections and code reading appear to be as effective as
testing but the bugs caught don’t completely overlap.
• 2. Design Style: While designing the software itself, adopting stylistic
objectives such as testability, openness and clarity can do much to
prevent bugs.
6. • 3. Static Analysis Methods: Includes formal analysis of source code
during compilation. In earlier days, it is a routine job of the
programmer to do that. Now, the compilers have taken over that job
• 4. Languages: The source language can help reduce certain kinds of
bugs.Programmers find new bugs while using new languages.
• 5. Development Methodologies and Development Environment: The
development process and the environment in which that
methodology is embedded can prevent many kinds of bugs.