DR. AJAY KUMAR PATHAK
ASSISTANT PROFESSOR
READ ALL THE NOTES CHAPTER WISE
MINOR PAPER
SUBJECT NAME:- MN–2C (Th):- SOFTWARE TESTING
FOR B. Sc. IT.
SEM 6 F.Y.U.G.P.
Copyright © by Dr. Ajay kumar pathak
B. Sc. IT. SEMESTER 6 NOTES BASED ON NEP
SUBJECT : MN–2C (Th): SOFTWARE TESTING
(To be selected by the students from)
UNIT 2 (UNIT NAME):- TEST PLANNING AND TEST CASE DESIGN
Semester Examination and Distribution of Marks
Semester internal examination (SIE):- 25 Marks
End Semester Examination (ESE) :- 75 Marks
Objective: The objective of this course is to provide students with an understanding of software testing principles, techniques, and methodologies. The course aims to develop students' skills in designing test cases, executing tests, and reporting defects.
Course Outcome: By the end of this course, students should be able to:
· Understand the importance of software testing in the software development life cycle.
· Apply different testing techniques and methodologies.
· Design and execute test cases to verify software functionality.
· Identify and report software defects effectively.
· Understand the role of automated testing tools in software testing.
UNIT- 2 :- TEST PLANNING AND TEST CASE DESIGN
TEST PLAN:-
A test plan is a detailed
document that outlines the strategy, resources, schedule, and scope of testing
activities for a specific project. It describes how the testing will be carried
out, including the types of testing to be performed, the features to be tested,
the tasks to be completed, the personnel involved, the resources required, the
test environment setup, and the timeline for testing. The test plan is tailored
to the needs of a particular project and serves as a guide for the testing team
to execute testing activities efficiently and effectively.
Example of a Test
Plan
Here's a simplified example of
a test plan for a web application project:
Document Title: cswithpathak.blogspot.com Web Application Test Plan
1. Introduction:- Purpose of the document, Objectives of testing
2. Test Items:- List of items to be tested, including specific
features and functionalities of the web application.
3. Features to Be
Tested:- User authentication and
authorization, Form input validation, Database interaction, Responsive design
across different devices and browsers
4. Features Not to Be
Tested:- Third-party payment gateway
integration (assumed to be tested by the third-party provider)
5. Approach:- Description of the overall testing strategy,
including manual testing for user experience aspects and automated testing for
regression and performance testing.
6. Pass/Fail
Criteria:- Definitions of criteria for
passing or failing a test case.
7. Suspension
Criteria and Resumption Requirements:- Conditions
under which testing will be suspended and resumed.
8. Test
Deliverables:- Test plan document, Test
cases/scripts, Test reports
9. Testing Tasks:- Specific tasks to be performed, such as test case
preparation, test execution, bug reporting, and re-testing.
10. Environmental
Needs:- Description of the hardware,
software, network setup, and other resources required for the test environment.
11.
Responsibilities:- Roles and
responsibilities of the team members involved in the testing process.
12. Staffing and
Training Needs:- Requirements for
staffing and any specific training needed for the testing team.
13. Schedule:- Detailed timeline for all testing activities,
including start and end dates for test preparation, execution, and evaluation
phases.
14. Risks and Contingencies:- Identification of potential risks to the testing
schedule or quality and plans for mitigating these risks.
15. Approval:- Signatures of the project manager, test manager, and
other key stakeholders indicating approval of the test plan.
Types of Test Plan:-
1. Master Test Plan:- A master plan has all the key details and provides a
complete overview of the testing process.
It’s a high-level document that rarely goes through any reviews. A
Master Test Plan is a high-level document that outlines the overall testing
strategy, scope, and phases for a project. It provides a roadmap for the entire
testing process and shows how different levels of testing connect with each
other. This plan ensures that all testing activities are aligned and helps keep
the project on track.
2. Specific Test
Plan:- Strategies for conducting specific
types of testing include security and performance tests. Performance testing is
a type of software testing used to find how a system acts and executes under a
certain load. Security testing is software testing used to identify weaknesses
in the system and assess whether its resources and data are protected from
potential attackers.
A Specific Test Plan focuses on
particular types of testing, like load testing, performance testing, or
security testing. It provides detailed instructions and guidelines for carrying
out these specialized tests, ensuring that each area is tested thoroughly.
(3) Analytical Test Strategies:- Analytical Test Strategies are based on specific
factors like project requirements, specifications, or risks. For example:
i. User Acceptance Testing is based on user requirements to make sure the software meets the needs of the end-users.
ii. System Testing is
based on the technical specifications to check if each part of the system
functions correctly.
Advantages of a Test
Plan:-
·
A test plan
directs software testers in mitigating risks to prevent issues.
·
In software
testing, a well-structured document, the test plan, is referenced at various
testing stages to keep everyone aligned.
·
It provides
valuable information to the entire team, including managers, developers, and
customers, enabling a clear understanding of testing specifics.
·
It functions as a
reference schedule.
·
It keeps users in
the loop about ongoing efforts to deliver a high-quality outcome.
·
The test plan
plays a crucial role as a guide for the subsequent stage of test case
development.
·
Test plans are
used to compose sprints for Agile methodology in project management tools like
Jira.
·
It helps predict
the time versus effort ratio and estimates additional costs in case of delays.
Disadvantages of a
Test Plan:-
·
Creating and
maintaining a detailed test plan takes time and resources. This is especially
true for smaller projects, where the investment might not be as justifiable.
·
The software
development process is rarely static. A rigid test plan might struggle to adapt
to changes in scope, features, or deadlines. This can lead to frequent updates
and rework.
·
Limited testing
resources can make it challenging to create a comprehensive test plan. This
could lead to delays or an incomplete plan that doesn’t cover all
functionalities.
·
The test plan
might not be flexible enough to adapt to the most suitable testing
methodologies or technologies for the project. This can lead to inefficiencies
in the testing process.
·
If the test plan
doesn’t clearly communicate the testing approach and goals to stakeholders, it
can lead to misunderstandings and disappointment regarding the scope and depth
of testing.
TEST STRATEGY DEVELOPMENT:-
A test strategy is a high-level
document that outlines the general approach, objectives, and main principles of
the software testing process within an organization. It defines the test design
techniques to be used, the testing process, and the way in which testing will
be carried out to ensure that the software meets its requirements. The test
strategy is not project-specific but applies to multiple projects, setting a
standardized approach to testing across the organization.
It covers aspects like testing
objectives, test levels (unit, integration, system, and acceptance testing),
test types (functional, performance, security, usability testing), roles and
responsibilities, tool selection, risk management strategies, and test
environment setup.
Example of a Test
Strategy:-
Here is a simplified example of
what might be included in a test strategy document for a software development
company:
Document Title: cswithpathak.blogspot.com
Software Test Strategy
1. Introduction:- Purpose of the document, Scope of testing within the
organization
2. Test Objectives:- Ensure software reliability, performance, and
security, Meet all specified requirements and user expectations
3. Test Levels:-
i.
Unit Testing:
Developers will perform to validate individual components.
ii. Integration Testing: To ensure that integrated
components function together.
iii. System Testing: End-to-end testing of the complete
application.
iv. Acceptance Testing: Conducted with real users to
ensure the system meets their needs.
4. Test Types:-
i.
Functional
Testing: To verify that each function of the software operates in conformance
with the requirement specification.
ii. Performance Testing: To ensure the software performs
well under expected workloads.
iii. Security Testing: To identify any vulnerabilities
within the software.
iv. Usability Testing: To ensure the software is
user-friendly and intuitive.
5. Roles and
Responsibilities:-
i.
Test Manager:
Overall responsibility for the test strategy and coordination.
ii. Test Engineers: Execute tests according to plan.
iii. Developers: Unit testing and fixing reported bugs.
iv. Quality Assurance: Oversee the overall quality and
adherence to the strategy.
6. Tools and
Technologies:- List of software and tools
used for managing and executing tests (e.g., JIRA for bug tracking, Selenium
for automated testing).
7. Risk Management:- Identification of potential risks and the strategies
to mitigate them.
8. Test Environment:- Specification of the test environment setup,
including hardware, software, and network configurations.
9. Approval:- Sign-off by the test manager and project
stakeholders.
Advantages of
Software Testing Strategies:-
Advantages
i.
Improved Quality:
A well-defined testing strategy ensures thorough testing, leading to a
higher-quality product.
ii. Better Risk Management: Focusing on high-risk areas
helps identify and resolve potential issues early.
iii. Cost and Time Savings: Planning the testing process
helps avoid redundant efforts and reduces the cost of fixing late-stage bugs.
iv. Increased Stakeholder Confidence: A clear and
transparent strategy builds trust and confidence among stakeholders.
v. Higher Return on Investment (ROI): Investing in a good
testing strategy that balances manual and automated testing can lead to a
higher ROI by efficiently allocating resources and improving product quality.
Disadvantages of
Software Testing Strategies:-
i. High Initial
Effort: Developing a detailed testing strategy takes time and effort. This can
be a challenge for teams with tight deadlines.
ii. Lack of Flexibility: A rigid strategy can make
adapting to changes in project requirements challenging, which can lead to
delays if adjustments are needed. Agile methodologies can help offer
flexibility, so it is something you should consider when deciding on the right
strategy.
iii. Resource Intensive: A comprehensive strategy may
require specialized tools and personnel. This could increase project costs.
iv. Upfront Investment in Automation: Implementing
automated testing requires an initial investment in tools and training, which
can impact the project’s budget.
Test strategy
development:-
(1) Analytical Test Strategy:-In this strategy, testing is based on risk analysis
and requirements. The main focus is on identifying high-risk areas and testing
them more thoroughly.
The test team studies:- Requirements
documents, Risk factors, Business impact, Probability of failure.
Example, in a banking
application, the money transfer module is high risk because any defect may
cause financial loss. So testers give more priority to testing that module.
(2) Model-Based Test Strategy:- In this approach, testing is performed based on models
of the system.
Models can be:- Flowcharts,
State transition diagrams, Decision tables, UML diagrams
For example, in an ATM system,
a state transition diagram can show states like “Insert Card,” “Enter PIN,”
“Transaction,” and “Exit.” Test cases are created based on these states and
transitions.
(3) Methodical Test Strategy:- In this strategy, testing is performed according to predefined
checklists or quality standards.
The testing process follows:- Standard
test conditions, Quality guidelines, Industry standards
For example, in a web
application, testers may use a checklist like:- Check login functionality, Check
form validation, Check UI alignment, Check error messages.
(4) Process-Oriented (Standard-Compliant) Test
Strategy:- This strategy follows industry
standards and processes strictly.
Examples of standards:- IEEE
829 (Test Documentation Standard), ISO 9001 (Quality Management Standard), It
is suitable for:- Government projects, Large enterprise systems, Regulated
industries
(5) Dynamic (Heuristic) Test Strategy:-In this strategy, testing is based on:-Experience, Skill,
Intuition of testers. This strategy is useful in:- Agile projects, Startups, Rapid
development environments
Test Strategy vs Test
Plan: Comparison:-
|
Aspect |
Test Strategy |
Test Plan |
|
Definition |
A high-level document
outlining the overall approach, principles, and goals of the testing process
across the organization. |
A detailed document
describing specific testing activities, resources, schedules, and
responsibilities for a particular project. |
|
Objectives |
To define the principles
followed during the Quality Assurance test procedure. |
To outline how, when and what
to test, who will test it, and who will authenticate the results. |
|
Purpose |
Provides high-level guidance
for testing |
Offers detailed instructions
for testing |
|
Scope |
Outlines overall approach and
methodology |
Defines specific testing
objectives and scope |
|
Types |
Different test strategies
are: standard-compliant, methodical, model-based, analytical, reactive,
consultative, & regression-averse strategies. |
Different test plans are:
type-specific, level-specific, & master test plans. |
|
Audience |
Testing team, project
stakeholders |
Testing team, project stakeholders |
|
Level of Detail |
High-level overview |
Detailed guidance |
|
Timing |
Created early in the project
lifecycle |
Developed after Test Strategy |
|
Content |
Approach, objectives, methods |
Objectives, scope, schedule,
resources, tasks |
|
Focus |
Overall testing direction |
Specific testing activities |
|
Risk Management |
Includes risk mitigation
strategies |
May include risk
identification and mitigation |
|
Communication |
Communicates testing approach
to stakeholders |
Provides detailed
instructions to testers |
|
Flexibility |
Provides flexibility for
adapting to changes |
Offers specific guidance for
testing activities |
|
Updates |
May require updates as
project progresses |
May be updated based on test
results or changes |
TEST CASE DESIGN
TECHNIQUES:-
Test Case Design Techniques are
systematic methods used to create effective test cases. These techniques help
testers design maximum test coverage with minimum number of test cases, saving
time and effort while improving software quality.
A well-designed test case
ensures that it:- Covers the maximum possible scenarios, Is easy to execute and
understand, Minimizes redundancy, Detects errors efficiently. Test Case Design
Techniques is very Important because it Ensure maximum test coverage with
minimal effort, Save time and resources by identifying issues early in the
development lifecycle, Enhance test efficiency and effectiveness, Reduce the
likelihood of overlooking critical defects.
Test case design techniques are
mainly classified into:
(1) Black Box Techniques
(2) White Box Techniques OR Structure-Based
Techniques
(3) Experience-based test design techniques
(1) BLACK BOX TECHNIQUES OR SPECIFICATION-BASED
TECHNIQUES:- It’s a technique that
examines how software works by providing inputs and observing the outputs. For
example, if the app should do X when you input Y, your job is to confirm that’s
what happens.
Here’s what comes under
black-box testing:-
(A) Equivalence Partitioning (EP):- It’s a technique that divides input domains into
classes of data – with the help of which test cases can be derived. That means
instead of testing every value, you test one from each group and assume the
rest behave the same.
For instance, if a form is
supposed to accept ages between 18 and 59, you don’t need to test every single
age. Just pick a few: maybe one from the valid range (30), one below (17), and
one above (60). This allows you to test all conditions without any repetition.
(B) Boundary Value Analysis (BVA):- This technique tests the boundary values of valid and
invalid partitions.
For example, if a software
allows values from 18 to 59, you only test inside the boundary (18, 59) and
just outside (17, 60). BVA is especially useful in numeric input fields,
range-based validation, and limit-based conditions.
(C ) Decision table testing:- Decision Testing Coverage, also known as branch
coverage, validates all the branches in the code by executing each possible
branch from each decision point at least once. This helps ensure that no branch
leads to unexpected application behavior.
Example: If a program requires
an input of a number between 1 and 100 and uses an “if/else” statement to check
if the number is even, decision testing coverage would ensure that both the
even and odd outcomes have been tested to confirm all possible scenarios have
been checked.
(D) Condition Testing, also known as
Predicate coverage testing:- It involves
evaluating each Boolean expression in the code and checking its output values,
TRUE or FALSE, against the expected outcomes. This test checks all outcomes at
least once to achieve 100% code coverage. We design test cases that make it
easy to execute the condition outcomes.
Example: If a program
determines whether a user is eligible for a discount based on age, condition
testing would verify that the code handles each age group accurately. It would
test age values such as one less than, one more than, and within the age range
requirement to evaluate if the code performs as expected.
(E) Use Case Testing: - Use case testing derives test cases from user
scenarios. It’s effective in validating end-to-end workflows and user
interactions.
(2) WHITE BOX TECHNIQUES OR STRUCTURE-BASED
TECHNIQUES:- Structure-based testing,
also known as white-box testing, is a testing technique that involves the
testing of internal structures or components of software applications. In this
approach, the tests interact with the code directly. These tests are designed
to ensure the code works correctly and efficiently.
Types of White Box:-
(A) Statement Testing and Coverage is a technique that involves executing all the
executable statements in the source code at least once. We then calculate the
percentage of executable statements as per the given requirement.
Example: Consider code that
inputs two numbers and checks if the first number is greater than or equal to
the second. A statement coverage test would verify that both the “greater than”
and “equal to” statements are executed during testing to ensure that all code
branches are covered.
(B) Decision Testing Coverage, also known as
branch coverage, Validates all decision
points, such as if-else statements, to ensure all possible outcomes are tested.
( C ) Path Coverage:- This involves designing test cases to test all
possible paths in the program at least once. If your code has three different
if-else branches, it ensures all three get tested, including combinations where
different branches run together.
(D) Data flow testing:- Variables move throughout the code – they get created,
modified, or used. Data flow testing checks whether they’re used correctly and
whether any uninitialized or wrongly modified values exist. This technique
helps find hard-to-spot bugs, like using a variable before it’s been assigned a
value.
(3) EXPERIENCE-BASED TEST DESIGN TECHNIQUES:-
This isn’t your typical
technique. It’s a dynamic approach that relies on a tester’s intuition, skills,
and past experiences. Its ability lies in uncovering test scenarios that might
slip through the cracks of other rigid methodologies.
(A) Error guessing:- If you’ve tested enough apps, you’ll start noticing
patterns – places where bugs always appear to pop up. Maybe entering special
characters in input fields of the app is causing crashes. Maybe hitting back on
a payment screen is breaking the process.
Error guessing involves testing
areas that are likely to fail based on past knowledge.
(B) Exploratory testing:- Here, you interact with the app like a real user. You
try different inputs, navigate the app unexpectedly, and push buttons in ways
that might break something. Exploratory testing enables you to test things you
wouldn’t do formally. This is one of the practical test case writing techniques
that’s perfect for validating new features, complex workflows.
Advantages of Test
Case Design Techniques:-
i.
Guarantees
comprehensive coverage.
ii. Detects defects more effectively than ad-hoc test
cases.
iii. Provides reproducible tests with detailed descriptions
of order and content.
iv. Standardizes the process, making it independent of
individual testers.
v. Ensures that test specifications are transferable and
maintainable.
vi. Simplifies planning and managing the test process by
splitting it into clear, manageable blocks.
vii. Helps identify complex scenarios and generate
effective test data.
viii.Ensures that all software requirements are met.
Disadvantages of Test
Case Design Techniques :-
i.
Appropriate
communication and coordination with the tester
ii. Competition among similar service providers
iii. Lack of experienced professionals
iv. Finding the right service provider
TEST DATA PREPARATION
AND TEST ENVIRONMENT SETUP:-
TEST DATA PREPARATION
IN SOFTWARE TESTING :- Test Data
Preparation in software testing is the process of creating, collecting,
modifying, and managing data that is used to execute test cases. In simple
words, it means preparing the required input data that testers will use to
check whether the software application works correctly or not.
Whenever we test any software
system, we need some input values. These input values are called test data. If
the data is not correct, complete, and realistic, then testing will not give
accurate results. Therefore, test data preparation is a very important activity
in the Software Testing Life Cycle (STLC).
Test data can include:-
·
Usernames and
passwords
·
Customer details
·
Product
information,
·
Transaction records
·
Files and
documents
·
Images, videos,
etc.
·
Boundary
conditions are verified
·
Invalid cases are
checked
·
Security and
performance are validated
Example to understand
test data preparation:-
Suppose we are testing a
Banking Application.:- One feature is Money Transfer.
To test this feature we need:-
Sender account number, Receiver account number, Available balance, Transfer
amount
Now, we must prepare
different types of data such as:-
i. Valid account numbers
ii. Invalid account numbers
iii. Account with sufficient balance
iv. Account with insufficient balance
v. Negative transfer amount
vi. Zero transfer amount
All these values together form
test data.
TYPES OF TEST DATA
PREPARATION:-
(1) VALID TEST DATA:- Valid test data means correct and acceptable data that
should be successfully processed by the system.
Example:- In a login page:- Username:
ajay123, Password: Ajay@123
(2) INVALID TEST DATA:- Invalid test data means incorrect or unacceptable data
used to verify whether the system handles errors properly.
Example:- Login page:-
Username: (blank), Password: Ajay@123,
Expected Result: Error message
"Username required"
(3) BOUNDARY TEST DATA:- Boundary test data is used to test minimum and
maximum limits of input values.
This concept is based on Boundary Value Analysis.
Example:- Suppose password
length must be between 8 and 16 characters.
Test Data:-
7 characters → Invalid
8 characters → Valid
16 characters → Valid
17 characters → Invalid
(4) POSITIVE TEST DATA:- Positive test data is used to check whether the
system works correctly with expected inputs.
It verifies normal behavior.
Example:-
User fills all required fields
correctly in a registration form.
Expected Result: Account
created successfully.
This type focuses on “What
system should do”.
(5) REALISTIC (PRODUCTION-LIKE) TEST DATA:- This data is similar to real-world data used in
production.
It is useful for:- Performance
testing, Load testing, Security testing,
Example:- If an e-commerce website like Amazon is tested,
testers may prepare:
Thousands of product records, Millions
of customer accounts, Large transaction history
(6) MASKED TEST DATA:- Masked data is real production data but sensitive
information is hidden or modified for security.
Sensitive data includes:-
PAN number
Aadhaar number
Credit card details
Example:-
Original
data:- Card Number: 1234 5678 9012 3456
Masked
data:- Card Number: XXXX XXXX XXXX 3456
TEST ENVIRONMENT IN
SOFTWARE TESTING :-
A test environment consists of
a combination of servers, hardware, software, and network configurations used
to run the testing software. These configurations are set up according to
prepared test cases to test the software across different devices, browsers,
operating systems, and various real-life scenarios.
A test environment is a setup
that mimics the conditions of the actual device or browser, where software will
run. It is used to detect defects, code errors, and weakness through manual or
automated testing.
A testing environment is
created to verify whether the developed software product meets the user
requirements. If it does not, the environment helps identify the gap between
the actual results and the expected outcomes. A stable and controlled
environment is required for efficient testing. Prepared test cases cannot
produce accurate results if the test environment is affected by unexpected or
external variables.
It consists of the following
key components:- Hardware , Software
(operating systems, applications, tools, configurations), Network
Infrastructure, Test Data.
Types of Test
Environment:-
In a software development life
cycle, testers must create different test environments to meet specific testing
needs.
(1) Security Testing Environment:- This test environment analyzes
software for security gaps, errors, and weakness , focusing especially on data
confidentiality, compliance, user authentication, and authorization. A security
testing environment helps both internal and external cyber security experts
identify which parts of the software are most likely to be targeted and
determine how malicious code can infiltrate the system.
(2) Integration Testing Environment:- It is to test if various
modules can easily integrate to form a fully-functional software because often
these modules consist of source codes, third-party applications, clients, app
servers, and shared databases. Testers use this environment to simulate the
production environment to check the integration functionalities of the
software.
(3) Chaos Testing Environment:- Sometimes, software in production
environments suddenly faces an extreme flow in traffic, putting significant
stress on the network and the application servers. Chaos testing allows you to
check how your software would perform under extreme circumstances or when
exposed to sudden stress or pressure. Different sets of conditions are set up
to imitate real-life stressful situations in this software testing environment.
(4) Staging Environment:- It’s an environment where you create an
instance of the app to demonstrate it to stakeholders and not end users. This
environment accurately simulates the production environment but is restricted
to selected people. Only the developer team, whitelisted IP addresses, and
approved email addresses can access and use the application in the staging
environment.
(5) Production Environment:- It’s the environment where the
application runs on the production server and is accessible to real users.
However, before making it officially live for all the users, the software is
given to selected groups of people for beta testing in a dedicated beta testing
environment. Here, the users would test the software to identify any issues,
especially those related to performance. If any defects or bugs are found, they
are immediately fixed before deploying it to everyone.
(6) Chaos testing environment: - Chaos testing environment aims
to test the software applications for stress or specific failures. For example,
to test the application’s performance in case of a drastic traffic increase.
Challenges in Test
Environment:-
(1) Automating the Tests:- Automation enhances the speed and efficiency of
testing activities. Therefore, quality analysts often prioritize automated
testing instead of manual testing. However, test automation involves
technology-intensive activities, such as writing test scripts and managing
automation frameworks.
So, the process demands the
supervision of an expert with strong technical knowledge and experience in test
automation. Tools like Testgrid allow you to run scriptless tests, but even
those tests require minimal coding knowledge. In short, it’s highly challenging
for non-tech professionals to set up or run automated tests in a test
environment.
(2) Planning Resource Utilization:- Improper resource allocation and utilization can lead
to unfinished tasks, conflicts between teams, poor outcomes, and other issues.
The entire testing process can get disrupted from its objective if the
resources of the test environment are not managed efficiently.
(3) Dependency on external environment:- There
are scenarios where the test environment depends on the external environment.
In such cases, the testing team has to rely on the support team for various
test assets like hardware, software, etc.
(4) Collaboration between teams:- There is a possibility that the test results are not
accurate in the cases where the test environment is shared between the
different teams.
(5) Setting up complex tests;- Some of the tests require extensive test environment
configuration. The team may need to consider factors like time and resources to
conduct complex tests.
THE END UNIT 2 (UNIT
:- TEST PLANNING AND TEST CASE DESIGN )

No comments:
Post a Comment
PLEASE DO LEAVE YOUR COMMENTS