Unit 3 Notes
Unit 3 Notes
Output: Invalid
Output: Valid
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
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.
Independent paths:
Independent path is a path through a Decision to Decision path graph which
cannot be reproduced from other paths by other methods.
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:
• 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.
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 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 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