Fundamentals of Software Testing Methodologies
Detailed Notes
1. Introduction to Software Testing
Software testing is the systematic process of evaluating a software application to determine whether it
meets specified requirements and to identify defects before the software is delivered to users. Testing
helps improve software quality, reliability, security, usability, and performance. A tester designs test cases,
executes them, compares actual results with expected results, and reports defects.
• Main objectives: find defects, verify requirements, validate user expectations, reduce risk, and improve
confidence in the product.
• Verification: checks whether the product is being built correctly according to specifications.
• Validation: checks whether the correct product is being built for the user's needs.
• Test case: a documented set of inputs, conditions, steps, and expected results used to test a particular
feature.
2. Functional vs. Non-Functional Testing
Functional Testing
Functional testing verifies what the system does. It checks whether individual functions and business
requirements behave as specified. Examples include login, registration, payment, search, calculation,
report generation, and data validation.
• Unit Testing: tests small, isolated units such as functions, methods, or classes.
• Integration Testing: tests interactions and data flow between modules or components.
• System Testing: tests the complete integrated application against system requirements.
• Acceptance Testing: checks whether the system is acceptable to the customer or end user.
Non-Functional Testing
Non-functional testing verifies how the system performs rather than only whether a function produces
the correct result. It evaluates quality attributes such as speed, scalability, security, reliability, compatibility,
and ease of use.
• Performance Testing: measures response time, throughput, resource usage, and overall performance.
• Load Testing: evaluates behavior under expected numbers of users or transactions.
• Stress Testing: evaluates behavior beyond normal capacity to find breaking points and recovery
behavior.
• Security Testing: identifies vulnerabilities and checks protection of data and access.
• Usability Testing: evaluates whether users can learn and use the system easily and effectively.
3. Black Box vs. White Box Testing
Black Box Testing
Black box testing evaluates software behavior without requiring knowledge of the internal source code.
The tester concentrates on inputs, outputs, and externally visible behavior. It is useful for checking
requirements and user-facing functionality.
• Advantages: tests from the user's perspective, does not require programming knowledge, and can
expose missing or incorrect functionality.
• Limitations: may not reveal hidden code paths and can provide less structural coverage.
• Common techniques: equivalence partitioning, boundary value analysis, decision table testing, and
state transition testing.
White Box Testing
White box testing examines internal program structure, logic, conditions, branches, statements, and
execution paths. The tester generally has access to the source code or detailed implementation logic.
• Statement Coverage: measures whether executable statements have been executed by tests.
• Branch Coverage: checks whether decision outcomes such as true and false branches have been
exercised.
• Condition Coverage: checks individual Boolean conditions within decisions.
• Path Testing: designs tests to exercise important execution paths through the program.
4. Major Levels of Testing
Unit Testing
The smallest level of testing. Individual functions, methods, or classes are tested independently. It is
commonly automated and helps detect coding errors early.
Integration Testing
Checks whether separately developed modules work correctly when combined. Typical problems include
incorrect interfaces, data formats, communication, and sequencing.
System Testing
Tests the fully integrated application as a complete system. It covers functional and many non-functional
requirements in an environment close to production.
Acceptance Testing
Performed to determine whether the system satisfies business and user requirements. User Acceptance
Testing (UAT) is commonly performed by customers or business representatives.
5. Important Non-Functional Testing Types
Performance Testing
Determines whether the application responds within acceptable time limits and uses resources efficiently.
Load Testing
Checks application behavior under a defined workload, such as a target number of concurrent users.
Stress Testing
Pushes the system beyond expected limits to determine its maximum capacity and whether it fails
gracefully.
Security Testing
Checks authentication, authorization, confidentiality, integrity, session management, and protection
against common vulnerabilities.
Usability Testing
Observes representative users completing tasks to identify confusing workflows, poor navigation, and
accessibility or learnability problems.
Compatibility Testing
Checks behavior across browsers, operating systems, devices, screen sizes, networks, and relevant
configurations.
Reliability Testing
Evaluates whether the system operates consistently over a specified period and handles failures
appropriately.
6. Black Box Testing Techniques
Equivalence Partitioning
Inputs are divided into groups expected to behave similarly. Instead of testing every value, representative
values from each valid and invalid group are tested.
Boundary Value Analysis
Tests values at and around boundaries because defects frequently occur at minimum and maximum limits.
For a range of 1–100, useful values include 0, 1, 2, 99, 100, and 101.
Decision Table Testing
Represents combinations of conditions and corresponding actions in a table. It is especially useful for
complex business rules.
State Transition Testing
Tests how a system moves from one state to another based on events or inputs. It is useful for workflows
such as account locking after repeated failed logins.
7. White Box Testing Techniques
Statement Coverage
Ensures that executable statements are exercised at least once. Higher coverage does not automatically
mean the software is defect-free.
Branch Coverage
Ensures that each decision outcome is exercised. For example, both true and false outcomes of an if
condition should be tested.
Condition Coverage
Tests individual Boolean conditions within compound decisions.
Path Coverage
Attempts to exercise distinct execution paths. Complete path coverage may become impractical for large
programs because the number of paths can grow rapidly.
8. Comparison: Black Box and White Box Testing
Feature Black Box Testing White Box Testing
Focus External behavior Internal structure and logic
Code knowledge Not required Usually required
Perspective User/requirements perspective Developer/code perspective
Typical techniques Equivalence, boundary, decision table Statement, branch, condition, path
Main purpose Validate functionality and behavior Validate implementation logic and coverage
9. Example: Testing a Login System
Suppose a login page requires a valid username and password. Functional black-box tests could include
valid credentials, an incorrect password, an unknown username, empty fields, and account-lockout
behavior. Boundary testing could examine password length limits. Security testing could verify that
passwords are not exposed and that unauthorized users cannot access protected pages. White-box tests
could verify that the code executes both successful-login and failed-login branches.
10. Key Advantages of Software Testing
• Improves product quality and reliability.
• Detects defects before they become expensive production problems.
• Reduces business and operational risk.
• Helps verify compliance with requirements and standards.
• Improves customer satisfaction and confidence.
• Supports maintainability by identifying regressions after changes.
11. Quick Revision Points
• Functional = What the system does.
• Non-functional = How well the system performs.
• Black box = Test behavior without relying on internal code.
• White box = Test internal code, logic, and execution paths.
• Unit → Integration → System → Acceptance are common testing levels.
• Boundary Value Analysis focuses on values near limits.
• Equivalence Partitioning divides inputs into representative classes.
• Branch and statement coverage are common white-box coverage measures.