[go: up one dir, main page]

0% found this document useful (0 votes)
4 views41 pages

Unit 3 Notes

Unit-3 covers test design and execution, focusing on identifying test objectives, designing test cases, and various testing methods such as boundary value testing, equivalence class testing, and path testing. It also discusses the bug life cycle, test design factors, and the importance of testable requirements, along with metrics for assessing test preparedness and effectiveness. The document emphasizes the need for structured test design processes and effective communication throughout the testing lifecycle.

Uploaded by

raaavuuu088
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views41 pages

Unit 3 Notes

Unit-3 covers test design and execution, focusing on identifying test objectives, designing test cases, and various testing methods such as boundary value testing, equivalence class testing, and path testing. It also discusses the bug life cycle, test design factors, and the importance of testable requirements, along with metrics for assessing test preparedness and effectiveness. The document emphasizes the need for structured test design processes and effective communication throughout the testing lifecycle.

Uploaded by

raaavuuu088
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Unit-3

TEST DESIGN AND EXECUTION


Test Objective Identification, Test Design Factors,
Requirement identification, Testable Requirements,
Modeling a Test Design Process, Modeling Test Results,
Boundary Value Testing, Equivalence Class Testing, Path
Testing, Data Flow Testing, Test Design Preparedness
Metrics, Test Case Design Effectiveness, Model-Driven
Test Design, Test Procedures, Test Case Organization and
Tracking, Bug Reporting, Bug Life Cycle.
Test objectives identification:
• Finding defects which may get created by the programmer while
developing the software.
• Gaining confidence in and providing information about the level of quality.
• To prevent defects.
• To make sure that the end result meets the business and user requirements.
• To ensure that it satisfies the BRS that is Business Requirement
Specification and SRS that is System Requirement Specifications.
• To gain the confidence of the customers by providing them a quality
product.
Requirement identification:
We analyze, refine, and the gathered requirements to make consistent and
unambiguous requirements. This activity reviews all requirements and may
provide a graphical view of the entire system.

Boundary value testing:


• It is used to test boundary values , they are those that contain the
upper and lower limit of a variable.it test whether the software is
producing correct output or not.
• It is based on testing the boundary values of valid and invalid partitions.
• It checks for the input values near the boundary that have a higher chance
of error. Every partition has its maximum and minimum values and these
maximum and minimum values are the boundary values of a partition.
• A boundary value for a valid partition is a valid boundary value.
• A boundary value for an invalid partition is an invalid boundary value.
For each variable may we check-
• Minimum value.
• Just above the minimum.
• ust below Max value.
• Max value.

Example: Consider a system that accepts ages from 20 to 28.


Invalid Valid Invalid

(Min-1) (Min, Min+1, Max, Max-1) (Max+1)


20-1 20, 21, 28, 27 28+1
Test Case Scenarios:
1. Input: Enter the value of age as 20 (20-1)

Output: Invalid

2. Input: Enter the value of age as 20

Output: Valid

3. Input: Enter the value of age as 20 (20+1)

Output: Valid
4. Input: Enter the value of age as 28
Output: Valid
5. Input: Enter the value of age as 28 (28-1)

Output: Valid

6. Input: Enter the value of age as 28(28+1)

Output: Invalid
Advantages:
• It works well when the product is under test.
• It is easy to find the defects between the two boundaries.
Disadvantages:
• BVA is quite rudimentary.
Ex:- Let us assume the next test case that takes the length of the input
name from 8 to 14 characters.

Path testing:
• In path testing method, the control flow graph of a program is designed to
find a set of linearly independent paths of execution.
• In this method Cyclomatic Complexity is used to determine the number of
linearly independent paths and then test cases are generated for each path.
• It is a structural testing method that uses the source code of a program
to find every possible executable path.
Path testing process:
Control Flow Graph:
Draw the corresponding control flow graph of the program in which all the
executable paths are to be discovered.

Cyclomatic Complexity:
After the generation of the control flow graph, calculate the cyclomatic
complexity of the program using the following formula.

Cyclomatic Complexity = E - N + 2P

Where,
E = Number of edges in control flow graph
N = Number of vertices in control flow graph
P = Program factor
Make Set:
Make a set of all the path according to the control flow graph and calculated
cyclomatic complexity. The cardinality of set is equal to the calculated
cyclomatic complexity.

Create Test Cases:


Create test case for each path of the set obtained in above step.
Path Testing Techniques:

Control Flow Graph:


The program is converted into control flow graph by representing the code
into nodes and edges.
Decision to Decision path:
The control flow graph can be broken into various Decision to Decision
paths and then collapsed into individual nodes.

Independent paths:
Independent path is a path through a Decision to Decision path graph which
cannot be reproduced from other paths by other methods.

Advantages of Path Testing:

• This testing method reduces the redundant tests.


