INTRODUCTION

This chapter provides an introduction to an important area of software testing—static techniques. Static techniques test software without executing it. They are therefore important because they can find errors and defects before code is executed and therefore earlier in the life cycle of a project, making corrections easier and cheaper to achieve than for the same defects found during test execution. Review techniques are central to the static testing approach, and in this chapter we will look at the alternative types of review and how they fit with the test process that was defined in Chapter 2.

The chapter also considers static analysis of the developed code, which is a technique for examining code without executing it to identify actual and potential problems. With the advances in coding languages and the legacy status of many older systems, static testing is often impossible to achieve manually, so our focus will therefore be on the types of static testing that can be completed using tools. In this chapter we focus on the techniques of static testing; the tools that are referred to are described in Chapter 6.

Learning objectives

The learning objectives for this chapter are listed below. You can confirm that you have achieved these by using the self-assessment questions at the start of the chapter, the ‘Check of understanding‘ boxes distributed throughout the text, and the example examination questions provided at the end of the chapter. The chapter summary will remind you of the key ideas.

The sections are allocated a K number to represent the level of understanding required for that section; where an individual element has a lower K number than the section as a whole this is indicated for that topic; for an explanation of the K numbers see the Introduction.

Reviews and the test process (K2)
  • Recognise software work-products that can be examined by the different static techniques. (K1)

  • Describe the importance and value of considering static techniques for the assessment of software work-products.

  • 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.

Review process (K2)
  • Recall the phases, roles and responsibilities of a typical formal review. (K1)

  • Explain the differences between different types of review: informal review, technical review, walkthrough and inspection.

  • Explain the factors for successful performance of reviews.

Static analysis by tools (K2)
  • Recall typical defects and errors identified by static analysis and compare them with reviews and dynamic testing. (K1)

  • Describe using examples, the typical benefits of static analysis.

  • List typical code and design defects that may be identified by static analysis tools. (K1)

Self-assessment questions

The following questions have been designed to enable you to check your current level of understanding for the topics in this chapter. The answers are at the end of the chapter.

SA1 Question SA1 (K1)

One of the roles in a review is that of moderator, which of the following best describes this role?

a. Plans the review, runs the review meeting and ensures that follow-up activities are completed.

b. Allocates time in the plan, decides which reviews will take place and that the benefits are delivered.

c. Writes the document to be reviewed, agrees that the document can be reviewed, and updates the document with any changes.

d. Documents all issues raised in the review meeting, records problems and open points.

SA2 Question SA2 (K2)

Which of the following statements are correct for walkthroughs?

(i) Often led by the author.

(ii) Documented and defined results.

(iii) All participants have defined roles.

(iv) Used to aid learning.

(v) Main purpose is to find defects.

a. (i) and (v) are correct.

b. (ii) and (iii) are correct.

c. (i) and (iv) are correct.

d. (iii) and (iv) are correct.

SA3 Question SA3 (K1)

What do static analysis tools analyse?

a. Design

b. Test cases

c. Requirements

d. Program code

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset