unit 3 SVVT

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

lOMoARcPSD|50824503

test generation

Computer science engineering (I. K. Gujral Punjab Technical University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Tisha Thakral (thakraltisha@gmail.com)
lOMoARcPSD|50824503

UNIT-3
TEST GENERATION
Test genera琀椀on in so昀琀ware tes琀椀ng is the process of crea琀椀ng a set of test cases or test scripts
that are speci昀椀cally designed to assess and verify the func琀椀onality, performance, security, or
other aspects of a so昀琀ware applica琀椀on or system. This process aims to ensure that the
so昀琀ware works correctly and meets its intended requirements. Test genera琀椀on can be done
manually or automated using various techniques and tools.

TEST GENERATIONS FROM REQUIREMENTS

Genera琀椀ng test cases from so昀琀ware requirements is a fundamental step in the so昀琀ware
tes琀椀ng process. It ensures that the so昀琀ware meets the speci昀椀ed func琀椀onal and non-
func琀椀onal requirements and behaves as expected. Here's an explana琀椀on of how to generate
test cases from requirements in so昀琀ware tes琀椀ng:
1. Requirement Analysis:
 Start by carefully reviewing and understanding the so昀琀ware requirements
documenta琀椀on. This may include func琀椀onal requirements, non-func琀椀onal
requirements, user stories, use cases, and any other relevant speci昀椀ca琀椀ons.
2. Iden琀椀fy Testable Scenarios:
 Break down the requirements into speci昀椀c testable scenarios or test cases.
Each test case should focus on one par琀椀cular aspect or func琀椀onality of the
so昀琀ware.
3. Boundary Condi琀椀ons:
 Pay special a琀琀en琀椀on to boundary condi琀椀ons, edge cases, and error handling
requirements within the requirements. These o昀琀en lead to cri琀椀cal defects
and should be tested thoroughly.
4. Posi琀椀ve and Nega琀椀ve Test Cases:
 Create both posi琀椀ve test cases (valid inputs leading to expected results) and
nega琀椀ve test cases (invalid inputs leading to error condi琀椀ons) to ensure
comprehensive coverage.
5. Equivalence Par琀椀琀椀oning:
 Apply equivalence par琀椀琀椀oning to group similar inputs and create test cases
that represent each par琀椀琀椀on. This helps reduce redundancy in your test
cases.
6. State Transi琀椀on Tes琀椀ng:
 For systems with state-based behaviour, iden琀椀fy state transi琀椀on requirements
and design test cases to cover these transi琀椀ons.
7. Use Case Tes琀椀ng:
 If you have use cases or user stories, create test cases that simulate how users
would interact with the so昀琀ware to achieve their goals.
8. Data-Driven Tes琀椀ng:
 If the requirements involve data manipula琀椀on, create test cases with various
data sets to validate the so昀琀ware's handling of di昀昀erent data inputs.

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

9. Requirements Traceability:
 Ensure that each test case is traceable back to the speci昀椀c requirement it is
tes琀椀ng. This helps in comprehensive test coverage and requirement
valida琀椀on.
10. Priority and Risk-Based Tes琀椀ng:
 Priori琀椀ze test cases based on the cri琀椀cality of the func琀椀onality they cover and
the poten琀椀al risks associated with it. Focus on high-priority areas 昀椀rst.
11. Test Design Techniques:
 U琀椀lize test design techniques such as boundary value analysis, decision
tables, state transi琀椀on diagrams, and equivalence class par琀椀琀椀oning to
systema琀椀cally create test cases.
12. Test Precondi琀椀ons and Postcondi琀椀ons:
 De昀椀ne any precondi琀椀ons (condi琀椀ons that must be true before the test case
can be executed) and postcondi琀椀ons (expected outcomes or condi琀椀ons a昀琀er
the test case execu琀椀on) for each test case.
13. Nega琀椀ve Path Tes琀椀ng:
 Ensure that you include test cases that follow nega琀椀ve paths, tes琀椀ng how the
so昀琀ware handles unexpected or erroneous inputs and situa琀椀ons.

By following these steps, you can systema琀椀cally generate test cases that cover the full
spectrum of requirements and ensure thorough tes琀椀ng of the so昀琀ware. This helps in
iden琀椀fying and addressing defects early in the development process, leading to a more
robust and reliable 昀椀nal product.

DATA FLOW ANALYSIS


Data 昀氀ow analysis is a sta琀椀c analysis technique used in so昀琀ware tes琀椀ng and program
analysis to analyse how data is processed and 昀氀ows through a program. It is especially
valuable for iden琀椀fying poten琀椀al issues related to data dependencies, variable usage, and
security vulnerabili琀椀es. Here's an overview of data 昀氀ow analysis in so昀琀ware tes琀椀ng:

Data Flow Analysis:


 Data 昀氀ow analysis is a method for examining how data is created, modi昀椀ed,
and consumed as it 昀氀ows through a program. It focuses on tracking the 昀氀ow
of data between variables, func琀椀ons, and modules.

Use Cases of Data Flow Analysis:


 Data 昀氀ow analysis is used for various purposes in so昀琀ware tes琀椀ng, including:
 Detec琀椀ng data-related defects and vulnerabili琀椀es.
 Iden琀椀fying poten琀椀al data races and deadlocks in concurrent programs.
 Understanding variable scope and life琀椀me.
 Iden琀椀fying opportuni琀椀es for op琀椀miza琀椀on.
 Assessing security vulnerabili琀椀es like informa琀椀on leakage and
injec琀椀on a琀琀acks.

Basic Concepts in Data Flow Analysis:

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

 Data 昀氀ow analysis relies on several fundamental concepts, including:


 Variables: Iden琀椀fying variables and their de昀椀ni琀椀ons and uses in the
program.
 Data Dependencies: Tracking how data 昀氀ows from one variable to
another through assignments, func琀椀on calls, and other opera琀椀ons.
 Control Flow: Analysing how the program's control 昀氀ow a昀昀ects data
昀氀ow.
 Liveness Analysis: Determining when a variable is "live" or "dead"
(i.e., whether it is used or overwri琀琀en) at di昀昀erent program points.
 Reaching De昀椀ni琀椀ons: Iden琀椀fying which de昀椀ni琀椀ons of a variable can
reach a par琀椀cular program point.

Types of Data Flow Analysis:


 There are various types of data 昀氀ow analysis, each tailored to speci昀椀c
objec琀椀ves, including:
 Forward Data Flow Analysis: Starts at the program's entry point and
analyses how data 昀氀ows forward through the program's execu琀椀on.
 Backward Data Flow Analysis: Starts at the program's exit points (e.g.,
return statements) and analyses how data 昀氀ows backward from there.
 Intraprocedural Data Flow Analysis: Focuses on a single procedure or
func琀椀on.
 Interprocedural Data Flow Analysis: Analyses data 昀氀ow across
mul琀椀ple procedures or func琀椀ons.

Data Flow Analysis Techniques:


 Data 昀氀ow analysis techniques o昀琀en use data 昀氀ow graphs or control 昀氀ow
graphs to represent and analyse data 昀氀ow pa琀琀erns within the program.
 Common techniques include reaching de昀椀ni琀椀ons analysis, available
expressions analysis, constant propaga琀椀on analysis, and tainted data analysis
(for security tes琀椀ng).

Bene昀椀ts of Data Flow Analysis in So昀琀ware Tes琀椀ng:


 Data 昀氀ow analysis can help testers and developers:
 Iden琀椀fy poten琀椀al bugs related to unini琀椀alized variables, null pointer
dereferencing, and use-a昀琀er-free issues.
 Detect security vulnerabili琀椀es like SQL injec琀椀on, cross-site scrip琀椀ng
(XSS), and sensi琀椀ve data exposure.
 Understand how data is manipulated, which can aid in debugging and
op琀椀mizing code.
 Analyse concurrency-related issues in mul琀椀-threaded programs.
 Improve code quality by iden琀椀fying dead code and unused variables.

Challenges and Limita琀椀ons:


 Data 昀氀ow analysis can be computa琀椀onally expensive, especially for large
programs.
 Precision vs. Scalability trade-o昀昀s: Achieving high precision in analysis may
come at the cost of longer analysis 琀椀mes.

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

 Handling complex control 昀氀ow structures and recursive func琀椀ons can be


challenging.
 False posi琀椀ves and false nega琀椀ves are common in data 昀氀ow analysis results,
requiring manual veri昀椀ca琀椀on.
In summary, data 昀氀ow analysis is a valuable technique in so昀琀ware tes琀椀ng and program
analysis for understanding how data moves through a program, iden琀椀fying poten琀椀al defects
and vulnerabili琀椀es, and improving code quality and security. It plays a crucial role in both
sta琀椀c and dynamic analysis approaches.

