Software Testing Unit 1 2 3 Printed Notes
Software Testing Unit 1 2 3 Printed Notes
UNIT I
Review of Software Engineering: Overview of Software Evolution, SDLC, Testing Process,
Verification and Validation, Test Cases, Testing Suite, Test ,Oracles, Impracticality of Testing
All Data; Impracticality of Testing All Paths. Verification: Verification Methods, SRS
Verification, Source Code Reviews, User Documentation Verification, Software, Project Audit,
Configuration Audits
UNIT II
Functional Testing: Boundary Value Analysis, Equivalence Class Testing, Decision Table
Based Testing, Cause Effect Graphing Technique. Structural Testing: Control Flow Testing,
UNIT III
Regression Testing: What is Regression Testing? Regression Test cases selection, Reducing the number
of test cases, Code coverage prioritization technique. Reducing the number of test
UNIT IV
Software Testing Activities: Levels of Testing, Debugging, Testing techniques and their
applicability, Exploratory Testing Automated Test Data Generation: Test Data, Approaches to
test data generation, test data generation using genetic algorithm, Test Data Generation Tools, Software
Testing Tools, and Software test Plan.
UNIT V
Object Oriented Testing: Definition, Issues, Class Testing, Object Oriented Integration and
System Testing. Testing Web Applications: Web Testing, User Interface Testing, Usability
Testing, Security Testing, Performance Testing, Database testing, Post Deployment Testing
Software Testing
Software evolution is the process of continuously changing and improving software over
time. This can involve adding new features, fixing bugs, optimising performance, or adapting
the software to work with new technologies or platforms.
• Maintenance.
1. Test Plan
Test plan should include provisions about the quantity of work to be done,
timelines and milestones to be completed, testing techniques, and other formalities
like contingencies and hazards.
2. Analysis
In Analysis a functional validation matrix is generated. The in-house or offshore
testing team evaluates the requirements and test cases that will be automated and
those that will be manually tested.
3. Design
In the design stage, the testing team creates appropriate scripts for automated test
cases and generates test data for both automated and manual test cases.
4. Development
The development stage involves unit testing as well as the creation of performance
and stress test strategies.
5. Execution
The testing team run unit tests, followed by functionality tests and detects
vulnerabilities on a surface level and report them to software developers.
6. Bug Fixes
The testing team finds an issue and forwarded to the IT development team. If the
development team decides to remedy the bugs, the testing team must retest the
product to ensure that no new bugs are introduced while correcting.
7. Software Implementation
Software implementation is the last and utmost important phase of software
testing when all test cases and processes have been finished. The program or
software is given to the end-user, who analyses it and reports if any errors are
found.
Terminologies in Testing:
Bug: bug refers to defects which means that the software product or
the application is not working as per the adhered requirements (any
type of logical error which causes our code to break).
Error: Errors are generated due to wrong logic, syntax, or loop that
can impact the end-user experience.
Verification
It is a process that determines the quality of the software. Verification is a relatively
objective process includes all the activities associated with producing high quality
software, i.e.: testing, inspection, design analysis, specification analysis, and so on. The
various processes and documents are expressed precisely enough no subjective judgment
should be needed in order to verify software.
Validation
Validation is a process in which the requirements of the customer are actually met by the
software functionality. Validation is done at the end of the development process and takes
place after verifications are completed.
Verification Validation
Test Case
A test case is a defined format for software testing required to check if a
particular application/software is working or not. It consists of a certain set of
conditions that need to be checked to test an application or software. (when
conditions are checked it checks if the resultant output meets with the expected
output or not.)
Some used parameters such as ID, condition, steps, input, expected result, result,
status, and remarks.
Test Suite
A test suite is a set of tests designed to check the functionality and
performance of the software. It collects individual test cases based on
their specific purpose or characteristics.
A test suite is a collection of test cases grouped according to a specific
set of criteria, In that testers can identify and prioritize the most critical
tests, ensuring that the most important aspects of the software are tested
first. This helps reduce the risk of missed errors or defects during
testing.
Parameter Test Suite Test Case
A collection of test A set of inputs, preconditions,
cases that are designed and expected outcomes that are
Definition to test a specific designed to test a particular
feature or functionality aspect of the software
of the software
Function Tests multiple Tests a single scenario or
scenarios and functionality
functionalities
Dependency It can be dependent on Test cases, ideally, run
other Test Suites independently of each other
Priority Can be prioritized Can be prioritized based on the
based on the severity of the issues they
functionality they uncover
cover
Purpose Validate broad Validate specific detailed
functional scenarios
requirements
In cases where explicit oracles are absent, testers rely on their intuition,
experience, or industry standards to determine the expected outcome. Implicit
oracles are subjective and may vary from one tester to another.
Path Testing
Path Testing is a method that is used to design the test cases. In that method,
the control flow graph of a program is designed to find a set of linearly
independent paths of execution. Cyclomatic Complexity (it is a method used
for stability and level of confidence in a program) is used to determine the
number of independent paths and then test cases are generated for each path.
Code Review
The code review is a methodical process where a group of developers work
together to analyze and check another developer’s code to detect errors, give
suggestions, and confirm if the developed code is as per the standards. The
objective of code review is to enhance the quality, maintainability, stability,
security etc of the software which bring positive results to the project.
Testing Documentation
Testing documentation is the artifacts that are created during or before the
testing of a software application. Documentation reflects the importance of
processes for the customer, individual and organization.
Once the test document is ready, the entire test execution process
depends on the test document. The primary objective for writing a test
document is to decrease or eliminate the doubts related to the testing
activities.
Test case:
It is a step by step procedure to test an application. It consists of
the complete navigation steps and inputs and all the scenarios that
need to be tested for the application.
Test plan:
The test plan consists of multiple components such as Objectives,
Scope, Approach, Test Environments, Test methodology,
Template, Role & Responsibility, Effort estimation, Entry and
Exit criteria, Schedule, Tools, Defect tracking, Test
Deliverable, Assumption, Risk, and Mitigation Plan or
Contingency Plan.
Requirement traceability matrix(RTM)
Requirement traceability matrix [RTM] is a document which
ensures that all the test case has been covered. This document is
created before the test execution process to verify that we did not
miss writing any test case for the particular requirement.
Test strategy
Test strategy is a high-level document, which is used to verify the
test types (levels) to be executed for the product and what kind of
technique has to be used and which module is going to be tested.
It includes the multiple components such as documentation
formats, objective, test processes, scope, and customer
communication strategy, etc
Test data
It is data that occurs before the test is executed. It is mainly used
when tester are implementing the test case. Mostly, tester will
have the test data in the Excel sheet format and entered manually
while performing the test case.
Bug report
Bug report is a document where we maintain a summary of all the
bugs which occurred during the testing process.
Software Audit
Software audits are similar to routine checkups to see if there are any problems
in the software and whether they are safe for their users.
“A software audit is the examination of software performed either
internally or by a third party to assess its compliance with policies and
licenses, software quality, compliance with industry standards, legal
requirements, and others.”
Software Audits can include many different types of activities. Most often, these
are specified types of audits tailored to the client’s current needs.
Walkthrough
walkthrough is a review meeting process but it is different from the
Inspection, as it does not involve any formal process i.e. it is a
nonformal process.
The code or document is read by the author, and others who are present
in the meeting can note down the important points or can write notes on
the defects and can give suggestions about them. The walkthrough is an
informal way of testing, no formal authority is been involved in this
testing.
Advantages and Objectives of Walkthrough:
Following are some of the objectives of the walkthrough.
To detect defects in developed software products.
To fully understand and learn the development of software products.
To properly explain and discuss the information present in the
document.
To verify the validity of the proposed system.
To give suggestions and report them appropriately with new
solutions and ideas.
To provide an early “proof of concept”.
UNIT II
Functional Testing
Functional testing is a type of software testing that verifies the functionality
of a software system or application by checking that ensuring that the
system behaves according to the specified functional requirements and
meets the intended business needs.
A type of testing that verifies that each function of the software application
works in conformance with the requirement and specification. Each
functionality of the software application is tested by providing appropriate
test input, expecting the output, and comparing the actual output with the
expected output. This testing focuses on checking the user interface, APIs ,
database , security , client or server application , and functionality of the
Application Under Test. Functional testing can be manual or automated .
Every partition has its maximum and minimum values and these maximum and
minimum values are the boundary values of a partition.
In simple terms boundary value Analysis is like testing the edge cases of our software
where most of the time it will get broke so it is important to do BVA before deploying
the code.
7 8,9, 13,18,19 20
Equivalence Class Testing -That assists the team in
getting accurate and expected results, within the limited period of time
and while covering large input scenarios and it plays such a significant
role in Software Testing Life Cycle (STLC)
Equivalence class testing can be termed as a logical step in the model
of functional testing. It improves the quality of test cases, which
further enhances the quality of testing, by removing the vast amount of
redundancy and gaps that appear in the boundary value testing.
It is a black box testing technique which restricts the testers to
examine the software product, externally.
Also known by equivalence class partitioning, it is used to
form groups of test inputs of similar behavior or nature.
In that if one member works well in the family then the whole
family is considered to function well and if one members fails,
whole family is rejected.
Test cases are based on classes, not on every input, thereby
reduces the time and efforts required to build large number
of test cases.
It may be used at any level of testing i.e. unit, integration, system
& acceptance.
It is good to go for the ECT, when the input data is available in
terms of intervals and sets of discrete values.
It may not work well with the boolean or logical types variables.
A mixed combination of Equivalence class testing and boundary
value testing produces effective results.
The fundamental concept of equivalence class testing/partition
comes from the equivalence class, which further comes from
equivalence relations.
Decision table technique
This is a systematic approach where various input combinations and their
respective system behavior are captured in a tabular form. That's why it is
also known as a cause-effect table. This technique is used to pick the test
cases in a systematic manner; it saves the testing time and gives good
coverage to the testing area of the software application.
Decision table technique is appropriate for the functions that have a logical relationship
between two and more than two inputs. This technique is related to the correct
combination of inputs and determines the result of various combinations of
input. To design the test cases by decision table technique, we need to
consider conditions as input and actions as output.
A decision table is created for the login function in which we can log in by
using email and password. Both the email and the password are the
conditions, and the expected result is action.
Cause Effect Graph
A cause effect graph is a methodology which helps to generate a
high yield group of test cases. This methodology has come up to
eradicate the loopholes of equivalence partitioning, and boundary
value analysis where testing of all the combinations of input
conditions are not feasible.
Step 1 − Detect the causes and effects from the requirements and then
assign distinct numbers to them. A cause is a unique input condition because
of which the system undergoes some kind of changes. An effect is an output
condition or state of change in the system that is caused by an input
condition.
Step 2 − Create a boolean graph which connects all the causes and effects.
This is known as the cause effect graph which depicts for what all causes
different effects have been generated.
Step 3 − Point out the constraints on the cause effect graph, describing all
the combinations of causes and/or effects which are practically not possible.
Exclusive Constraints
These constraints are between two causes C1, and C2, such that either C1
or C2 can have the value as 1, both simultaneously can not hold the value 1.
Inclusive Constraints
These constraints are between the causes C1, C2, and C3, such that at least
one of them is always equal to 1, and hence all of them simultaneously can
not hold the value 1.
Mask Constraint
These constraints are between the effects E1, and E2, such that if E1 is
equal to 1, then E2 should be 0.
Convert the cause effect graph into a limited entry decision table by linking
the state conditions in the cause effect graph. In the decision table, each
column is converted into a test case.
Identify Function
It says that if the condition C1 and event E1 is related to each other by an
Identify Function, it means that if C1 holds true or equal to 1 then E1 is also
equal to 1, else E1 is equal to 0.
Not Function
It says that if the condition C1 and event E1 is related to each other by a
Not Function, it means that if C1 holds true or equal to 1 then E1 is equal to
0, else E1 is equal to 1.
OR Function
It is denoted by the symbol V. It can be used to relate the ‘n’ number of
conditions to a single effect. It says that if the conditions C1, or C2, or C3
hold true or equal to 1, then the event E1 is equal to 1, else E1 is equal to 0.
AND Function
It is denoted by the symbol /\. It can be used to relate the ‘n’ number of
conditions to a single effect. It says that if both the conditions C1, and C2
hold true or equal to 1, then the event E1 is equal to 1, else E1 is equal to 0.
Structural Testing
Structural testing is related to the internal design and implementation of
the software i.e. it involves the development team members in the testing
team. It tests different aspects of the software according to its types.
Structural testing is just the opposite of behavioral testing.
Mutation Testing:
It is a type of Software Testing that is performed to design new software tests and
also evaluate the quality of already existing software tests. Mutation testing is related
to modification a program in small ways. It focuses to help the tester develop effective
tests or locate weaknesses in the test data used for the program.
UNIT -3
Regression Testing
It is a software quality checkup after any changes are made.
It involves running tests to make sure that everything still
works as it should, even after updates or tweaks to the code.
It is for the software remains reliable and functions properly,
maintaining its integrity throughout its development lifecycle.
Regression testing is a type of QA software testing that ensures
changes or updates to an existing software product do not affect
previously functioning features.
Bug fixes
Software enhancements
Configuration adjustments, and
Even the substitution of electronic components (hardware).
Regression testing is a type of software testing that ensures
existing functionality still works correctly after new features
or updates are introduced. Essentially, it checks whether
new changes cause any issues or "regressions" in the
previously stable code, making sure the old features aren't
broken by the new ones.
1. Re-test All:
In this technique, a selected test-case suit will execute rather than an entire
test-case suit.
Prioritize the test case depending on business impact, critical and frequently
functionality used. Selection of test cases will reduce the regression test suite.
Example1
In the below application, and in the first build, the developer develops the
Search button that accepts 1-15 characters. Then the test engineer tests the
Search button with the help of the test case design technique.
Now, the client does some modification in the requirement and also requests that
the Search button can accept the 1-35 characters. The test engineer will test only
the Search button to verify that it takes 1-35 characters and does not check any
further feature of the first build.
Therefore, we can say that testing the modified features and all the remaining
(old) features is called the Full Regression testing.