24
1 Software Testing and Quality Assurance Lecture 13 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object-Oriented Software)

1 Software Testing and Quality Assurance Lecture 13 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)

Embed Size (px)

Citation preview

1

Software Testing and Quality Assurance

Lecture 13 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object-

Oriented Software)

2

Lecture Outline To be able to plan a test process that

complement the development process.

3

Introduction Testing requires considerable resources.

Effective utilization of those resources requires good planning and good management.

Planning at technical level is guided by templates that are “instantiated” as needed by developers IEEE test plan standard

Basic testing process: Test early, test often, test enough.

4

A Development process overview A process is a continuous series of activities

that convey you to an end. Four main activities of software

development Analysis: (domain and application analysis) focuses on

understanding the problem and defining the requirements for the software portions of the system

Design: (architectural design, subsystem and package design, class design, and algorithm design) focuses on solving the problem in software

5

A Development process overview (cont...)

Implementation: (class implementation and integration) focuses on translating the design into executable code

Testing: (basic unit testing, integrated units testing, subsystem testing, system testing) focuses on ensuring that inputs produce the desired results as specified by the requirements.

Maintenance focuses on bug repairs and enhancements.

6

A Development process overview (cont...) Development models: Evolutionary,

incremental (our focus), spiral, concurrent. Under an increment development process, a

system is developed as a sequence of increments.

An increment can be a deliverable, including models, documentation, and code,

which provides some of the functionality required by the system.

7

A Development process overview (cont...) The products developed in one increment

feeds into the development of the next increment.

The final increment is delivers a deployable system that meets all requirements.

Increments can be developed in sequence or one or more can be developed concurrently.

8

A Development process overview (cont...)

In each increment developers: analyze, design, code, and test as needed.

Developers have to perform these activities repeatedly in building an increment because they find errors in previous work

(incremental, iterative development process).

9

A Development process overview (cont...)

Analysis

Design

Implementation

Testing

Increment 1

Analysis

Design

Implementation

Testing

Increment 2

Analysis

Design

Implementation

Testing

Increment N

10

A Development process overview (cont...)

Object-oriented development is particularly well suited to evolutionary development because OO analysis, design and implementation

entail the successive refinement of a single model. In OO analysis, we understand a problem by

modeling it in terms of objects and classes of objects, their relationships and responsibilities.

11

A Development process overview (cont...) In OO design, we solve the problem by

manipulating those same objects and relationships identified in analysis and introducing solution-specific classes,

objects, relationships, and responsibilities. Testing should also be done in every

increment. Regression tests must be run between increments and within iterations.

12

Example: Incremental, Iterative Development Plan for Brickles

Increment Iteration

Present user interface showing puck bouncing in window

1.a Domain analysis: Construct class diagrams

1.b Application analysis: Construct class diagrams and sate diagrams

1.c Design: Study MFC and animation.

1.d Design: Complete class diagram for puck bouncing in a window

1.e Implementation: Code puck bouncing in window

1.f Testing: Test the code for puck bouncing in window

13

Example: Incremental, Iterative Development Plan for Brickles (cont...)

Increment Iteration

Move paddle in window and detect collisions

2.a Application analysis: Add details of Paddle control and collisions to class diagrams, other diagrams

2.b Design: Design Paddle and collision classes.

2.c Implementation: Code Paddle classes incrementally from MovsbleSprite and collision class from exception.

14

Example: Incremental, Iterative Development Plan for Brickles (cont...)

Increment Iteration

Display brick pile and detect collisions.

1.a Application analysis: Add collections of sprites to class diagram

1.b. Design: Design collision detection algorithm.

1.c Implementation: Code Brickpile class by aggregating collection class.

15

Example: Incremental, Iterative Development Plan for Brickles (cont...)

Increment Iteration

4. Add supply of pucks and detect end of match

1.a Design: End of match algorithm to use exceptions to detect endOfMatch

1.b. Implementation: PuckSupply class.

16

A Testing process overview Development and testing are two distinct but

intimately related processes. Their activities overlap when test cases have to be designed, coded, and executed.

The roles of development and testing functionality are usually assigned to different people.

17

A Testing process overview

Development process

Testingprocess

Development product

Test results

18

A Testing process overview: testability

Testability is related to how easily you can evaluate the results of the tests.

19

A Testing process overview: test cases and test suites

The basic component of testing is a test case. A test case is a pair (input, expected result):

Input: is a description of an input to the software under test.

Expected result: is a description of the output that the software should exhibit for the associated input.

Input and expected result may not be simple data values, they can be arbitrarily complex.

20

A Testing process overview: test cases and test suites (cont...)

A test case execution is a running of the software that provides the input specified in the test case and observes the results and compares them to

those specified by the test case.

21

A Testing process overview: test cases and test suites (cont...)

Test suites have some sort of organization based on the kinds of test cases, e.g. system capacity test suites, typical uses of

the system suite, etc. Main issues in test suite:

correctness, observability of results, and adequacy.

22

A Testing process overview: STEP testing technique Analysis: The product to be tested is

examined to identify any special features that must receive particular attention and to determine the test cases that should be constructed.

Construction: the artifacts that are needed for testing are created. Test cases identified during analysis are translated into programming languages and scripting languages.

23

A Testing process overview: STEP testing technique

Execution and evaluation: the results are examined to determine whether the software passed the test suite or failed it.

24

Key points Basic testing process: Test early, test often,

test enough. Development and testing are two distinct but

intimately related processes. The basic component of testing is a test case

(pair of input and expected result) STEP testing technique: analysis,

construction, and execution and evaluation.