Software Testing
Software Testing: Verification, Validation, Types & Testing Techniques
A comprehensive educational guide covering software testing, V&V, V-Model, QA, QC, Static Testing, Dynamic Testing, White-Box Testing and Black-Box Testing.
1 Introduction to Software Testing
Software testing is an essential activity in the software development life cycle. It is concerned with checking the correctness, accuracy, reliability and quality of a software product.
Software testing involves Verification and Validation (V&V) of a software product to determine its correctness and accuracy of working.
A successful test is one that uncovers an error that had not previously been discovered.
Testing can demonstrate the presence of bugs, but it cannot prove their complete absence.
2 Objectives of Software Testing
Identify defects introduced during software development.
Gain information and confidence about software quality.
Ensure that business and user requirements are satisfied.
- Finding defects introduced during development.
- Gaining confidence in software quality.
- Providing information about quality.
- Preventing defects.
- Meeting business and user requirements.
- Satisfying BRS and SRS.
- Increasing customer confidence.
3 What Does Software Testing Involve?
- Finding defects
- Trying to break the system
- Finding and reporting defects
- Demonstrating correct functionality
- Demonstrating incorrect functionality
- Demonstrating robustness and reliability
- Demonstrating security
- Measuring performance and reliability
- Evaluating quality
- Executing predefined test cases
- Automatic error detection
4 Skills Required for a Software Tester
A tester should not only ask “Does it work?” but also “How can it fail?”
5 Error, Bug, Fault, Failure and Defect
| Term | Meaning |
|---|---|
| Error | Human action that produces an incorrect result. |
| Bug | Error present in software during execution. |
| Fault | Software state caused by an error. |
| Failure | Deviation from the expected result. |
| Defect | Error or bug/flaw introduced into the application. |
6 Sources of Defects
7 Test Plan and Test Case
A Test Plan is a systematic approach to testing a software system. It provides a detailed understanding of the eventual testing workflow.
A test case is a specific procedure used to test a particular requirement.
- Requirement being tested
- Success/failure criteria
- Execution steps
- Test data
8 Entry and Exit Criteria
Entry Criteria
Conditions that must exist before a testing phase can begin.
- Technical requirements
- Design document
- Change control
- Turnover document
- Test strategy
- Test plan
- Test incident reports
Exit Criteria
Conditions that must be satisfied before a phase can be considered complete.
- All test plans executed
- Required coverage achieved
- Severe bugs resolved
- Test logs completed
- Test reports prepared
9 Verification and Validation
Are we building the product right?
Checks whether the software conforms to specifications.
- Static
- Reviews
- Inspections
- Walkthroughs
Are we building the right product?
Checks whether the software satisfies user requirements.
- Dynamic
- Testing
- Actual product
- User requirements
10 V-Model
Verification
Validation
Under the V-Model, corresponding testing activities are planned alongside development activities.
11 Quality Assurance and Quality Control
| Quality Assurance | Quality Control |
|---|---|
| Process oriented | Product oriented |
| Preventive focus | Verification focus |
| Plans and documents processes | Inspects and measures products |
| Provides confidence in processes | Determines quality level |
| Concerned with how quality is achieved | Concerned with whether requirements are met |
12 Static Testing
Static testing examines software work products without executing the program.
Author guides reviewers through the document.
Formal review guided by a trained moderator.
Review focused on technical content.
- Starts early.
- Provides early feedback.
- Reduces rework.
- Improves productivity.
- Promotes knowledge sharing.
- Manual testing can be time-consuming.
- Tools may support limited languages.
- Tools may produce false positives and false negatives.
- Tools may not identify every runtime weakness.
13 Dynamic Testing
Dynamic testing examines software behaviour while the software is compiled and executed.
14 White-Box Testing
White-box testing examines the internal structure, logic and implementation of software.
Executes program statements.
Tests decision branches.
Tests individual conditions.
Tracks variables and data through software.
15 Black-Box Testing
Black-box testing, also called behavioural testing, evaluates software without requiring knowledge of its internal structure or implementation.
User data / test data
Internal structure unknown
Expected vs actual behaviour
Major Errors Targeted
- Incorrect or missing functions
- Interface errors
- Data structure or database errors
- Behaviour or performance errors
- Initialization errors
- Termination errors
16 Boundary Value Analysis
Boundary Value Analysis focuses on extreme values of an input domain because errors are often found at boundaries.
Example: Password Length 8–12
| Test Case | Input | Category |
|---|---|---|
| 1 | Less than 8 | Invalid |
| 2 | 8 | Valid Boundary |
| 3 | 9–11 | Valid |
| 4 | 12 | Valid Boundary |
| 5 | More than 12 | Invalid |
17 Equivalence Partitioning
Equivalence partitioning divides possible input values into groups where values are expected to produce similar behaviour.
Representative Input
Representative Input
Representative Input
Insurance Premium Example
| Age Group | Additional Premium |
|---|---|
| Under 35 | $1.65 |
| 35–59 | $2.87 |
| 60+ | $6.00 |
18 Important Comparisons
Static vs Dynamic Testing
| Static Testing | Dynamic Testing |
|---|---|
| Software is not executed. | Software is executed. |
| Reviews and inspections. | Unit, integration and system testing. |
| Starts early. | Requires executable software. |
| Focuses on work products. | Focuses on runtime behaviour. |
White-Box vs Black-Box Testing
| White-Box | Black-Box |
|---|---|
| Internal structure considered. | Internal structure not required. |
| Implementation-oriented. | Behaviour-oriented. |
| Statement coverage. | Requirement-based testing. |
| Branch coverage. | Boundary value analysis. |
| Condition coverage. | Equivalence partitioning. |
Boundary Value Analysis vs Equivalence Partitioning
| Boundary Value Analysis | Equivalence Partitioning |
|---|---|
| Focuses on boundaries. | Focuses on input classes. |
| Tests extreme values. | Tests representative values. |
| Useful for range-related errors. | Reduces number of test cases. |
19 Practical Example: Student Management System
Consider a Student Management System used by a college. The system allows an administrator to enter student marks and calculate results.
| Testing Technique | Example |
|---|---|
| Requirement-Based Testing | Verify result calculation requirements. |
| Boundary Value Analysis | Test marks around minimum and maximum limits. |
| Equivalence Partitioning | Divide marks into valid and invalid groups. |
| Unit Testing | Test marks-calculation function. |
| Integration Testing | Test marks module with database. |
| System Testing | Test complete system. |
| Acceptance Testing | Test system in actual college environment. |
| Regression Testing | Retest existing functionality after changes. |
| Security Testing | Verify access restrictions. |
20 Quick Revision
21 Exam-Oriented Questions
- Define software testing.
- State the objectives of software testing.
- Define error, fault, bug and failure.
- What is a test case?
- What is a test plan?
- Define entry criteria.
- Define exit criteria.
- What is verification?
- What is validation?
- Define quality assurance.
- Define quality control.
- What is static testing?
- What is dynamic testing?
- Define white-box testing.
- Define black-box testing.
- What is boundary value analysis?
- What is equivalence partitioning?
- Explain Verification and Validation with suitable examples.
- Explain the V-Model of software development.
- Explain Quality Assurance and Quality Control.
- Explain static testing and its advantages and disadvantages.
- Explain walkthrough, inspection and technical review.
- Explain dynamic testing with its advantages and disadvantages.
- Explain white-box testing techniques.
- Explain black-box testing techniques.
- Explain Boundary Value Analysis with examples.
- Explain Equivalence Partitioning with suitable examples.
- Differentiate verification and validation.
- Differentiate white-box and black-box testing.
- Differentiate inspection and walkthrough.
- Explain entry and exit criteria for software testing.
22 Key Takeaways
1. Testing is not only about finding bugs.
It also provides information about quality, reliability, performance, security and user requirements.
2. Verification and validation are different.
Verification asks “Are we building the product right?”, while validation asks “Are we building the right product?”
3. Static testing does not execute software.
Reviews, walkthroughs and inspections are important static techniques.
4. Dynamic testing executes software.
Unit, integration, system, acceptance and regression testing are examples of dynamic testing.
5. Effective test design reduces unnecessary testing.
Boundary Value Analysis and Equivalence Partitioning help select meaningful test cases.
23 Conclusion
Software testing is a fundamental component of software engineering and quality management. It provides systematic methods for discovering defects, evaluating functionality, assessing quality and establishing confidence in software products.
Understanding Verification, Validation, QA, QC, Static Testing, Dynamic Testing, White-Box Testing, Black-Box Testing, Boundary Value Analysis and Equivalence Partitioning provides a strong foundation for students studying Software Engineering and Software Testing.
Comments
Post a Comment