ISTQB Foundation Level Syllabi

3. Static Techniques (K2) 60 minutes

Learning Objectives for Static Techniques
The objectives identify what you will be able to do following the completion of each module.

3.1 Static Techniques and the Test Process (K2)

LO-3.1.1      Recognize software work products that can be examined by the different static techniques (K1)
LO-3.1.2      Describe the importance and value of considering static techniques for the assessment of software work products (K2)
LO-3.1.3      Explain the difference between static and dynamic techniques, considering objectives, types of defects to be identified, and the role of these techniques within the software life cycle (K2)

3.2 Review Process (K2)

LO-3.2.1      Recall the activities, roles and responsibilities of a typical formal review (K1)
LO-3.2.2      Explain the differences between different types of reviews: informal review, technical review, walkthrough and inspection (K2)
LO-3.2.3      Explain the factors for successful performance of reviews (K2)

3.3 Static Analysis by Tools (K2)

LO-3.3.1      Recall typical defects and errors identified by static analysis and compare them to reviews and dynamic testing (K1)
LO-3.3.2      Describe, using examples, the typical benefits of static analysis (K2)
LO-3.3.3      List typical code and design defects that may be identified by static analysis tools (K1)

3.1 Static techniques and the test process (K2) 15 minutes

Terms
Dynamic testing, static testing

Background
Unlike dynamic testing, which requires the execution of software, static testing techniques rely on the manual examination (reviews) and automated analysis (static analysis) of the code or other project documentation without the execution of the code.

Reviews are a way of testing software work products (including code) and can be performed well before dynamic test execution. Defects detected during reviews early in the life cycle (e.g., defects found in requirements) are often much cheaper to remove than those detected by running tests on the executing code.

A review could be done entirely as a manual activity, but there is also tool support. The main manual activity is to examine a work product and make comments about it. Any software work product can be reviewed, including requirements specifications, design specifications, code, test plans, test specifications, test cases, test scripts, user guides or web pages.

Benefits of reviews include early defect detection and correction, development productivity improvements, reduced development timescales, reduced testing cost and time, lifetime cost reductions, fewer defects and improved communication. Reviews can find omissions, for example, in requirements, which are unlikely to be found in dynamic testing.

Reviews, static analysis and dynamic testing have the same objective - identifying defects. They are complementary; the different techniques can find different types of defects effectively and efficiently. Compared to dynamic testing, static techniques find causes of failures (defects) rather than the failures themselves.

Typical defects that are easier to find in reviews than in dynamic testing include: deviations from standards, requirement defects, design defects, insufficient maintainability and incorrect interface specifications.


3.2 Review Process (K2) 25 minutes

Terms
Entry criteria, formal review, informal review, inspection, metric, moderator, peer review, reviewer, scribe, technical review, walkthrough

Background
The different types of reviews vary from informal, characterized by no written instructions for reviewers, to systematic, characterized by team participation, documented results of the review, and documented procedures for conducting the review. The formality of a review process is related to factors such as the maturity of the development process, any legal or regulatory requirements or the need for an audit trail.

The way a review is carried out depends on the agreed objectives of the review (e.g., find defects, gain understanding, educate testers and new team members, or discussion and decision by consensus).

3.2.1 Activities of a Formal Review (K1)

A typical formal review has the following main activities:

  1. Planning
    1. Defining the review criteria
    2. Selecting the personnel
    3. Allocating roles
    4. Defining the entry and exit criteria for more formal review types (e.g., inspections)
    5. Selecting which parts of documents to review
    6. Checking entry criteria (for more formal review types)
  2. Kick-off  
    1. Distributing documents
    2. Explaining the objectives, process and documents to the participants
  3. Individual preparation
    1. Preparing for the review meeting by reviewing the document(s)
    2. Noting potential defects, questions and comments
  4. Examination/evaluation/recording of results (review meeting)
    1. Discussing or logging, with documented results or minutes (for more formal review types)
    2. Noting defects, making recommendations regarding handling the defects, making decisions about the defects
    3. Examining/evaluating and recording issues during any physical meetings or tracking any group electronic communications
  5. Rework
    1. Fixing defects found (typically done by the author)
    2. Recording updated status of defects (in formal reviews)
  6. Follow-up 
    1. Checking that defects have been addressed
    2. Gathering metrics
    3. Checking on exit criteria (for more formal review types

3.2.2 Roles and Responsibilities (K1)

A typical formal review will include the roles below:

Looking at software products or related work products from different perspectives and using checklists can make reviews more effective and efficient. For example, a checklist based on various perspectives such as user, maintainer, tester or operations, or a checklist of typical requirements problems may help to uncover previously undetected issues.

3.2.3 Types of Reviews (K2)

A single software product or related work product may be the subject of more than one review. If more than one type of review is used, the order may vary. For example, an informal review may be carried out before a technical review, or an inspection may be carried out on a requirements specification before a walkthrough with customers. The main characteristics, options and purposes of common review types are:

Informal Review

Walkthrough

Technical Review

Inspection

Walkthroughs, technical reviews and inspections can be performed within a peer group, i.e., colleagues at the same organizational level. This type of review is called a "peer review".

3.2.4 Success Factors for Reviews (K2)

Success factors for reviews include:

3.3 Static Analysis by Tools (K2) 20 minutes

Terms
Compiler, complexity, control flow, data flow, static analysis

Background
The objective of static analysis is to find defects in software source code and software models. Static analysis is performed without actually executing the software being examined by the tool; dynamic testing does execute the software code. Static analysis can locate defects that are hard to find in dynamic testing. As with reviews, static analysis finds defects rather than failures. Static analysis tools analyze program code (e.g., control flow and data flow), as well as generated output such as HTML and XML.

The value of static analysis is:

Typical defects discovered by static analysis tools include:

Static analysis tools are typically used by developers (checking against predefined rules or programming standards) before and during component and integration testing or when checking-in code to configuration management tools, and by designers during software modeling. Static analysis tools may produce a large number of warning messages, which need to be well-managed to allow the most effective use of the tool.

Compilers may offer some support for static analysis, including the calculation of metrics.

References
3.2  IEEE 1028
3.2.2  Gilb, 1993, van Veenendaal, 2004
3.2.4  Gilb, 1993, IEEE 1028
3.3  van Veenendaal, 2004