Finite State models for 昀氀ow analysis


Finite State Model
A Finite State Model (FSM) in the context of test genera琀椀on in so昀琀ware tes琀椀ng is a formal
representa琀椀on of a so昀琀ware system's behaviour that helps testers design and generate test
cases systema琀椀cally. It models the di昀昀erent states the so昀琀ware can be in, the transi琀椀ons
between those states, and the events or ac琀椀ons that trigger those transi琀椀ons. FSMs are used
to ensure comprehensive test coverage and to verify that the so昀琀ware behaves correctly
under various condi琀椀ons. Here's a breakdown of how FSMs are used in test genera琀椀on:
1. States: In an FSM, each state represents a speci昀椀c condi琀椀on or situa琀椀on that the
so昀琀ware can be in during its execu琀椀on. States are o昀琀en associated with speci昀椀c
variables, data values, or system proper琀椀es.
2. Transi琀椀ons: Transi琀椀ons in the FSM depict how the so昀琀ware moves from one state to
another in response to certain events or ac琀椀ons. These events or ac琀椀ons can be user
inputs, system events, or changes in the environment.
3. Events/Ac琀椀ons: Events or ac琀椀ons are the triggers that cause transi琀椀ons between
states. These can include user interac琀椀ons, external signals, 琀椀mer expira琀椀ons, or any
other event relevant to the so昀琀ware's behavior.

Types of Finite State models:


Mealy machines
Mealy machines are a type of simple state machine where the next state is determined by
the current state and the given input.
The next state is determined by checking which input generates the next state with the
current state. Imagine a bu琀琀on that only works when you’re logged in. That bu琀琀on is a state
machine with login as the current state.
The new state is determined by logging in. Once you’re logged in, the next state is
determined by the current state which is logged in.

Moore Machines
A Moore State Machine is a type of state machine for modelling systems with a high degree
of uncertainty. In these systems, predic琀椀ng the exact sequence of future events is di昀케cult.
As a result, it is di昀케cult to determine the next event.
A Moore model captures this uncertainty by allowing the system to move from one state to
another based on the outcome of a random event.

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

A Moore model has many applica琀椀ons in both industry and academia. For example, it can be
used to predict when a system will fail or when certain events will occur with a high
probability (e.g., when there will be an earthquake).
It can also be used as part of an op琀椀miza琀椀on algorithm when dealing with uncertain inputs
(e.g., produce only 1% more product than standard).
In addi琀椀on, Moore models are o昀琀en used as rules for automa琀椀c control systems (e.g.,
medical equipment) that need to respond quickly and accurately without human
interven琀椀on.

Turing Machine
The Turing Machine consists of an input tape (with symbols on it), an internal tape (which
corresponds to memory), and an output tape (which contains the result).
A Turing Machine operates through a series of steps: it scans its input tape, reads out one
symbol at a 琀椀me from its internal tape, and then applies this symbol as a command (or
decision) to its output tape. For example: “If you see ‘X’ on the input tape, then print ‘Y’ on
the output tape.”
The input tape can be considered a 昀椀nite set of symbols, while the internal and output tapes
are in昀椀nite. The Turing Machine must read an en琀椀re symbol from its internal tape before it
can move its head to the next symbol on the input tape.
Once it has moved its head to the next symbol, it can read that symbol out of its internal
tape and then move to the next symbol on its input tape.
This process con琀椀nues un琀椀l no more input or output symbols are le昀琀 in the Turing Machine’s
internal or external tapes (at which point, it stops).

State Machine Use Cases


State machines are helpful for a variety of purposes. They can be used to model the 昀氀ow of
logic within a program, represent the states of a system, or for modelling the 昀氀ow of events
in a business process.
There are many di昀昀erent types of state machines, ranging from simple to highly complex. A
few common use cases include:

Modelling Business Work昀氀ow Processes


State machines are ideal for modelling business work昀氀ows. This includes account setup
昀氀ows, order comple琀椀on, or a hiring process.
These things have a beginning and an end and follow some sort of sequen琀椀al order. State
machines are also great for modelling tasks that involve condi琀椀onal logic.

Business Decision-Making
Companies pair FSMs with their data strategy to explore the cause and e昀昀ect of business
scenarios to make informed business decisions.
Business scenarios are o昀琀en complex and unpredictable. There are many possible outcomes,
and each one impacts the business di昀昀erently.
A simula琀椀on allows you to try di昀昀erent business scenarios and see how each plays out. You
can then assess the risk and determine the best course of ac琀椀on.

