Software Testing

```html
Software Engineering Software Testing Computer Engineering

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.

Definition

Software testing involves Verification and Validation (V&V) of a software product to determine its correctness and accuracy of working.

Important Principle

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

🔍 Find Defects

Identify defects introduced during software development.

📊 Measure Quality

Gain information and confidence about software quality.

🎯 Meet Requirements

Ensure that business and user requirements are satisfied.

  1. Finding defects introduced during development.
  2. Gaining confidence in software quality.
  3. Providing information about quality.
  4. Preventing defects.
  5. Meeting business and user requirements.
  6. Satisfying BRS and SRS.
  7. 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

CommunicationClear defect reporting and collaboration.
Domain KnowledgeUnderstanding the application area.
Technical SkillsUnderstanding software and testing technologies.
Analytical SkillsAnalysing requirements and failures.
PlanningOrganising testing activities.
IntegrityReporting test results honestly.
CuriosityExploring unexpected behaviour.
User PerspectiveThinking from the user's point of view.
💡 Tester Mindset

A tester should not only ask “Does it work?” but also “How can it fail?”

5 Error, Bug, Fault, Failure and Defect

Human Action
ERROR
FAULT
BUG
FAILURE
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

Education Insufficient understanding may lead to errors.
Communication Information may not reach all stakeholders.
Oversight Necessary activities may be omitted.
Transcription Implementation mistakes may occur.
Process An unsuitable process may create restrictions and errors.

7 Test Plan and Test Case

Test Plan

A Test Plan is a systematic approach to testing a software system. It provides a detailed understanding of the eventual testing workflow.

Requirements
Testing Strategy
Test Planning
Test Cases
Test Execution
Defect Reporting
Test Results
Test Case

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

✔ Verification

Are we building the product right?

Checks whether the software conforms to specifications.

  • Static
  • Reviews
  • Inspections
  • Walkthroughs
✔ Validation

Are we building the right product?

Checks whether the software satisfies user requirements.

  • Dynamic
  • Testing
  • Actual product
  • User requirements

10 V-Model

Verification

Business Requirements
Software Requirements
High-Level Design
Low-Level Design
Coding

Validation

Acceptance Testing
System Testing
Integration Testing
Component Testing
Unit Testing
📌 V-Model Principle

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

Definition

Static testing examines software work products without executing the program.

Walkthrough

Author guides reviewers through the document.

Inspection

Formal review guided by a trained moderator.

Technical Review

Review focused on technical content.

Advantages
  • Starts early.
  • Provides early feedback.
  • Reduces rework.
  • Improves productivity.
  • Promotes knowledge sharing.
Disadvantages
  • 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

Definition

Dynamic testing examines software behaviour while the software is compiled and executed.

Test Data
Execute Program
Actual Result
Compare Expected Result
PASS / FAIL

14 White-Box Testing

White-box testing examines the internal structure, logic and implementation of software.

Statement Coverage

Executes program statements.

Branch Coverage

Tests decision branches.

Condition Coverage

Tests individual conditions.

Data Flow

Tracks variables and data through software.

15 Black-Box Testing

Definition

Black-box testing, also called behavioural testing, evaluates software without requiring knowledge of its internal structure or implementation.

Input

User data / test data

Software

Internal structure unknown

Output

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

Definition

Boundary Value Analysis focuses on extreme values of an input domain because errors are often found at boundaries.

Invalid: Below Minimum
VALID BOUNDARY
Valid Range
VALID BOUNDARY
Invalid: Above Maximum

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

Definition

Equivalence partitioning divides possible input values into groups where values are expected to produce similar behaviour.

Partition A

Representative Input

Partition B

Representative Input

Partition C

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

Example

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

Software Testing Evaluates software and identifies defects.
Verification Are we building the product right?
Validation Are we building the right product?
QA Process-oriented quality activity.
QC Product-oriented quality activity.
Static Testing Testing without executing software.
Dynamic Testing Testing by executing software.
White-Box Internal structure-based testing.
Black-Box Behaviour-based testing.
BVA Tests input boundaries.
Equivalence Partitioning Divides inputs into representative classes.

21 Exam-Oriented Questions

Short Answer Questions
  1. Define software testing.
  2. State the objectives of software testing.
  3. Define error, fault, bug and failure.
  4. What is a test case?
  5. What is a test plan?
  6. Define entry criteria.
  7. Define exit criteria.
  8. What is verification?
  9. What is validation?
  10. Define quality assurance.
  11. Define quality control.
  12. What is static testing?
  13. What is dynamic testing?
  14. Define white-box testing.
  15. Define black-box testing.
  16. What is boundary value analysis?
  17. What is equivalence partitioning?
Long Answer Questions
  1. Explain Verification and Validation with suitable examples.
  2. Explain the V-Model of software development.
  3. Explain Quality Assurance and Quality Control.
  4. Explain static testing and its advantages and disadvantages.
  5. Explain walkthrough, inspection and technical review.
  6. Explain dynamic testing with its advantages and disadvantages.
  7. Explain white-box testing techniques.
  8. Explain black-box testing techniques.
  9. Explain Boundary Value Analysis with examples.
  10. Explain Equivalence Partitioning with suitable examples.
  11. Differentiate verification and validation.
  12. Differentiate white-box and black-box testing.
  13. Differentiate inspection and walkthrough.
  14. 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.

Requirements
Verification
Validation
Static + Dynamic Testing
White-Box + Black-Box Techniques
Defect Detection & Correction
QUALITY SOFTWARE
🎓 Final Learning Outcome

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.

Software Testing – Educational Learning Resource

Designed for students of Computer Engineering, Computer Technology and Software Engineering.

© Educational Blog | Software Engineering Learning Series

```

Comments

Popular posts from this blog

Software Development Process in Software Engineering: A Complete Guide

Software Testing in Software Engineering: Levels, Types and Techniques

Forms and Form Events in java Script