UNIT - 4 Print
UNIT - 4 Print
By K . S h e ka r
A s s i sta nt p ro fe s s o r
D e p a r t m e nt : C S E
Ms V.Hema 1
Topics:
Ms V.Hema 2
LECTURE-30
23-12-2020
Ms V.Hema 3
Test Selection & Minimization
for Regression Testing
Software maintenance is an activity which includes
enhancements, error corrections, optimization and deletion of
existing features.
Ms V.Hema 4
Test Selection & Minimization for
Regression Testing
Ms V.Hema 5
Retest all: This is one of the methods for regression
testing in which all the tests in the existing test bucket
or test suite should be re-executed.
Ms V.Hema 6
•Regression Test Selection is a technique in which some
selected test cases from test suite are executed to test
whether the modified code affects the software application or
not.
Ms V.Hema 7
Selecting the Test Case for regression testing is an art and not
that easy. Effective Regression Tests can be done by selecting the
following test cases -
a) Test cases which have frequent defects.
b) Functionalities which are more visible to the users.
c) Test cases which verify core features of the product.
d) Test cases of functionalities which has undergone more and
recent changes.
e) All Integration Test Cases.
f) All Complex Test Cases.
g) Boundary value test cases.
h) A sample of Successful test cases.
i) A sample of Failure test cases.
Ms V.Hema 8
Tips for selection of test cases:
1. Select test cases for Regression testing where there are recent
code changes or functional changes.
2. Select test cases that map to the business requirements.
3. Select test cases for Regression testing in areas with frequent
bugs/defects.
4. Select test cases for Regression testing of the areas which are
visible to the user.
5. Select all integration test cases for Regression testing.
6. Select all complex test cases for Regression testing.
7. Select test cases based on priorities for Regression testing.
8. Select test cases for Regression testing based on criticality and
impact of bug fixes.
9. Select a sample of successful and failed test cases for
Regression testing.
Ms V.Hema 9
Prioritization of Test Cases:
Ms V.Hema 10
LECTURE-31
23-12-2020
Ms V.Hema 11
Regression Testing
REGRESSION TESTING is defined as a type of software
testing to confirm that a recent program or code
change has not adversely affected existing features.
This testing is done to make sure that new code changes should
not have side effects on the existing functionalities.
It ensures that the old code still works once the latest code
changes are done.
Ms V.Hema 12
.
Ms V.Hema 13
Regression Testing(Continue)
In other words:
It is important to ensure that
Ms V.Hema 14
Regression Testing(Continue)
Regression testing follows selective re-testing
technique.
Ms V.Hema 17
Ms V.Hema 18
Types:
Ms V.Hema 19
Test-Automation:
Selenium
Ms V.Hema 20
LECTURE-32
28-12-2020
Ms V.Hema 21
Regression Test Process
Ms V.Hema 22
Process of Regression testing: (Continues)
Ms V.Hema 23
Process of Regression testing:
Ms V.Hema 24
LECTURE-33
29-12-2020
Ms V.Hema 25
Initial Smoke or Sanity test
SMOKE TESTING, also known as “Build
Verification Testing”.
Ms V.Hema 26
Smoke Testing
Smoke Testing is a software testing technique
performed post software build to verify that the critical
functionalities of software are working fine.
Ms V.Hema 27
Smoke Testing:
Ms V.Hema 28
Advantages of Smoke Testing:
It helps to find faults earlier in the product lifecycle.
It saves the testers time by avoiding testing an unstable or
wrong build.
It provides confidence to the tester to proceed with testing.
It helps to find integration issues faster.
Major severity defects can be found out.
Detection and rectification will be an easy process.
The unstable build is a ticking time bomb. Smoke Testing
diffuses it.
Can be executed within a few minutes.
Since execution happens quickly, there will be a faster
feedback.
Security, privacy policy, performance, etc. can also be tested.
Ms V.Hema 29
Sanity Testing
Sanity Testing is a subset of regression testing.
Ms V.Hema 30
Ms V.Hema 31
Functionality of Sanity Testing:
Ms V.Hema 32
Features of Sanity Testing:
Ms V.Hema 33
Advantages of Sanity Testing:
Ms V.Hema 34
Smoke Vs Sanity Testing
Ms V.Hema 35
Smoke Vs Sanity Testing
Ms V.Hema 36
Smoke Vs Sanity Testing-Differences
Smoke Testing Sanity Testing
Smoke Testing is performed to ascertain that the Sanity Testing is done to check the new
critical functionalities of the program is working functionality/bugs have been fixed
fine
The objective of this testing is to verify the The objective of the testing is to verify the
"stability" of the system in order to proceed with "rationality" of the system in order to proceed
more rigorous testing with more rigorous testing
This testing is performed by the developers or Sanity testing is usually performed by testers
testers
Smoke testing is usually documented or scripted Sanity testing is usually not documented and is
unscripted
Smoke testing is a subset of Acceptance testing Sanity testing is a subset of Regression Testing
Smoke testing exercises the entire system from Sanity testing exercises only the particular
end to end component of the entire system
Smoke testing is like General Health Check Up Sanity Testing is like specialized health check up
Ms V.Hema 37
LECTURE-34
29-12-2020
Ms V.Hema 38
Selection of Regression Tests
1. Select test cases for Regression testing where there are recent
code changes or functional changes.
2. Select test cases that map to the business requirements .
3. Select test cases for Regression testing in areas with frequent
bugs/defects.
4. Select test cases for Regression testing of the areas which are
visible to the user.
5. Select all integration test cases for Regression testing.
6. Select all complex test cases for Regression testing.
7. Select test cases based on priorities for Regression testing.
8. Select test cases for Regression testing based on criticality and
impact of bug fixes.
9. Select a sample of successful and failed test cases for
Regression testing
Ms V.Hema 39
LECTURE-35
29-12-2020
Ms V.Hema 40
Execution Trace
“The execution traces present the order of the statements that
are touched during the execution of the test cases.”
Procedure:
P-Program containing some functions.
P’- Added few more functionalities to the existing program.
T- Test cases (Performed to test the original program).
Goal is to test P’ to ensure that the changes made do not affect the
functionality carried over P.
This could be achieved by executing P’ against all the non-obsolete
tests in T.
Ms V.Hema 41
Obsolete & Non-Obsolete Tests:
Ms V.Hema 42
Obsolete & Non-Obsolete Tests:
Tests(T)=To(Obsolete Tests)+Tu(Reduntant Tests)+Tr(Regression
tests).
Tno= (Tu U Tr)
We want to tested only those that are necessary to check if the modifications
do not affect functionalities common to P & P’.
Phase-I: P is executed and the execution slice recorded for each test case
in Tno= (Tu U Tr)
(Finding out the Tno and executing them on the program P and finding out the
trace.)
Phase-II: The modified program P’ is compared with P and Tr by an analysis
of the execution slice obtained in the first phase.
Ms V.Hema 43
LECTURE-36
29-12-2020
Ms V.Hema 44
Dynamic Slicing
Slicing: Program slicing is a technique for simplifying programs by
focusing on selected aspects of semantics.
2 Types:
Static slicing
Dynamic slicing
Ms V.Hema 45
1. Static Slicing:
A static slice of a program contains all statements that may affect the
value of a variable at any point for any arbitrary execution of the program.
Static slices are generally larger.
2. Dynamic slicing:
Ms V.Hema 46
Example:
int z = 10;
int n;
cin >> n;
int sum = 0;
if (n > 10)
sum = sum + n;
else
sum = sum - n;
cout << "Hey";
Static Slicing: Dynamic Slicing:
int n; int n;
cin >> n; cin >> n;
int sum = 0; int sum = 0;
if (n > 10) if (n > 10)
sum = sum + n; sum = sum + n;
else
sum = sum - n;
Ms V.Hema 47
Example (Cont):
Ms V.Hema 48
LECTURE-37
30-12-2020
Ms V.Hema 49
Test Case Minimization
Ms V.Hema 50
Test Minimization
Ms V.Hema 51
Test Case Minimization
Test suite minimisation techniques aim to identify
redundant test cases and to remove them from the test
suite in order to reduce the size of the test suite.
Ms V.Hema 52
The Purpose of test case minimization is to generate
representative set from test suite that satisfy all the
requirements as original test suite with minimum
number of test cease.
Ms V.Hema 53
Test case minimization techniques are used to
minimize the testing cost in terms of execution time, resources
etc.
• Heuristic based.
• Genetic algorithm based approach.
• Integer Linear Programming based approach.
•Hybrid techniques.
•(Call tree and clustering based techniques).
Ms V.Hema 54
Test case minimization techniques(Cont)
Heuristic based techniques
• Heuristic G
• Heuristic GE
• Heuristic GRE
Genetic algorithm
Ms V.Hema 55
Heuristic based techniques include Heuristic H(technique identified
redundant and obsolete test cases and removed them from test suite.),
GE(Heuristic GE is based on the greedy strategy and essential strategy. Firstly
essential strategy is applied i.e. all the essential test cases are added to
representative set. Then greedy strategy is applied on remaining test cases
repeatedly until the entire test requirements are satisfied. Heuristic GE
performed better than heuristic G since essential test cases are selected at first
stage) and GRE( This approach in based on three strategies - essential, 1-to-1
redundant strategy and greedy strategy-In this approach, firstly essential test
cases are selected and added to representative set, then 1-to-1 redundant test
cases are removed repeatedly and then greedy approach is applied on the
remaining test cases until all the requirements are satisfied. GRE guaranteed to
generate optimal representative sets.)
Ms V.Hema 57
Tools for regression testing
Ms V.Hema 58
Tools for regression testing(Cont)
Ms V.Hema 59
LECTURE-39
30-012-2020
Ms V.Hema 60
Adhoc Testing
“Adhoc Testing is an informal or unstructured software testing type
that aims to break the testing process in order to find possible
defects or errors at an early possible stage.”
Is done randomly.
Ms V.Hema 61
Adhoc Testing
Ms V.Hema 62
Adhoc Testing(Cont)
Ms V.Hema 63
When execute Adhoc Testing?
Ms V.Hema 64
Types of Adhoc testing
Forms of Adhoc Testing :
Buddy Testing: Two buddies, one from development team and one from
test team mutually work on identifying defects in the same module. Buddy
testing helps the testers develop better test cases while development team
can also make design changes early. This kind of testing happens usually
after completing the unit testing.
Pair Testing: Two testers are assigned the same modules and they share
ideas and work on the same systems to find defects. One tester executes
the tests while another tester records the notes on their findings.
Ms V.Hema 65
Ways to make Adhoc Testing More Effective
Preparation.
Ms V.Hema 66
Various ways to make Adhoc Testing More Effective
Preparation: By getting the defect details of a similar application, the
probability of finding defects in the application is more.
. a Rough Idea: By creating a rough idea in place the tester will
Creating
have a focused approach. It is NOT required to document a detailed plan
as what to test and how to test.
Divide and Rule: By testing the application part by part, we will have a
better focus and better understanding of the problems if any.
Targeting Critical Functionalities: A tester should target those areas that
are NOT covered while designing test cases.
Using Tools: Defects can also be brought to the lime light by using
profilers, debuggers and even task monitors. Hence being proficient in
using these tools one can uncover several defects.
Documenting the findings: Though testing is performed randomly, it is
better to document the tests if time permits and note down the deviations
if any. If defects are found, corresponding test cases are created so that it
helps the testers to retest the scenario.
Ms V.Hema 67
LECTURE-40
31-12-2020
Ms V.Hema 68
Pair Testing
One does the testing and the other analyzes or reviews the
testing.
Ms V.Hema 69
Ms V.Hema 70
Pair Testing(Cont)
Ms V.Hema 71
Pair Testing(Cont)
Procedure:
During pair testing, both the individuals are responsible for different
tasks that validate the quality as well as the functionality of the software.
While one of them executes the process of testing, the other member is
responsible for analyzing and reviewing the process.
Hence, with the assistance of this approach one can rapidly perform
thorough software testing, while saving time and money.
“Generally, one works on paper in taking notes
preparing scenarios, including reviews and analysis
of the test results, while another is responsible for
carrying out testing procedures on machines or
computer by making use of the other member's
output.”
Ms V.Hema 72
Pair Testing(Cont)-Procedure
Ms V.Hema 73
Best Combinations for the Pair Testing
Ms V.Hema 74
Pair Testing Features:
Responsible for generating effective test cases, quickly.
Time-saving approach.
Best method to train novice or new testers along with the task of testing, at
no-additional cost & time.
Bridges the gap and increases the coordination between developer and
tester.
Ms V.Hema 75
Advantages of Pair Testing:
Ms V.Hema 76
Challenges of Pair Testing:
Though, pair testing is an extremely beneficial testing technique,
there are few challenges that are encountered by the team while
executing its process.
These challenges are:
•As the bugs are reported after the culmination of the testing
process, it becomes time consuming and tedious for the team to
report and rectify them.
•It becomes difficult for the team to define the portions of the test
that has been performed.
Ms V.Hema 77
Tips to Improve Pair Testing:
Ms V.Hema 78
LECTURE-41
31-12-2020
Ms V.Hema 79
Exploratory testing
EXPLORATORY TESTING is a type of software testing where Test
cases are not created in advance but testers check system on
the fly.
They may note down ideas about what to test before test
execution.
4.Review Results:
• Evaluation of the defects
• Learning from the testing
• Analysis of coverage areas
5.Debriefing:
• Compilation of the output results
• Compare the results with the charter
• Check whether any additional testing is needed
Ms V.Hema 83
What to do during Exploratory Testing?
The more we test, more likely to execute right test cases for
the required scenarios
Ms V.Hema 84
It is very important to take a document and monitor the
following
Ms V.Hema 86
Challenges of Exploratory Testing:
Ms V.Hema 87
When use exploratory testing?
Ms V.Hema 88
LECTURE-42
05-01-2021
Ms V.Hema 89
Iterative testing
“Iterative testing refers to making small, gradual changes or
updates to a product based on insights (e.g., test results and user
feedback) from previous changes and testing them against
predefined baseline metrics.”
Ms V.Hema 90
Iterative testing(Cont)
Ms V.Hema 91
Iterative testing(Cont)
•Does the design itself work well, or are there areas that
may confuse users?
Ms V.Hema 92
Benefits
Here are a few of the benefits of iterative testing for product managers:
5. Maintain Flexibility
Ms V.Hema 93
1. Manage and Test Easily
Iterative testing enables product teams to make
incremental, evidence-based changes to a feature
or product. It allows them to roll changes out
quickly, and then gather user feedback to shape
product decisions. Because the changes aren’t
sweeping ones, they are easier to manage and test.
2. Identify Issues Early
Gradual tweaks made to the product help product
teams identify and eliminate bugs or usability issues
and correct them early on. Getting ahead enables
an organization to deliver a better product to users.
3. Get Better Insight
Iterative testing gives product managers actionable
insights via test results and user feedback, which
they can use to improve the product.
Ms V.Hema 94
4. Deliver a Better Product
Product managers want to achieve product excellence by
developing a significant or impactful product or feature and
getting it to market quickly. Iterative testing helps product
managers get to the heart of how users will engage with a
product. It gives insight into whether or not the product hits
the desired mark
5. Maintain Flexibility
Making small, gradual changes to a product helps product
managers adapt to users’ changing needs. They can keep close
tabs on how users react to and feel about those changes. These
valuable insights, in turn, help guide future product decisions.
6. Get Stakeholder Buy-In
Because iterative testing is evidence-based (i.e., real data and
user feedback), product decisions are more comfortable to
justify. This ultimately helps product managers make their cases
with stakeholders.
Ms V.Hema 95
Best Practices for Iterative Testing
Ms V.Hema 96
LECTURE-43
05-01-2021
Ms V.Hema 97
Defect seeding
“Defect seeding is a practice in which defects are
intentionally inserted into a program by one group
for detection by another group.”
Ms V.Hema 98
•Suppose that at a point in the project when you believe testing to
be almost complete you look at the seeded defect report. You find
that 31 seeded defects and 600 indigenous defects have been
reported.
Ms V.Hema 99
Defect seeding(Cont)
Important points:
To use defect seeding, you must seed the defects prior to
the beginning of the tests whose effectiveness you want to
ascertain.
Ms V.Hema 100
Challenges:
•A common problem with defect seeding programs is forgetting
to remove the seeded defects.
Ms V.Hema 101