So昀琀ware Design

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

Developers use state machines to model how a user interacts with the applica琀椀on. These
models are also helpful in modelling business logic 昀氀ow in the system.
In both cases, state machines help visualize the 昀氀ow of the applica琀椀on and organize the
code in a maintainable fashion.
State machines are o昀琀en used to improve the user experience, especially in apps with lots of
steps or where there’s a risk of user abandonment.
For example, a booking app might use a state machine to track the progress of a booking
and display a di昀昀erent set of 昀椀elds based on the stage of the booking.
While the booking process might be linear, the user experience can be improved by o昀昀ering
relevant 昀椀elds upfront and removing them as soon as they are no longer required.
You can think about this concept as having a conversa琀椀on with your users: you have a set of
ques琀椀ons you need to ask, but the order in which you ask them, and the 琀椀ming with which
you ask them, can have a signi昀椀cant impact on the user experience, and ul琀椀mately on your
company’s bo琀琀om line.
State machines help developers ensure their so昀琀ware is e昀케cient, scalable and
maintainable.

Regular expressions based testing


Regular expressions based tes琀椀ng is a so昀琀ware tes琀椀ng approach that uses regular
expressions to de昀椀ne and execute test cases. Regular expressions are pa琀琀erns used for
matching and manipula琀椀ng text, making them a valuable tool in tes琀椀ng scenarios that
involve string valida琀椀on, data extrac琀椀on, pa琀琀ern recogni琀椀on, and more.

Here's an explana琀椀on of how regular expressions are used in tes琀椀ng:

1. Pa琀琀ern Matching and Valida琀椀on:


 Regular expressions allow you to de昀椀ne pa琀琀erns that specify the expected
format or structure of text or data.
 Tes琀椀ng using regular expressions involves comparing the actual data with the
de昀椀ned pa琀琀ern to determine if it matches the expected format.
2. Input Valida琀椀on:
 In input valida琀椀on tes琀椀ng, regular expressions are used to verify that user-
provided data conforms to a speci昀椀c pa琀琀ern or format.
 For example, you can use regex to ensure that email addresses, phone
numbers, or dates entered by users adhere to valid formats.
3. Search and Replace:
 Regular expressions enable testers to search for speci昀椀c pa琀琀erns within text
or data and replace them with other values.
 This can be useful for data manipula琀椀on and transforma琀椀on, as well as for
simula琀椀ng di昀昀erent scenarios in tes琀椀ng.
4. Data Extrac琀椀on:
 Testers use regular expressions to extract speci昀椀c data points or substrings
from a larger dataset.
 Data extrac琀椀on with regex is commonly applied to log analysis, data parsing,
and content extrac琀椀on from documents or web pages.

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

5. Nega琀椀ve Tes琀椀ng:
 Nega琀椀ve tes琀椀ng with regular expressions involves ensuring that speci昀椀c
pa琀琀erns or formats are NOT present in the data.
 Testers use regex to check that sensi琀椀ve informa琀椀on or prohibited content is
absent from text or logs.
6. Func琀椀onal Tes琀椀ng:
 In func琀椀onal tes琀椀ng, regular expressions are employed to validate that
speci昀椀c pa琀琀erns or data formats are correctly processed and displayed by the
so昀琀ware.
 For instance, regex can be used to verify that a text forma琀�ng feature in a
word processing applica琀椀on works as expected.
7. URL and Web Tes琀椀ng:
 Regular expressions are valuable in web tes琀椀ng for valida琀椀ng URLs, web page
content, and data pa琀琀erns.
 Testers use regex to check the structure of URLs, validate web page content,
and extract speci昀椀c data from web pages.
8. API Tes琀椀ng:
 In API tes琀椀ng, regular expressions are used to verify the format and content
of API responses.
 Testers apply regex to validate that API responses match prede昀椀ned pa琀琀erns
or that speci昀椀c error messages are returned.
9. Log Analysis:
 Log analysis and monitoring bene昀椀t from regular expressions to 昀椀lter, search,
and parse log entries.
 Testers use regex to search for speci昀椀c events, errors, or pa琀琀erns in log 昀椀les,
facilita琀椀ng debugging and issue detec琀椀on.
10. Load Tes琀椀ng and Performance Tes琀椀ng:
 Regular expressions can be applied to load and performance tes琀椀ng to
