Software Testing
Software testing is an important process in the Software Development Life cycle (SDLC). It
involves verifying and validating that a Software Application is free of bugs, meets the
technical requirements set by its Design and Development, and satisfies user requirements
efficiently and effectively.
Software testing is the process of evaluating a software application to ensure it works correctly,
meets requirements, and is free of defects (bugs). It helps improve quality, reliability, security,
and performance before the software is delivered to users.
Software Testing Can be Divided into Two Steps:
1. Verification: This step involves checking if the software is doing what is supposed to do. Its
like asking, "Are we building the product the right way?"
2. Validation: This step verifies that the software actually meets the customer's needs and
requirements. Its like asking, "Are we building the right product?"
Objectives of Software Testing
Find defects/bugs
Ensure requirements are met
Improve software quality
Verify performance and security
Build user confidence
Why is Software Testing Important?
Without testing:
Software may crash or behave unexpectedly
Security vulnerabilities may exist
Users may lose trust in the product
Business losses can occur
Testing ensures the software works as expected in real-world conditions.
Types of Software Testing
1. Based on Execution
Manual Testing
Testers manually execute test cases.
No automation tools are used.
Automation Testing
Test cases are executed using tools like Selenium, JUnit, or TestNG.
Faster and useful for repetitive tasks.
2. Based on Technique
Black Box Testing
Testing without knowing internal code.
Focuses on inputs and outputs.
White Box Testing
Testing with knowledge of internal code structure.
Grey Box Testing
Combination of both black and white box testing.
3. Based on Testing Levels
Unit Testing
Testing individual components or functions.
Integration Testing
Testing interaction between modules.
System Testing
Testing the complete application.
Acceptance Testing
Testing done by clients or end users before release.
4. Other Important Testing Types
Functional Testing – Tests features and functionality.
Non-Functional Testing – Tests performance, usability, security.
Regression Testing – Ensures new changes don’t break existing features.
Smoke Testing – Basic testing to check major functions.
Performance Testing – Checks speed and stability under load.
What is the Software Testing Process?
Software testing process includes the following steps:
Planning: The first step is planning the testing process. This includes identifying the areas of the
software that need testing, developing a test plan, and identifying the required resources.
Design: The next step is to design the tests. This includes identifying the test cases, data, and
expected results.
Execution: Once the tests are designed, they must be executed. This includes running the
software with the test data and observing the output.
Analyze: The results of the tests must be analyzed. The aim is to identify defects and determine
whether the software meets the acceptance criteria.
Reporting: The results of the tests must be reported to the stakeholders. This includes a
summary of the tests performed, the deficiencies found, and recommendations for correcting the
deficiencies.
The software testing process is an iterative process, which means that it may need to be repeated
several times until the software is deemed suitable to be bug-free.
The activities of testing can be divided into the following basic steps:
1. Planning and Control
2. Analysis and Design
3. Implementation and Execution
4. Evaluating exit criteria and Reporting
5. Test Closure activities
1) Planning and Control
Test Planning: Test planning involves producing a document that describes an overall approach
and test objectives. It involves reviewing the test basis, identifying the test conditions based on
analysis of test items, writing test cases and Designing the test environment. Completion or exit
criteria must be specified so that we know when testing (at any stage) is complete.
To determine the scope and risks and identify the objectives of testing.
To determine the required test resources like people, test environments etc.
To schedule test analysis and design tasks, test implementation, execution and evaluation.
Control This is the activity of comparing actual progress against the plan, and reporting the
status, including deviations from the plan. It involves taking actions necessary to meet the
mission and objectives of the project.
2) Analysis and Design
Test analysis and Test Design has the following major tasks:
To review the test basis. The test basis is the information on which test cases are based,
such as requirements, design specifications, product risk analysis, architecture and
interfaces
To identify test conditions
To design the tests
To design the test environment set-up and identify the required infrastructure and tools
3) Implementation and Execution
Test execution involves actually running the specified test on a computer system either manually
or by using an automated test tool. It is a Fundamental Test Process in which actual work is
done.
Test implementation has the following major task:
To develop and prioritize test cases by using techniques and create test data for those
tests.
To create test suites from the test cases for efficient test execution. Test suite is a
collection of test cases that are used to test a software program
To re-execute the tests that previously failed in order to confirm a fix.
To log the outcome of the test execution. A test log is the status of the test case
(pass/fail).
To compare actual results with expected results.
4) Evaluating Exit criteria and Reporting
Evaluating exit criteria is a process defining when to stop testing. It depends on coverage of
code, functionality or risk. Basically it also depends on business risk, cost and time and vary
from project to project. Exit criteria come into picture, when:
Maximum test cases are executed with certain pass percentage
Bug rate falls below certain level
When we achieve the deadlines
Evaluating exit criteria has the following major tasks:
To assess if more test are needed or if the exit criteria specified should be changed
To write a test summary report for stakeholders
5) Test Closure activities:
Test closure activities are done when software is ready to be delivered. The testing can be closed
for the other reasons also like:
When a project is cancelled
When some target is achieved
When a maintenance release or update is done
Test closure activities have the following major tasks:
To check which planned deliverables are actually delivered and to ensure that all incident
reports have been resolved
To finalize and archive testware such as scripts, test environments, etc. for later reuse
To handover the testware to the maintenance organization. They will give support to the
software
To evaluate how the testing went and learn lessons for future releases and projects
Broad Categories of Testing
Software testing can be grouped into broad categories based on purpose, approach, and
execution. These categories help organize testing activities effectively.
1. Functional Testing
Functional Testing verifies that the software works according to specified requirements.
It focuses on:
Features
Business logic
User interactions
Inputs and outputs
Examples:
Unit Testing
Integration Testing
System Testing
Acceptance Testing
Goal: “Does the system do what it is supposed to do?”
2. Non-Functional Testing
Non-Functional Testing checks how well the system performs rather than what it does.
It focuses on:
Performance
Security
Usability
Reliability
Scalability
Examples:
Performance Testing
Load Testing
Stress Testing
Security Testing
Usability Testing
Goal: “How well does the system work?”
3. Manual Testing
Testing performed manually by a human without automation tools.
Suitable for exploratory and usability testing
Flexible and less expensive initially
Time-consuming for repetitive tasks
4. Automated Testing
Testing performed using tools and scripts.
Common tools include:
Selenium
JUnit
TestNG
Best for regression, performance, and repetitive test cases.
5. Black Box Testing
No knowledge of internal code
Focuses only on inputs and outputs
Used in functional testing.
6. White Box Testing
Requires knowledge of internal code structure
Tests logic, loops, and conditions
Mostly done by developers.
7. Grey Box Testing
Combination of Black Box and White Box testing
Partial knowledge of internal system
8. Static Testing
Testing without executing the code
Reviews, walkthroughs, inspections
9. Dynamic Testing
Testing by executing the software
Verifies actual behavior
Summary Table
Category Focus
Functional What the system does
Non-Functional How the system performs
Manual Human-based testing
Automated Tool-based testing
Static Without execution
Dynamic With execution
Principles of Software testing
Software testing is an important aspect of software development, ensuring that applications
function correctly and meet user expectations. From test planning to execution, analysis and
understanding these principles help testers in creating a more structured and focused approach to
software testing, resulting in a higher-quality product.
Here are the Seven Principles of Software Testing:
1. Testing shows the Presence of Defects
The goal of software testing is to make the software fail. Software testing reduces the presence of
defects. Software testing talks about the presence of defects and doesn't talk about the absence of
defects. Software testing can ensure that defects are present but it cannot prove that software is
defect-free. Even multiple tests can never ensure that software is 100% bug-free. Testing can
reduce the number of defects but not remove all defects.
2. Exhaustive Testing is not possible
It is the process of testing the functionality of the software in all possible inputs (valid or invalid)
and pre-conditions is known as exhaustive testing. Exhaustive testing is impossible means the
software can never test at every test case. It can test only some test cases and assume that the
software is correct and it will produce the correct output in every test case. If the software will
test every test case then it will take more cost, effort, etc., which is impractical.
3. Early Testing
To find the defect in the software, early test activity shall be started. The defect detected in the
early phases of SDLC will be very less expensive. For better performance of software, software
testing will start at the initial phase i.e. testing will perform at the requirement analysis phase.
4. Defect Clustering
In a project, a small number of modules can contain most of the defects. The Pareto Principle for
software testing states that 80% of software defects come from 20% of modules.
5. Pesticide Paradox
Repeating the same test cases, again and again, will not find new bugs. So it is necessary to
review the test cases and add or update test cases to find new bugs.
6. Testing is Context-Dependent
The testing approach depends on the context of the software developed. Different types of
software need to perform different types of testing. For example, The testing of the e-commerce
site is different from the testing of the Android application.
7. Absence of Errors Fallacy
If a built software is 99% bug-free but does not follow the user requirement then it is unusable. It
is not only necessary that software is 99% bug-free but it is also mandatory to fulfill all the
customer requirements.
Major Software Testing Techniques
Software testing techniques are systematic methods used to design test cases and uncover defects
effectively. According to standards from the International Software Testing Qualifications
Board, they are broadly classified into three major categories:
1. Specification-Based Techniques (Black-Box Techniques)
Test cases are derived from requirements and specifications, without knowledge of internal
code.
Equivalence Partitioning (EP)
Divides input data into valid and invalid groups.
One test case is selected from each group.
Boundary Value Analysis (BVA)
Focuses on testing boundary values.
Errors often occur at edges of input ranges.
Decision Table Testing
Used when output depends on multiple conditions.
Best for business rule validation.
State Transition Testing
Tests system behavior for valid and invalid state changes.
Use Case Testing
Based on user scenarios and workflows.
Focus: What the system should do
2. Structure-Based Techniques (White-Box Techniques)
Test cases are derived from the internal structure of the code.
Statement Coverage
Executes every statement at least once.
Branch (Decision) Coverage
Tests each decision outcome (True/False).
Condition Coverage
Tests individual conditions within decisions.
Path Coverage
Tests all independent execution paths.
Loop Testing
Validates loop boundaries and iterations.
Focus: How the system works internally
3. Experience-Based Techniques
Based on the tester’s experience, intuition, and knowledge.
Exploratory Testing
Simultaneous learning, test design, and execution.
Error Guessing
Predicting defects based on past experience.
Checklist-Based Testing
Testing using a predefined checklist.
Focus: Where defects are likely to occur
Summary Table
Category Based On Examples
Specification-Based Requirements EP, BVA, Decision Table
Structure-Based Code structure Statement, Branch Coverage
Category Based On Examples
Experience-Based Tester knowledge Exploratory, Error Guessing
White Box Testing
White Box Testing (also called Glass Box Testing, Clear Box Testing, or Structure-Based
Testing) is a software testing technique in which the tester has full knowledge of the internal
code, structure, and logic of the application.
It mainly focuses on verifying:
Code structure
Internal logic
Control flow
Data flow
This technique is commonly performed by developers during unit testing and is described in
standards from the International Software Testing Qualifications Board as a structure-based
testing approach.
Objectives of White Box Testing
Ensure all code statements are executed
Verify decision logic and loops
Detect logical errors
Remove dead or unused code
Improve code quality and security
Types / Techniques of White Box Testing
1. Statement Coverage
Ensures each statement in the program executes at least once.
Example:
if (x > 10)
print("Valid");
print("Done");
Test with x = 15 to execute all statements.
2. Branch (Decision) Coverage
Ensures each decision outcome (True and False) is tested.
Example:
if (x > 10)
print("Valid");
else
print("Invalid");
Test with:
x = 15 → True branch
x = 5 → False branch
3. Condition Coverage
Ensures each individual condition is tested as True and False.
Example:
if (A > 10 && B < 5)
Test cases must make:
A true & false
B true & false
4. Path Coverage
Tests all possible execution paths in the program.
Based on control flow graph.
5. Loop Testing
Validates loop behavior.
Test cases include:
0 iterations
1 iteration
2 iterations
Maximum iterations
Above maximum limit
Advantages of White Box Testing
Improves code optimization
Finds hidden logical errors
Ensures high code coverage
Detects security vulnerabilities
Disadvantages
Requires programming knowledge
Time-consuming for large systems
Cannot detect missing requirements
Not suitable for user-interface validation
White Box vs Black Box Testing
Feature White Box Black Box
Knowledge of Code Required Not Required
Focus Internal logic Functional behavior
Performed By Developers Testers
Basis Source code Requirements
When to Use White Box Testing
During Unit Testing
For critical or security-sensitive systems
When high reliability is required