ST Static Testing Notes
ST Static Testing Notes
Definition
Static Testing is a software testing technique in which the code is
examined without executing the program. It helps identify defects at an
early stage of development.
Features
Includes Code Inspection, Walkthrough, and Desk Checking.
A type of White Box Testing.
Performed without running the application.
More cost-effective than dynamic testing.
Provides comprehensive diagnostics for code.
Helps detect defects early.
In this method, humans read and analyze the source code to identify errors
instead of executing the program.
Advantages
1. Humans can identify some errors that automated tools may miss.
2. Multiple reviewers provide different perspectives, leading to better
defect detection.
3. Saves computer resources because errors are found before execution.
1. Desk Checking
Definition
Advantages
Helps identify errors before program execution.
Quick and inexpensive.
Reduces debugging effort later.
Prevents project delays caused by unnoticed defects.
Errors are easier to fix at an early stage.
2. Code Walkthrough
Definition
A Code Walkthrough is a peer review process where the author explains the
code, and team members ask questions and identify defects.
Characteristics
Led by the author of the code/document.
Other team members participate in the review.
Can be formal or informal.
Process
1. Reviewers prepare before the meeting.
2. Findings are documented in a review report.
3. A scribe records defects and meeting minutes.
4. Team members learn and understand the code.
5. Defects are identified and discussed.
Purpose
Improve understanding of the code.
Detect defects.
Share knowledge among team members.
3. Code Review
Definition
1. Best Practice
Suggest better, more efficient, and elegant coding methods.
2. Error Detection
Identify logical and transitional errors.
3. Vulnerability Exposure
Detect security vulnerabilities such as:
Cross-Site Scripting (XSS)
Injection Attacks
Buffer Overflow
Excessive Information Disclosure
4. Malware Discovery
Identify suspicious code segments.
Detect:
Backdoors
Trojans
Time Bombs
Benefits
Improves code quality.
Enhances security.
Reduces defects.
Promotes coding standards.
4. Code Inspection
Definition
Code Inspection is the most formal type of review and is used to identify
defects before software execution.
Purpose
Find defects.
Improve development processes.
Characteristics
Uses predefined rules and checklists.
Requires preparation before meetings.
Assigns specific roles to participants.
Includes peer examination of code.
Follows entry and exit criteria.
Formal follow-up ensures corrective actions are completed.
Advantages
Early defect detection.
Improved software quality.
Reduced defect multiplication.
Better process control.
B) Static Analysis Tools
Definition
Static Analysis Tools analyze source code without executing it. The source
code is used as input to the tool.
Features
Mostly used by developers.
Extension of compiler technology.
Some compilers provide built-in static analysis.
Can analyze requirements, source code, and websites.
Helps understand code structure.
Enforces coding standards.
Applications
Source code analysis.
Requirement analysis.
Website standard compliance checking.
Accessibility verification.
Advantages
Detects defects early.
Improves code quality.
Reduces development cost.
Helps maintain coding standards.
Supports risk identification.
Quick Comparison
Technique Description Formality
Code Semi-
Walkthrough Author explains code to team formal
2-Mark Questions
1. Define Static Testing.
2. List the types of Static Testing.
3. What is Desk Checking?
4. What is Code Walkthrough?
5. What is Code Review?
6. What is Code Inspection?
7. Define Static Analysis Tool.
8. Mention two advantages of Static Testing.
9. What is Malware Discovery?
10. What is Vulnerability Exposure?
5-Mark Questions
1. Explain Static Testing with its features.
2. Explain Desk Checking and its advantages.
3. Discuss the Code Walkthrough process.
4. Explain the objectives of Code Review.
5. Describe Code Inspection.
6. Explain Static Analysis Tools and their characteristics.