• It focuses on the logic of the programs.
• Path testing is used in test case design.
Data Flow Testing:
• It is a type of structural testing. It is a method that is used to find the test
paths of a program according to the locations of definitions and uses of
variables in the program. It has nothing to do with data flow diagrams.

It is concerned with:
Statements where variables receive values,
Statements where these values are used or referenced.

• Data Flow Testing uses the control flow graph to find the situations that
can interrupt the flow of the program.
• It defines anomalies in the flow of the data are detected at the time
of associations between values and variables.
These anomalies are:
• A variable is defined but not used,
• A variable is used but never defined,
• A variable is defined twice before it is used
Example:

1. read x, y;
2. if(x>y)
3. a = x+1
else
4. a = y-1
5. print a;
Control flow graph:
Define/use of variables:

Advantages:

• To find a variable that is used but never defined.


• To find a variable that is defined but never used.
• To find a variable that is defined multiple times before it is use.
• Deallocating a variable before it is used.
Disadvantages:
• Time consuming and costly process.
• Requires knowledge of programming languages.

Equivalence class testing:


• Equivalence partitioning is a technique of software testing in which
input data is divided into partitions of valid and invalid values, and it
is mandatory that all partitions must exhibit the same behavior.
• The principle of equivalence partitioning is, test cases should be designed
to cover each partition at least once. Each value of every equal partition
must exhibit the same behavior as other.
• It is a black box testing method which undergo two steps,
Divides the input domain into classes of data.
Derive test cases based on these partitions.
Importance of Equivalence Class Testing:
• It is one of the powerful testing process in entire software testing
approach that helps in making the process agile.

• It helps in reducing the overall number of test cases without hampering


the test coverage for the applications.

• This testing approach is useful in terms of minimizing the overall


execution time for test cases as it helps in minimizing the bulk data for
testing purpose and at the same time maintaining its efficiency.

• The testing method also enables the testing team to focus mainly on
smaller sets of data that increases the probability of finding and solving
more and more defects in the software products
Advantages:
• It helps to decrease the general test execution time and also reduce the set
of test data.

• It gain good coverage with a small number of test cases.

• It eliminates the need for comprehensive testing.

Disadvantades:
• This technique will not consider the condition for boundary value
analysis.
Example:
An OTP number which contains only six digits, less or more than six digits
will not be accepted, and the application will redirect the user to the error
page.
OTP Number = 6 digits
Bug life cycle:
• Bug Life Cycle is a life cycle of defect or bug from which it goes
through covering the specific set of states in its entire life.

• Mainly bug life cycle refers to its entire states starting from a new defect
is detected to closing of that defect by tester.
• The journey of Bug Cycle varies from organization to organization and
also from project to project because development procedures and
platforms as well as testing methods and testing tools differ depending
upon organizations and projects.
Workflow of bug life cycle: New

Assigned
Valid bug Duplicated
Open Rejected Differed
Or Not a bug
Fixed Not

Bug
Reopned Retest
Present
Verified

Closed
1.New:
When any new defect is identified by tester, it falls in ‘New’ state. It is first
state of Bug Life Cycle. The tester provides a proper bug document to
Development team so that development team can refer to bug Document and
can fix bug accordingly.
2. Assigned:
When the defect is assigned to developer team then status of bug changes to
‘Assigned’ state.
3. Open:
In this ‘Open’ state the defect is being addressed by developer team and
developer team works on the defect for fixing the bug. Based on some specific
reason if developer team feels that defect is not appropriate then it is
transferred to either ‘Rejected’ or ‘Deferred’ state.
4.Fixed:
After necessary changes of codes or after fixing identified bug developer
team marks state as ‘Fixed’.
5.Retest:
At this stage, tester starts work of retesting defect to check whether defect
is fixed by developer or not, and the status is marked as ‘Retesting’.
6.Reopen:
After ‘Retesting’ if tester team found that bug continues like previously even
after developer team has fixed the bug, then status of bug is again changed to
‘Reopened’. Once again bug goes to ‘Open’ state and goes through life cycle
again. This means it goes for Re-fixing by the developer team.
7.Verified:
The tester re-tests bug after it got fixed by developer team & if tester does
not find any kind of bug then bug is fixed and status assigned is ‘Verified’.
8.Closed:
It is the final state of bug Cycle, after fixing defect by developer team when
team testing found that the bug has been resolved and it does not persist then
they mark defect as a ‘Closed’ state.
Rejected:
If the developer team rejects defect if they feel that defect is not considered
as a genuine defect, and then they mark status as ‘Rejected’. The cause of
rejection may be any of these three i.e Duplicate Defect, NOT a Defect, Non-
Reproducible.
Deferred:
If the developer team feels that defect that is identified is not a prime priority
and it can get fixed in further updates or releases then developer team can
mark status as ‘Deferred’. Means from current defect life cycle it will be
terminated.
Duplicate:
Some times it may happen that defect is repeated twice or defect is same as
any other defect then it is marked as ‘Duplicate’ state and then defect is
‘Rejected’.
Not a bug:
If the defect has no impact or effect on other functions of the software then
it is marked as ‘NOT A DEFECT’ state and ‘Rejected’.
Advantages:
Deliver High-Quality Product
Improve Return on Investment (ROI) by Reducing the Cost of Development
Better Communication, Teamwork and Connectivity
Detect Issues Earlier and Understand Defect Trends
Better Service and Customer Satisfaction
Test Design Factors:
• It’s refers to the consideration and principles that helps the creation of
effective test case.
Test Factors are:
• Test objective:The objectives of testing are the specific goals & outcomes
that you want to achieve from testing.