validate server responses and response 琀椀mes.
 Testers use regex to con昀椀rm that responses meet expected pa琀琀erns and that
response 琀椀mes are within acceptable limits under various load condi琀椀ons.
11. Security Tes琀椀ng:
 In security tes琀椀ng, regular expressions help iden琀椀fy pa琀琀erns associated with
vulnerabili琀椀es or a琀琀acks.
 Testers use regex to detect poten琀椀al security threats like SQL injec琀椀on, cross-
site scrip琀椀ng (XSS), or sensi琀椀ve data exposure in input data.
Regular expressions based tes琀椀ng is a versa琀椀le approach that can signi昀椀cantly improve the
quality, security, and reliability of so昀琀ware systems by ensuring data and behaviour
conformity to prede昀椀ned pa琀琀erns and standards. However, it's important for testers to have
a solid understanding of regex and carefully design test cases to cover various scenarios
e昀昀ec琀椀vely.

Test Selection
Test selec琀椀on in so昀琀ware tes琀椀ng is the process of choosing which test cases or test scenarios
to execute from a larger pool of available tests. This decision is made based on several

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

factors to ensure that the tes琀椀ng process is e昀昀ec琀椀ve, e昀케cient, and aligned with project
goals. Here's an explana琀椀on of test selec琀椀on in so昀琀ware tes琀椀ng:

1. Priori琀椀za琀椀on: Test cases are priori琀椀zed based on factors such as cri琀椀cality, risk, and
business impact. Cri琀椀cal func琀椀onali琀椀es or areas of the so昀琀ware that are more likely
to contain defects are given higher priority.
2. Resource Management: Test selec琀椀on considers available tes琀椀ng resources,
including 琀椀me, budget, and tes琀椀ng environments. It aims to make the best use of
these resources while achieving the desired test coverage.
3. Regression Tes琀椀ng: Test selec琀椀on includes regression tests, which are executed to
ensure that exis琀椀ng func琀椀onality remains intact a昀琀er code changes or updates.
Regression tests are crucial for maintaining so昀琀ware quality.
4. Coverage Goals: It aligns with coverage goals de昀椀ned for the tes琀椀ng phase. Coverage
can be measured in terms of code coverage (e.g., statement coverage, branch
coverage) or requirements coverage to ensure that all cri琀椀cal areas are adequately
tested.
5. Risk Assessment: Test selec琀椀on involves assessing the risks associated with di昀昀erent
parts of the so昀琀ware. High-risk areas are tested more rigorously to uncover poten琀椀al
defects early in the development cycle.
6. Tes琀椀ng Types and Levels: Di昀昀erent types of tes琀椀ng (e.g., unit tes琀椀ng, integra琀椀on
tes琀椀ng, system tes琀椀ng) and tes琀椀ng levels (e.g., component-level, system-level) may
require speci昀椀c test selec琀椀on strategies to address speci昀椀c goals and objec琀椀ves.
7. Feedback Loop: Test selec琀椀on is an itera琀椀ve process that considers feedback from
previous test runs. It adapts test selec琀椀on decisions based on the results and defects
found in earlier tes琀椀ng phases.
8. Requirements Alignment: It ensures that test cases align with so昀琀ware requirements
and user stories. Test selec琀椀on veri昀椀es that all speci昀椀ed func琀椀onali琀椀es and features
are adequately tested.
9. Automa琀椀on: Test automa琀椀on is leveraged to select and execute automated test
scripts e昀케ciently, especially for repe琀椀琀椀ve and 琀椀me-consuming test scenarios.
10. Con琀椀nuous Integra琀椀on/Con琀椀nuous Delivery (CI/CD) Integra琀椀on: In CI/CD pipelines,
test selec琀椀on is integrated to automa琀椀cally trigger relevant tests as part of the
con琀椀nuous integra琀椀on and deployment process.
11. Documenta琀椀on: Test selec琀椀on decisions are documented to provide traceability and
ra琀椀onale for why speci昀椀c tests were chosen, aiding in repor琀椀ng and audi琀椀ng e昀昀orts.
12. Exit Criteria: Clear exit criteria are de昀椀ned to determine when tes琀椀ng for a par琀椀cular
phase or cycle is complete. Test selec琀椀on ensures that these criteria are met.

