0% found this document useful (0 votes)
1 views13 pages

ST Static Testing Notes

Static Testing is a software testing technique that examines code without execution to identify defects early in development. It includes methods such as Desk Checking, Code Walkthrough, Code Review, and Code Inspection, as well as the use of Static Analysis Tools. This approach is cost-effective, improves code quality, and helps maintain coding standards.

Uploaded by

sasi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views13 pages

ST Static Testing Notes

Static Testing is a software testing technique that examines code without execution to identify defects early in development. It includes methods such as Desk Checking, Code Walkthrough, Code Review, and Code Inspection, as well as the use of Static Analysis Tools. This approach is cost-effective, improves code quality, and helps maintain coding standards.

Uploaded by

sasi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Make notes for this content

Software Testing – Static Testing (Short Notes)


1. Static Testing

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.

Types of Static Testing


1. Static Testing by Humans
2. Static Analysis Tools

A) Static Testing by Humans


Definition

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.

Methods of Static Testing by Humans


1. Desk Checking
2. Code Walkthrough
3. Code Review
4. Code Inspection

1. Desk Checking
Definition

Desk Checking is an informal manual testing technique where programmers


review their code and algorithm logic before execution.

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

Code Review is a process in which two or more developers visually inspect


source code to identify defects and improve code quality.
Objectives

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.

Inspection Report Includes


 Defects found.
 Process improvement suggestions.
 Metrics for quality assessment.

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.

Characteristics of Static Analysis Tools


1. Calculate metrics such as nesting levels.
2. Enforce coding standards.
3. Analyze structures and dependencies.
4. Identify areas needing additional testing.
5. Improve code maintainability.

Advantages
 Detects defects early.
 Improves code quality.
 Reduces development cost.
 Helps maintain coding standards.
 Supports risk identification.
Quick Comparison
Technique Description Formality

Desk Checking Programmer reviews own code Informal

Code Semi-
Walkthrough Author explains code to team formal

Code Review Peer review by developers Formal

Structured review with Most


Code Inspection rules/checklists Formal

Static Analysis Automated code analysis without


Tools execution Automated

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.

You might also like