• Test Coverage:Test coverage is defined as a technique which determines


whether our test cases are actually covering the application code and how
much code is executed. If there are 10 requirements and 100 tests created
and if 90 tests are executed then test coverage is 90%.
• Test Techniques: It defines the test techniques or methods used to design
and execute tests to evaluate software applications.
• Test case prioritization: It is the process of ordering the test cases to be
conducted eventually. Prioritizing test cases aids to meet two important
constraints namely time and budget in software testing in order to enhance
the fault detection rate as early as possible.
• Test data: It includes the inputs and expected outputs for test execution.
It has both invalid as well as valid data for finding defects.
• Test Environment: It consists of the hardware and the software
configurations for executing the tests.
• Test Maintainability: It is a probability measure that a product will be
maintained or restored to the specified function for a specified period of
time at any specific level of repair conditions.
The other factors are,
• Performance
• Compatibility
• Integration
• Security

• Test Scalability: It defines the ability of the test cases by increasing the
workload and complexity.
Testable Requirements:
• These are the requirements that tested whether they meet their actual
requirements or not.
• Its mainly focus on finding the defects early and testing the software
effectively.
Characteristics:
• Clarity
• Measurability
• Completeness
• Consistency
• Traceability
• Non contradictory
• Verifiable
• Traceable
• Testability reviews
Benefits of having testable requirements:
• Effective Testing
• Early defect detection
• Improved communication
Modeling a test design process:
• It involves in creating a systematic and structured representation of the
steps involved in designing test cases. The key steps are,
• Identify test objectives
• Gather requirements
• Analyze requirements
• Identify test conditions
• Select test techniques
• Design test cases
• Organize test cases
• Prioritize test cases
• Review and refine
• Document and maintain
Benefits:
• Improved efficiency
• Improved effectiveness
Challenges:
• Complexity
• Time
• Cost
Modeling a test result:
• It involves in creating a model for test result.
• It involves in capturing, analyzing, and visualizing the outcomes of the
software execution.
• It also defines the software result should be in the structured manner and
meaningful way for better understanding.

• Test result data


• Defect tracking
• Test metrics and reporting
• Test result analysis
• Risk assessment
• Test coverage analysis
Benefits :
• Improved analysis
• Improved decision making

Test design preparedness metrics:


• These are used to assess the readiness and quality of the software by
ensuring that the testing is well prpared and capable for identifying the
defects .
The metrics are,
• Test coverage metrics
• Test case completeness metrics
• Requirement traceability metrics
• Test case efficiency metrics
• Test case clarity metrics
• Test case maintenance effort metrics
• Number of test case created
• Number of test case executed
• Number of defect found
• Test case execution time
• Test case failure rate
• Test design preparedness metrics can be valuable tool for improving the
quality of the software.
Test case design effectiveness:
• It measures the quality and efficiency of test cases in identifying issues,
validating system behavior and ensuring the desired level of test coverage.

• Test coverage
• Test case relevance
• Clear objectives
• Test case independence
• Test data accurancy
• Reproducibility
• Test case efficiency
• Maintainability
Model Driven test design:
• It is a software testing technique that uses model to represent the behavior
of the software under test.
Types:
1. Use case model
2. Data flow model
3. State machine model
Benefits:
• Increased coverage
• Automated test generation
• Improved efficiency
• Reduced defects
Challenges:
• Complexity
• Tool support
• Skills
Test procedres:
• It is a document that describes the steps to execute a test case.
• It refer to a set of predefined steps and instructions that help to execute the
test case.
Key aspects:
• Purpose and Scope
• Test environment setup
• Test execution seps
• Test data and input instructions
• Expected results and validation
• Test cleanup and restoration
• Documentation and reporting
• Iterative refinement
Elements:
• Purpose of the test
• Steps of the test
• The Expected results
• Preconditions
• Postconditons
Benefits:
• Consistency
• Documentation
• Communication
• Reusability
Test case organization and tracking:
• It is the process of managing test case throughout the software
development process.
• It involves creating,storing,updating and executing test cases as well as
rackinh the results and status.
• It aslo helps to ensure that test results are accurate and the defects are
ientified and fixed promptly.
Methods:
1. Test case management tool
2. Using Spreadsheet
3. Using a text document
Benefits:
• Improved efficiency
• Increased accuuracy
• Improved communication
• Reduced risk

You might also like