Unit - I: Software Testing and Testing Methods
1.1 Software Testing and Objectives of Testing
Software Testing is the process of executing a program with the intent of finding errors. It
ensures that the software system meets the specified requirements and is free of defects.
Objectives of Testing
1. To detect errors in software.
2. To ensure that software meets the user’s requirements.
3. To improve software quality and reliability.
4. To validate and verify the functionality of the system.
5. To prevent defects in future releases.
6. To ensure performance, usability, and security of the product.
Software Requirement Specification (SRS)
SRS is a document that describes what the software will do and how it is expected to
perform. It acts as a communication bridge between the customer and developer.
Characteristics of a Good SRS:
1. Complete
2. Consistent
3. Unambiguous
4. Verifiable
5. Modifiable
6. Traceable
1.2 Failure, Error, Fault, Defect, Bug Terminology
Term Definition Example
Error A human mistake made by Typing wrong formula
the developer.
Fault (Defect) The result of an error in the Wrong formula written in
software. code
Failure When the software does not Wrong output shown to
perform the expected user
function.
Bug Common term for defect Login button not working
found during testing.
Defect Deviation from the Missing field validation
requirement in the
software.
Relationship: Error → Fault → Failure
1.3 Test Case, Entry and Exit Criteria
A Test Case is a set of input, execution conditions, and expected results developed to verify a
particular software requirement.
Test Case Components:
1. Test Case ID
2. Test Description
3. Preconditions
4. Test Steps
5. Expected Result
6. Actual Result
7. Status (Pass/Fail)
Entry Criteria:
• Test environment is ready
• Test data is prepared
• Code is compiled successfully
Exit Criteria:
• All test cases executed
• All critical defects fixed
• Test summary report prepared
1.4 Methods of Testing
Type Description Example
Static Testing Testing without executing Code review, inspection
code. Focuses on reviewing
and analyzing
documentation and code.
Dynamic Testing Testing by executing the Functional testing,
code and checking actual performance testing
results.
1.5 White Box Testing
White Box Testing is based on internal logic, structure, and code of the program. The tester
needs programming knowledge.
Techniques:
1. Inspections – Formal review process to detect defects.
2. Walkthroughs – Informal meeting for feedback.
3. Technical Review – Evaluation by experts.
4. Functional Testing – Ensures each function performs correctly.
5. Code Coverage Testing – Measures code execution.
6. Code Complexity Testing – Checks logical complexity.
1.6 Black Box Testing
Black Box Testing is based on inputs and outputs without knowledge of internal code or
logic.
Techniques:
1. Requirement-Based Testing – Test cases are derived from requirements.
2. Boundary Value Analysis – Tests boundary values where errors often occur.
3. Equivalence Partitioning – Divides input into valid and invalid classes to reduce test
cases.
Summary Table
Testing Type Based On Performed By Example
White Box Code structure Developer Unit testing
Black Box Functionality Tester System testing