Professional Documents
Culture Documents
Unit 1
The Psychology of Testing
• One of the primary causes of poor application testing is the fact that most programmers begin
with a false definition of the term. They might say:
• ‘‘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.’’
• ‘‘Testing is the process of establishing confidence that a program does what it is supposed to do.’’
These definitions are not really true….
• When you test a program, you want to add some value to it.
• Adding value through testing means raising the quality or reliability of the program.
• Raising the reliability of the program means finding and removing errors.
• Therefore, don’t test a program to show that it works;
• Rather, start with the assumption that the program contains errors (a valid assumption for almost
any program) and then test the program to find as many of the errors as possible.
Thus, a more appropriate definition is this:
• Testing can show that defects are present, but cannot prove that there are
no defects.
• Testing reduces the probability of undiscovered defects remaining in the software but,
even if no defects are found, it is not a proof of correctness.
Exhaustive testing is not possible
• Testing everything (all combinations of inputs and preconditions) is not feasible except for
trivial cases.
• Instead of exhaustive testing, we use risks and priorities to focus testing efforts.
• For Example: Imagine we have to test a page where there are 5
fields that accept alphabets, numbers or special characters and a
numeric field that accepts a value from 1 lac to 10 lac.
• Testing activities should start as early as possible in the software or system development
life cycle and should be focused on defined objectives.
Defect clustering
• A small number of modules contain most of the defects discovered during pre-release
testing or show the most operational failures.
For Example: If we have a website that
has 3 screens.
• The first is the signup/login page, the second screen is a form of competitive exam details and
the 3rd page is a payment screen that takes the card details and processes the payment.
• Now if asked to a Tester about what will be the most critical functionality of this website.
• The answer would surely be the Payment Screen. Which is very obvious.
• And so most of the bugs he would encounter will be around the payment process.
• Similarly, shortlisting the modules and preparing the regression suite based on this principle
helps identify maximum bugs in very less time.
• However, this would result in Pesticide Paradox if we do not constantly update the regression
suite. We will now understand what Pesticide Paradox is.
Pesticide paradox
• If the same tests are repeated over and over again, eventually the same set of test cases
will no longer find any new bugs.
• To overcome this 'pesticide paradox', the test cases need to be regularly reviewed and
revised, and new and different tests need to be written to exercise different parts of the
software or system to potentially find more defects.
Testing is context dependent
• Finding and fixing defects does not help if the system built is unusable and does not fulfill
the users' needs and expectations
More Principles
Software Myths (Management Perspectives)
36
Software Myths (Management Perspectives)
The infrastructure is
only one of the several factors
that determine the quality
of the product!
37
Software Myths (Management Perspectives)
Unfortunately,
that may further delay the schedule!
38
Software Myths (Management Perspectives)
39
Software Myths (Customer Perspectives)
41
Software Myths (Customer Perspectives)
42
Software Myths (Developer Perspectives)
43
Software Myths (Developer Perspectives)
44
Software Myths (Developer Perspectives)
46
Real World Scenario
Factors
People
Project
Product Process
55
Role of Management in Software Development
People
Project Dependency
4 2 Product
Order
Process
56
Software Testing
Test, Test Case and Test Suite
Test and Test case terms are used interchangeably. In practice, both are
same and are treated as synonyms. Test case describes an input
description and an expected output description.
Test Case ID
Section-I Section-II
(Before Execution) (After Execution)
Purpose : Execution History:
Pre condition: (If any) Result:
Inputs: If fails, any possible reason (Optional);
11