E昀昀ec琀椀ve test selec琀椀on is crucial for achieving comprehensive tes琀椀ng while managing
constraints and resources e昀케ciently. It ensures that the most cri琀椀cal and high-impact test
cases are executed, leading to higher so昀琀ware quality and reliability.

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

Minimizations and Prioritization


In test genera琀椀on in so昀琀ware tes琀椀ng, minimiza琀椀on and priori琀椀za琀椀on are crucial strategies to
enhance the e昀케ciency and e昀昀ec琀椀veness of the tes琀椀ng process. These techniques help in
genera琀椀ng and execu琀椀ng test cases that provide comprehensive test coverage while
managing resources and focusing on cri琀椀cal aspects of the so昀琀ware. Here's an explana琀椀on
of minimiza琀椀on and priori琀椀za琀椀on in test genera琀椀on:

Test Case Minimiza琀椀on:

1. Objec琀椀ve: Test case minimiza琀椀on aims to reduce the number of generated test cases
while maintaining or improving test coverage. It focuses on elimina琀椀ng redundancy
and op琀椀mizing the test suite.

2. Techniques:
 Coverage-Based Minimiza琀椀on: Remove redundant test cases that cover the
same code paths, requirements, or states.
 Dependency Analysis: Analyse test case dependencies and retain only the
most cri琀椀cal and independent ones.
 Equivalence Class Par琀椀琀椀oning: Group similar test cases into equivalence
classes and select representa琀椀ve test cases from each class.
 Pairwise Tes琀椀ng: Generate a subset of test cases that cover all pairwise
combina琀椀ons of input values, reducing the number of test cases.

3. Bene昀椀ts:
 Reduces tes琀椀ng e昀昀ort, saving 琀椀me and resources.
 Maintains or enhances test coverage, ensuring defect detec琀椀on.
 Simpli昀椀es test suite maintenance and execu琀椀on.

Test Case Priori琀椀za琀椀on:


1. Objec琀椀ve: Test case priori琀椀za琀椀on focuses on ordering generated test cases to
maximize their e昀昀ec琀椀veness in uncovering defects early in the tes琀椀ng process.

2. Techniques:
 Risk-Based Priori琀椀za琀椀on: Priori琀椀ze test cases based on their risk exposure,
cri琀椀cality, and poten琀椀al impact on the so昀琀ware.
 Code Change Impact: Give higher priority to test cases that cover areas of the
code that have been recently modi昀椀ed.
 Fault Proneness Analysis: Analyse historical defect data to priori琀椀ze test
cases in areas of the so昀琀ware that have been prone to defects.
 Requirements-Based Priori琀椀za琀椀on: Priori琀椀ze test cases based on the
importance of verifying speci昀椀c requirements.

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

3. Bene昀椀ts:
 Iden琀椀昀椀es and addresses cri琀椀cal defects early in the tes琀椀ng cycle.
 Op琀椀mizes tes琀椀ng 琀椀me and resources by focusing on high-priority test cases.
 Enhances overall so昀琀ware quality by addressing cri琀椀cal issues promptly.

Combining Minimiza琀椀on and Priori琀椀za琀椀on:


 Combining minimiza琀椀on and priori琀椀za琀椀on techniques is a powerful approach to
op琀椀mize test case genera琀椀on and execu琀椀on. By minimizing the test suite 昀椀rst and
then priori琀椀zing the remaining test cases, tes琀椀ng teams can achieve both e昀케ciency
and e昀昀ec琀椀veness.

Challenges:
 Balancing the trade-o昀昀 between minimizing test cases and maintaining adequate
coverage can be challenging.
 Iden琀椀fying the most cri琀椀cal test cases for priori琀椀za琀椀on requires a deep
understanding of the so昀琀ware's requirements, architecture, and poten琀椀al risks.
In summary, minimiza琀椀on and priori琀椀za琀椀on are integral to e昀케cient and e昀昀ec琀椀ve test
genera琀椀on in so昀琀ware tes琀椀ng. Minimiza琀椀on reduces redundancy in test cases, while
priori琀椀za琀椀on ensures that cri琀椀cal test cases are generated and executed early in the tes琀椀ng
process, resul琀椀ng in higher-quality so昀琀ware delivered within resource constraints.

