2. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing ISEB Foundation Certificate Course Dynamic Testing Techniques 1 2 3 4 5 6
3.
4.
5.
6.
7. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing ISEB Foundation Certificate Course Dynamic Testing Techniques 1 2 3 4 5 6
8.
9. Some test techniques Static Dynamic Structural Behavioural Functional Non-functional Reviews Walkthroughs Desk-checking Data Flow Symbolic Execution Definition -Use Statement Branch/Decision Branch Condition Branch Condition Combination LCSAJ Arcs Equivalence Partitioning Boundary Value Analysis Cause-Effect Graphing Random Usability Performance Static Analysis Inspection Control Flow etc. etc. etc. etc. etc. State Transition
10. Black box versus white box? Black box appropriate at all levels but dominates higher levels of testing White box used predominately at lower levels to compliment black box Integration Component Acceptance System
11. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing ISEB Foundation Certificate Course Dynamic Testing Techniques 1 2 3 4 5 6
12.
13.
14.
15.
16. Customer name Number of characters: 2 64 65 invalid valid invalid 1 Valid characters: Any other A-Z a-z -’ space
17. Account number 5 6 7 invalid valid invalid number of digits: first character: invalid: zero valid: non-zero
20. Design test cases Test Case Description Expected Outcome New Tags Covered 1 2 Name: John Smith Acc no: 123456 Loan: 2500 Term: 3 years Name: AB Acc no: 100000 Loan: 500 Term: 1 year Term: 3 years Repayment: 79.86 Interest rate: 10% Total paid: 2874.96 Term: 1 year Repayment: 44.80 Interest rate: 7.5% Total paid: 537.60 V1, V2, V3, V4, V5 ..... B1, B3, B5, .....
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34. Decision Tables in relation to EP and BVA Input value Output value FALSE TRUE
35.
36. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing ISEB Foundation Certificate Course Dynamic Testing Techniques 1 2 3 4 5 6
37.
38. Using structural coverage More tests More tests More tests More tests More tests More tests More tests More tests Stronger structural techniques (different structural elements) Increasing coverage Coverage OK? What's covered? Results OK? Enough tests? Spec Software Tests
39. The test coverage trap Structure exercised, insufficient function Function exercised, insufficient structure % Statement % Decision % Condition Combination Structural testedness Functional testedness 100% coverage does not mean 100% tested! Coverage is not Thoroughness better testing
40.
41. Example of statement coverage read(a) IF a > 6 THEN b = a ENDIF print b Test case Input Expected output 1 7 7 As all 5 statements are ‘covered’ by this test case, we have achieved 100% statement coverage 1 2 3 4 5 Statement numbers
44. Paths through code with loops for as many times as it is possible to go round the loop (this can be unlimited, i.e. infinite) ? 1 2 3 4 5 6 7 8 ….
45.
46.
47.
48.
49.
50.
51. Contents What is a testing technique? Black and White box testing Black box test techniques White box test techniques Error Guessing ISEB Foundation Certificate Course Dynamic Testing Techniques 1 2 3 4 5 6
52.
53.
54.
55. Summary: Key Points Test techniques are ‘best practice’: help to find faults Black Box techniques are based on behaviour White Box techniques are based on structure Error Guessing supplements systematic techniques ISEB Foundation Certificate Course Dynamic Testing Techniques 1 2 3 4 5 6