Unit I: Testing Methodology
Software Testing
Software testing is the process of evaluating a software application to ensure it meets
specified requirements and works as expected. It involves identifying bugs, errors, or missing
requirements before the software is delivered to users.
Ensures quality and reliability
Detects bugs early, reducing cost
Improves performance and security
Enhances user experience
Goals of Software Testing
Software Testing aims to find and fix bugs early to ensure a high-quality product. It verifies
both functional and non-functional requirements. It also improves reliability and reduces
cost and risk.
Detects defects early
Ensures requirement validation
Improves quality and reduces risk
Types of Goals in Software Testing
The goals of software testing may be classified into three major categories, which are as
follows:
1. Immediate Goals
Immediate goals focus on detecting and fixing issues during the development phase.
Bug Discovery: Identifies defects, errors, and failures in early development stages
to improve overall software quality.
Bug Prevention: Uses knowledge from detected bugs to avoid repeating the same
mistakes in future development.
Early Defect Detection: Finds issues as early as possible, reducing cost, effort, and
rework.
Requirement Validation: Ensures that all functional and non-functional
requirements are correctly implemented as specified.
Early Performance Check: Detects basic performance issues early in development
to improve system efficiency.
2. Long-Term Goals
These goals focus on overall product quality and user satisfaction after development.
Quality Improvement: Ensures the software is reliable, efficient, correct, and meets
overall quality standards.
Customer Satisfaction: Delivers software that fulfills user expectations and provides
a satisfying experience.
Reliability: Builds confidence by ensuring the software runs consistently without
failures.
Risk Management: Identifies potential risks early and reduces their impact on the
system.
Security Assurance: Protects the software from vulnerabilities, threats, and
unauthorized access.
Maintainability: Makes the software easy to update, fix, and enhance over time.
User Experience Improvement: Ensures the system is simple, intuitive, and user-
friendly.
Scalability Assurance: Ensures the software can handle increasing users and
workload efficiently.
3. Post-Implementation Goals
These goals focus on improving software after deployment and enhancing future processes.
Reduce Maintenance Cost: Early detection of bugs during testing helps avoid costly
fixes after the software is released.
Improve Testing Process: Past project experience is used to refine and improve
future testing strategies and techniques.
Continuous Improvement: Software quality is enhanced continuously by analyzing
user feedback and reported bugs.
Process Optimization: Testing tools, methods, and frameworks are improved to make
future testing more efficient.
Production Stability: Ensures the software runs smoothly and remains stable in real-
world production environments.
Feedback Utilization: Real user feedback is collected and used to enhance and
improve future software versions.
Software Testing Methodology Definitions
Software testing methodology uses various standard terms that help testers, developers,
and managers communicate effectively during the testing process.
1. Error
An error is a human mistake that produces an incorrect result.
Example: A programmer writes an incorrect formula for calculating interest.
2. Fault (Defect)
A fault is an incorrect statement, process, or data definition in software caused by an error.
Example: Using > instead of >= in a voting eligibility program.
3. Failure
A failure occurs when software does not perform its intended function during execution.
Example: Calculator displaying 20 instead of 25 for 5 × 5.
4. Bug
A bug is an informal term used for a defect identified during testing.
Example: Login page accepts invalid passwords.
5. Incident
An incident is any unexpected event observed during testing that requires investigation.
Example: Application suddenly freezes during execution.
6. Test
A test is the process of executing software to compare actual results with expected results.
Purpose:
Detect defects
Verify requirements
Validate functionality
7. Test Case
A test case is a set of inputs, execution conditions, and expected results designed to verify a
particular functionality.
Example:
Input Expected Result
Valid Username & Password Login Successful
8. Test Data
Test data is the collection of input values used during testing.
Example:
admin/admin123
user/password
admin/12345
9. Verification
Verification is the process of evaluating work products without executing the software to
ensure that the product is being developed correctly.
Question Answered:
Are we building the product right?
Methods:
Reviews
Walkthroughs
Inspections
10. Validation
Validation is the process of evaluating software through execution to ensure that the correct
product has been developed.
Question Answered:
Are we building the right product?
Methods:
Functional Testing
System Testing
Acceptance Testing
What are Software Testing Models?
Software testing models are structured methodologies used to plan, organize, and execute
testing processes throughout the software development lifecycle. Different models or
approaches can be used in the software development process, each with its own advantages
and disadvantages. So, you must choose a particular model depending on the project’s
deliverables and complexity.
Types of Software Testing Models
There are several types of software testing models, each designed to ensure the quality and
functionality of a product. The most commonly used models include:
1. Waterfall Model
This is the most basic software development life cycle process, which is broadly followed in
the industry. In this model, developers follow a sequence of processes downwards towards
the ultimate goal. It is like a waterfall, with various phases involved.
The
different phases in the waterfall model are:
Requirement Analysis
Analysis phase
Software design
Programmed implementation
Testing
Maintenance
Advantages
It is easy to implement and maintain.
The initial phase of rigorous scrutiny of requirements and systems helps in saving
time later in the developmental phase.
The requirement of resources is minimal and testing is done after each phase has
been completed.
Disadvantages
It is not possible to alter or update requirements.
Once you move into the next phase you cannot make changes.
You cannot start the next phase until the previous phase is completed.
2. V Model
The V Model is considered superior to the waterfall model. In this model, the development
and test execution activities are carried out side by side in the downhill and uphill shape.
Also, testing starts at the unit level and spreads towards the integration of the entire system.
Advantages
It is easy to use since testing activities like planning and test designing are done
before coding.
This model enhances the chances of success and saves time.
Defects are mostly found at an early stage and downward flow of defects is generally
avoided.
Disadvantages
It is a rigid model.
The software is developed during the implementation phase so early prototypes of
the product are not available.
If there are changes in the midway, you need to update the test document.
3. Agile Model
In the Agile model, requirements and solutions evolve through collaboration between
various cross-functional teams. It is also known as an iterative and incremental model. The
agile software testing model focuses on process adaptability and customer satisfaction by
rapidly delivering a working software product and breaking the product into small
incremental builds.
Advantages
It ensures customer satisfaction with rapid and continuous development of
deliverables.
The continuous interaction between the customers, developers, and testers makes it
a flexible model.
You can develop the working software quickly and adapt to changing requirements
regularly.
Disadvantages
It is difficult to assess the effort required at the beginning of the cycle for large and
complex software development cases.
Due to continuous interaction with the customer, the project can go off track if the
customer is not clear about the goals.
4. Spiral Model
This software testing model is similar to the Agile model, but with more emphasis on risk
analysis. The different phases of the spiral model include planning, risk analysis, engineering,
and evaluation. In this case, you need to gather the requirements and perform the risk
assessment at the base level and every upper spiral builds on it.
Advantages
It is suitable for complex and large systems.
You can add functionalities depending on the changed circumstances.
Software is produced early in the cycle.
Disadvantages
It is a costly model which requires highly specialized expertise in risk analysis
It does not work well on simpler projects.
5. Iterative Model
The Iterative model does not need a full list of requirements before beginning the project.
The development process starts with the requirements of the functional part, which can be
expanded later. The process is repetitive and allows new versions of the product for every
cycle. Every iteration includes the development of a separate component of the system
which is added to the functional developed earlier.
Advantages
It is easier to control the risks as high-risk tasks are completed first.
The progress is easily measurable.
Problems and risks defined within one iteration can be prevented in the next sprints.
Disadvantages
Iterative model requires more resources than the waterfall model.
The process is difficult to manage.
The risks may not be completely determined even at the final stage of the project.
These are the different software testing models involved in the software development life
cycle. I hope you understood how each of these models is used in software testing.
Effective Software Testing
Effective Software Testing is the process of applying experience-based practices and testing
techniques to detect maximum defects efficiently and ensure software quality.
Example
Suppose a login page accepts usernames and passwords. Instead of testing all possible
combinations (which is impossible), testers select important and representative test cases. If
these test cases successfully identify most defects, the testing is considered effective
software testing.
Exhaustive Software Testing