Regression Testing
Regression tes琀椀ng is a black box tes琀椀ng techniques. It is used to authen琀椀cate a code change
in the so昀琀ware does not impact the exis琀椀ng func琀椀onality of the product. Regression tes琀椀ng
is making sure that the product works 昀椀ne with new func琀椀onality, bug 昀椀xes, or any change in
the exis琀椀ng feature.
Regression tes琀椀ng is a type of so昀琀ware tes琀椀ng. Test cases are re-executed to check the
previous func琀椀onality of the applica琀椀on is working 昀椀ne, and the new changes have not
produced any bugs.
Regression tes琀椀ng can be performed on a new build when there is a signi昀椀cant change in the
original func琀椀onality. It ensures that the code s琀椀ll works even when the changes are
occurring. Regression means Re-test those parts of the applica琀椀on, which are unchanged.
Regression tests are also known as the Veri昀椀ca琀椀on Method. Test cases are o昀琀en
automated. Test cases are required to execute many 琀椀mes and running the same test case
again and again manually, is 琀椀me-consuming and tedious too.

Example of Regression tes琀椀ng


Here we are going to take a case to de昀椀ne the regression tes琀椀ng e昀케ciently:
Consider a product Y, in which one of the func琀椀onality is to trigger con昀椀rma琀椀on, acceptance,
and dispatched emails. It also needs to be tested to ensure that the change in the code not
a昀昀ected them. Regressing tes琀椀ng does not depend on any programming language
like Java, C++, C# etc. This method is used to test the product for modi昀椀ca琀椀ons or any
updates done. It ensures that any change in a product does not a昀昀ect the exis琀椀ng module of

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

the product. Verify that the bugs 昀椀xed and the newly added features not created any
problem in the previous working version of the So昀琀ware.

When can we perform Regression Tes琀椀ng?


We do regression tes琀椀ng whenever the produc琀椀on code is modi昀椀ed.
We can perform regression tes琀椀ng in the following scenario, these are:

1. When new func琀椀onality added to the applica琀椀on.


Example:
A website has a login func琀椀onality which allows users to log in only with Email. Now
providing a new feature to do login using Facebook.

2. When there is a Change Requirement.


Example:
Remember password removed from the login page which is applicable previously.

3. When the defect 昀椀xed


Example:
Assume login bu琀琀on is not working in a login page and a tester reports a bug sta琀椀ng that the
login bu琀琀on is broken. Once the bug 昀椀xed by developers, tester tests it to make sure Login
Bu琀琀on is working as per the expected result. Simultaneously, tester tests other func琀椀onality
which is related to the login bu琀琀on.

4. When there is a performance issue 昀椀x


Example:
Loading of a home page takes 5 seconds, reducing the load 琀椀me to 2 seconds.

5. When there is an environment change


Example:
When we update the database from MySQL to Oracle.

How to perform Regression Tes琀椀ng?

The need for regression tes琀椀ng comes when so昀琀ware maintenance includes enhancements,
error correc琀椀ons, op琀椀miza琀椀on, and dele琀椀on of exis琀椀ng features. These modi昀椀ca琀椀ons may
a昀昀ect system func琀椀onality. Regression Tes琀椀ng becomes necessary in this case.
Regression tes琀椀ng can be performed using the following techniques:

Downloaded by Tisha Thakral (thakraltisha@gmail.com)


lOMoARcPSD|50824503

1. Re-test All:
Re-Test is one of the approaches to do regression tes琀椀ng. In this approach, all the test case
suits should be re-executed. Here we can de昀椀ne re-test as when a test fails, and we
determine the cause of the failure is a so昀琀ware fault. The fault is reported, we can expect a
new version of the so昀琀ware in which defect 昀椀xed. In this case, we will need to execute the
test again to con昀椀rm that the fault 昀椀xed. This is known as re-tes琀椀ng. Some will refer to this
as con昀椀rma琀椀on tes琀椀ng.
The re-test is very expensive, as it requires enormous 琀椀me and resources.

2. Regression test Selec琀椀on:


o In this technique, a selected test-case suit will execute rather than an en琀椀re test-case
suit.
o The selected test case suits divided in two cases
1. Reusable Test cases.
2. Obsolete Test cases.
o Reusable test cases can use in succeeding regression cycle.
o Obsolete test cases can't use in succeeding regression cycle.

3. Priori琀椀za琀椀on of test cases:


Priori琀椀ze the test case depending on business impact, cri琀椀cal and frequently func琀椀onality
used. Selec琀椀on of test cases will reduce the regression test suite.

Downloaded by Tisha Thakral (thakraltisha@gmail.com)

You might also like