STF Unit-Iv Notes
STF Unit-Iv Notes
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.
This is very expensive as it requires huge time and resources.
Prioritize the test cases depending on business impact, critical and frequently used
functionalities. Selection of test cases based on priority will greatly reduce the regression test
suite.
1. 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.
Also ensures that enhancements or defect fixes made to the software works properly
and does not affect the existing functionality.
Types:
1. Regular regression testing: Is done between test cycles to ensure that the defect fixes are
done and the functionality that were working with the earlier test cycles continue to
work.
2. Final regression testing: Is done to validate the final build before release.
Test-Automation:
An effective regression strategy, saves organization’s both time and money. But in current time
it more refers to the term Automate, Automate, Automate.
Following are some automation tools:
Quick test professional
Rational functional tester
Selenium
• Firstly, whenever we make some changes to the source code for any reasons like adding
new functionality, optimization, etc.
• Then our program when executed fails in the previously designed test suite for obvious
reasons.
• After the failure, the source code is debugged in order to identify the bugs in the program.
The major functionality of sanity testing is to determine that the changes or the
proposed functionality are working as expected.
If the sanity test fails, software product is rejected by the testing team to save time and
money.
It is performed only after the software product has passed the smoke test and Quality
Assurance team has accepted for further testing.
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.
5. EXECUTION TRACE
“The execution traces present the order of the statements that are touched during
the execution of the test cases.”
It is a technique used for selection of 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.
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.
6. DYNAMIC SLICING
Slicing: Program slicing is a technique for simplifying programs by focusing on selected aspects
of semantics.
Slicing or program slicing is a technique used in software testing which takes a slice or a
group of program statements in the program for testing particular test conditions or
cases and that may affect a value at a particular point of interest.
It can also be used for the purpose of debugging in order to find the bugs more easily
and quickly.
Types of slicing: a. Static slicing b. Dynamic slicing
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.
• It considers every possible execution of the program.
2. Dynamic slicing:
A dynamic slice of a program contains all the statements that actually affect the value of a
variable at any point for a particular execution of the program.
• Dynamic slices are generally smaller.
• Considers only a particular execution of the program.
As it can be observed in the above example that static slice takes all the possible
execution (in this case it is 2) of the program which may affect the value of the
variable sum.
Whereas in case of dynamic slicing, it considers only a particular execution of the
program which may affect the value of the variable sum.
Hence, dynamic slice is always smaller than a static slice.
As it can be observed in the above example that static slice takes all the possible
execution (in this case it is 2) of the program which may affect the value of the
variable sum.
Test case minimization techniques are used to minimize the testing cost in terms of execution
time, resources etc.
Main purpose of test case minimization techniques is to remove test cases that become
redundant and obsolete over time.
These techniques can be categorized as
Heuristic based.
Genetic algorithm based approach.
Integer Linear Programming based approach.
Hybrid techniques.
(Call tree and clustering based techniques).
Heuristic based techniques
• Heuristic G
• Heuristic GE
• Heuristic GRE
Genetic algorithm
Integer Linear Programming
Hybrid techniques combine two or more techniques into single for significant reduction in
test suites and multi-objective optimization but provide high complexity. More number of
techniques can be incorporated with existing hybrid techniques.
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.)
Genetic algorithm based approach uses production, mutation and crossover to produce
representative set.
Integer Linear Programming based approach uses equation form to find minimal set.
Adhoc testing can be achieved with the Software testing technique called Error
Guessing.
Error guessing can be done by the people having enough experience on the system to
"guess" the most likely source of errors.
When shall we execute Ad hoc Testing?
Ad hoc testing can be performed when there is limited time to do elaborative testing.
Usually ad hoc testing is performed after the formal test execution.
And if time permits, ad hoc testing can be done on the system.
Ad hoc testing will be effective only if the tester is knowledgeable of the System Under
Test.
Types of Ad hoc testing
Forms of Ad hoc 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.
Monkey Testing: Testing is performed randomly without any test cases in order to break
the system.
Ways to make Ad hoc Testing More Effective
Preparation.
Creating a Rough Idea.
Divide and Rule.
Targeting Critical Functionalities
Using Tools.
Documenting the findings
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.
Creating a Rough Idea: By creating a rough idea in place the tester will 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.
10. PAIR TESTING
Pair Testing: Software development technique in which two team members work together
at one keyboard to test the software application.
One does the testing and the other analyzes or reviews the testing.
This can be done between one Tester and Developer or Business Analyst or between two
testers with both participants taking turns at driving the keyboard.
A vital software testing technique, pair testing session involves two individuals or team
members, who work on a single workstation/keyboard to test various aspects of a
software application.
This type of testing basically comes under ad-hoc testing and aims at pairing two
individuals to work on same software product and on the same machine.
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.”
Pro Con
• This testing is useful when requirement documents are not • This testing purely depends
available or partially available on the tester skills
• It involves Investigation process which helps find more bugs • Limited by domain
than normal testing- knowledge of the
• Uncover bugs which are normally ignored by other testing tester
techniques • Not suitable for Long
• Helps to expand the imagination of testers by executing more execution time
and more test cases which finally improves productivity as
well
• This testing drill down to the smallest part of an application
and covers all the requirements
• This testing covers all the types of testing and it covers
various scenarios and cases
• Encourages creativity and intuition
• Generation of new ideas during test execution
oOo