Presentation is loading. Please wait.

Presentation is loading. Please wait.

WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.

Similar presentations


Presentation on theme: "WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010."— Presentation transcript:

1 WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint They may not show up well on other PowerPoint versions. You can download PowerPoint 2010 viewer from here. These slides contain a lot of animations. For optimal results, watch in slideshow mode.

2 Testing as a career…? Easier to get in, get ahead
Blame others, not get blamed Still can code

3 Testing as a career…? Easier to get in, get ahead
Blame others, not get blamed Still can code

4 Test-savvy coders are good coders
Testing as a career…? Test-savvy coders are good coders

5 SUT Test case

6 SUT Test case Test case

7 SUT Test case Test case To do this, we have to design these test cases

8 When do we define test cases? Are they pre-determined or on-the-fly?
SUT Test case Test case

9 SUT Pre-determined or on-the-fly?
Test case Test case How much internal info about the SUT should be revealed to the test case designer?

10 SUT How to choose which test cases to use and which to discard?
Pre-determined or on-the-fly? SUT Test case Test case How much info revealed?

11 CS2103/T, Lecture 8, Part 3, [Oct 7, 2016]
Pre-determined or on-the-fly? How to choose? Heuristics for Better Test Case Design CS2103/T, Lecture 8, Part 3, [Oct 7, 2016] How much info revealed?

12 SUT Pre-determined or on-the-fly? How to choose?
Test case Test case How much info revealed?

13 Pre-determined or on-the-fly?
SUT Test case

14 Pre-determined or on-the-fly?
SUT Test case

15 SUT scripted testing  which one? exploratory testing  which one?
Pre-determined or on-the-fly? SUT Test case scripted testing  which one? exploratory testing  which one?

16 SUT scripted testing  pre-determined exploratory testing  on-the-fly
Pre-determined or on-the-fly? SUT Test case scripted testing  pre-determined exploratory testing  on-the-fly Most of the jokes done by comedians are scripted. They sometimes throw in a few on-the-spot jokes, but even they are not totally random. how to choose?

17 Pre-determined or on-the-fly?
Scripted+Exploratory SUT Test case

18 Pre-determined or on-the-fly?
Scripted+Exploratory SUT Test case

19 Scripted+Exploratory
SUT Test case

20 Scripted+Exploratory
SUT Test case Test case How much info revealed?

21 Scripted+Exploratory
SUT Test case Test case How much info revealed?

22 SUT Developer Tester Test case How much info revealed?

23 SUT Developer Tester Test case How much info revealed?

24 Glass-box / a.k.a white box
Gray-box Test case Black-box How much info revealed?

25 Test case How much info revealed?

26 Scripted+Exploratory
SUT Test case Test case Black/Glass/Gray-box

27 Scripted+Exploratory
SUT Test case Test case Black/Glass/Gray-box

28 Acceptance testing is most likely to be…
Black box testing White box testing Gray box testing

29 SUT How to choose? Scripted+Exploratory Black/Glass/Gray-box Test case

30 How to choose? Why choose? Some heuristics Test case

31 No need to celebrate! This is a simulation 
[extra] BSoD No need to celebrate! This is a simulation  [CS2103]

32 Windows without bugs? That’s crazy talk!
[extra] BSoD Windows without bugs? That’s crazy talk! [CS2103]

33 How to choose? Why choose? Test case

34 How to choose? Why choose? Test case

35 How to choose? Why choose? [Effectiveness & Efficiency]

36 Both tested the same system
How to choose? Why choose? Dilbert Wally Both tested the same system [Effectiveness & Efficiency] Found 20 bugs Found 10 bugs

37 Both tested the same system
How to choose? Why choose? Dilbert Wally Both tested the same system [Effectiveness & Efficiency] Found 20 bugs Found 20 bugs Used 100 test cases Used 40 test cases

38 How to choose? Why choose? [Effectiveness & Efficiency] A test case should have a reasonable chance of finding a new bug not found by the other test cases.

39 How to choose? E&E of testing Some heuristics Test case

40 How to choose? E&E of testing Some heuristics Test case

41 Equivalence partitioning
How to choose? E&E of testing Some heuristics Test case Equivalence partitioning

42 Equivalence partitioning
How to choose? E&E of testing Some heuristics Test case Equivalence partitioning

43 Equivalence partitioning

44 77577 OR tinyurl.com/answerpost
Equivalence partitioning isValidMonth (int m): boolean Description: checks if m is in the range [1..12]. returns true if m is in the range, false otherwise. Which values would you use to test this isValidMonth method? cases {value1 value2 …} e.g. cases 1 4 9 OR tinyurl.com/answerpost

45 Pass/fail? Hmmm… interesting. Let me try 275 Should he? Why not?
Equivalence partitioning isValidMonth (int m): boolean Description: checks if m is in the range [1..12]. returns true if m is in the range, false otherwise. Pass/fail? Hmmm… interesting. Let me try 275 Test case 23: Input: 273 Expected: false Test Case 12 Test Case 13 Test case 23: Input: 274 Expected: false Should he? Why not? Actual: true Actual: true

46 275 Must be broken too! Broken! Broken! isValidMonth (int m): boolean
Equivalence partitioning isValidMonth (int m): boolean 275 273 274 Must be broken too! Broken! Broken!

47 Equivalence partitioning
isValidMonth (int m): boolean 275 273 274

48 275 isValidMonth (int m): boolean 273 274 Equivalence partitioning
MIN_INT 1 12 13 MAX_INT 275 273 274

49 isValidMonth (int m): boolean
Equivalence partitioning isValidMonth (int m): boolean MIN_INT 1 12 13 MAX_INT

50 Equivalence partitioning
How to partition?

51 Equivalence partitioning
Input space Output space SUT

52 SUT Equivalence partitioning Output space Input space
Input partition 1 Input partition 2 Input partition 3 Output 1 Output 2 Output 3 Input space Output space Input partition 1a SUT false true

53 SUT Equivalence partitioning Input partition 1 Output 1
Input partition 1a Input partition 1b SUT false true

54 Equivalence partitioning

55 Why does i need more than one eq. partition?
Equivalence partitioning Why does i need more than one eq. partition? int square (int i) Description: returns the the square value of i

56 Description: returns the the square value of i
Equivalence partitioning int square (int i) Description: returns the the square value of i +√MAX -√MAX -1 MIN MAX

57 Description: returns the the square value of i
Equivalence partitioning int square (int i) Description: returns the the square value of i +√MAX -√MAX -1 MIN MAX

58 It helps to improve E&E by …
How to choose? E&E of testing Some heuristics Test case Equivalence partitioning An Eq. partition is a … It helps to improve E&E by …

59 To be continued in the next lecture …


Download ppt "WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010."

Similar presentations


Ads by Google