870 likes | 1.1k Views
WARNING. These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010. They may not show up well on other PowerPoint versions . You can download PowerPoint 2010 viewer from here .
E N D
WARNING • These slides are not optimized for printing or exam preparation. These are for lecture delivery only. • These slides are made for PowerPoint 2010. 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. 50 min
Testing as a career…? Easier to get in,get ahead Blame others, not get blamed Still can code
Testing as a career…? Easier to get in,get ahead Blame others, not get blamed Still can code
SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case
SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case Test case
SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case Test case
When do we define test cases? Are they pre-determined or on-the-fly? SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case Test case
Pre-determined or on-the-fly? SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case Test case How much internal info about the SUT should be revealed to the test case designer?
Pre-determined or on-the-fly? SUT Test case How to choose which test cases to use and which to discard? Test case Test case Test case Test case Test case Test case Test case Test case Test case How much info revealed?
Heuristics for Better Test Case Design CS2103/T, Lecture 9, Part 2, [Oct 18, 2013]
Pre-determined or on-the-fly? How to choose? SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case Test case How much info revealed?
Pre-determined or on-the-fly? SUT Test case
Pre-determined or on-the-fly? SUT Test case
Pre-determined or on-the-fly? SUT Test case pre-determined → scripted testing on-the-fly → exploratory testing
Pre-determined or on-the-fly? SUT Test case pre-determined → scripted testing on-the-fly → exploratory testing
Pre-determined or on-the-fly? Scripted+Exploratory SUT Test case
Pre-determined or on-the-fly? Scripted+Exploratory SUT Test case
Scripted+Exploratory SUT Test case
Scripted+Exploratory SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case How much info revealed?
Scripted+Exploratory SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case How much info revealed?
SUT Developer Tester Test case Test case Test case Test case Test case Test case Test case Test case How much info revealed?
SUT Developer Tester Test case Test case Test case Test case Test case Test case Test case Test case How much info revealed?
Glass-box / a.k.a white box Test case Test case Gray-box Test case Test case Test case Test case Test case Test case Black-box How much info revealed?
Test case Test case Test case Test case Test case Test case Test case Test case How much info revealed?
Scripted+Exploratory SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case Black/Glass/Gray-box
Scripted+Exploratory SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case Black/Glass/Gray-box
Acceptance testing is most likely to be… • Black box testing • White box testing • Gray box testing box {a|b|c} e.g. box a 77577 tinyurl.com/questionSMS
How to choose? Scripted+Exploratory SUT Test case Test case Test case Test case Test case Test case Test case Test case Test case Black/Glass/Gray-box
How to choose? Why choose? Some heuristics Test case Test case Test case Test case Test case Test case Test case Test case
[extra] BSoD Do not panic! This is a simulation
[extra] BSoD What? Windows without bugs?
How to choose? Why choose? Test case Test case Test case Test case Test case Test case Test case Test case
How to choose? Why choose? Test case Test case Test case Test case Test case Test case Test case Test case
How to choose? Why choose? [Effectiveness & Efficiency]
How to choose? Why choose? Dilbert Wally [Effectiveness & Efficiency] Both tested the same system Found 20 bugs Found 10 bugs
How to choose? Why choose? Dilbert Wally [Effectiveness & Efficiency] Both tested the same system Found 20 bugs Found 20 bugs Used 100 test cases Used 40 test cases
How to choose? Why choose? [Effectiveness & Efficiency] A test case should have a reasonable chance of finding a new bugnot found by the other test cases.
How to choose? E&E of testing Some heuristics Test case Test case Test case Test case Test case Test case Test case Test case
How to choose? E&E of testing Some heuristics Test case Test case Test case Test case Test case Test case Test case Test case
How to choose? E&E of testing Some heuristics Test case Test case Test case Test case Test case Test case Test case Test case Equivalence partitioning
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. Hmmm… interesting. Let me try 275 Test case 23: Input: 273 Expected: false Test Case 12 Test case 23: Input: 274 Expected: false Test Case 13 Actual: true Actual: true
Equivalence partitioning isValidMonth(int m): boolean 275 274 273
Equivalence partitioning isValidMonth(int m): boolean 275 274 273
Equivalence partitioning isValidMonth(int m): boolean 0 1 12 13 MAX_INT MIN_INT 275 274 273
Equivalence partitioning isValidMonth(int m): boolean 0 1 12 13 MAX_INT MIN_INT
Equivalence partitioning How to partition?
Equivalence partitioning • Input partition 1a SUT true false
Equivalence partitioning • Input partition 1a • Input partition 1b SUT true false false