Presentation is loading. Please wait.

Presentation is loading. Please wait.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Test case design l Involves designing the test cases (inputs and outputs) used.

Similar presentations


Presentation on theme: "©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Test case design l Involves designing the test cases (inputs and outputs) used."— Presentation transcript:

1 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Test case design l Involves designing the test cases (inputs and outputs) used to test the system. l The goal of test case design is to create a set of tests that are effective in validation and defect testing. l Design approaches: Requirements-based testing; Partition testing; Structural testing.

2 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 2 Requirements based testing l A general principle of requirements engineering is that requirements should be testable. l Requirements-based testing is a validation testing technique where you consider each requirement and derive a set of tests for that requirement.

3 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 3 LIBSYS requirements

4 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 4 LIBSYS tests

5 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 5 Partition testing l Input data and output results often fall into different classes where all members of a class are related. l Each of these classes is an equivalence partition or domain where the program behaves in an equivalent way for each class member. l Test cases should be chosen from each partition.

6 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 6 Equivalence partitioning

7 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 7 Equivalence partitions

8 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 8 Testing guidelines (sequences) l Test software with sequences which have only a single value. l Use sequences of different sizes in different tests. l Derive tests so that the first, middle and last elements of the sequence are accessed. l Test with sequences of zero length.

9 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 9 l Sometime called white-box testing. l Derivation of test cases according to program structure. Knowledge of the program is used to identify additional test cases. l Objective is to exercise all program statements (not all path combinations). Structural testing

10 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 10 Structural testing

11 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 11 l Pre-conditions satisfied, key element in array. l Pre-conditions satisfied, key element not in array. l Pre-conditions unsatisfied, key element in array. l Pre-conditions unsatisfied, key element not in array. l Input array has a single value. l Input array has an even number of values. l Input array has an odd number of values. Binary search - equiv. partitions

12 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 12 Binary search equiv. partitions

13 ©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 13 Binary search - test cases


Download ppt "©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Test case design l Involves designing the test cases (inputs and outputs) used."

Similar presentations


Ads by Google