SE201 · Chapter 8 · Annotated SlidesSoftware Testing
Original
Overview

Software Testing

What testing is, black-box testing (decision tables, equivalence partitioning, boundary-value analysis), white-box basis path testing with flow graphs and cyclomatic complexity, unit and integration testing (top-down, bottom-up, stubs and drivers), system, non-functional, acceptance and regression testing.

How to read this page

Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.

All 74 slides
  1. 1 Slide 1
  2. 2 2
  3. 3 3
  4. 4 4
  5. 5 5
  6. 6 What is Software Testing?
  7. 7 7
  8. 8 8
  9. 9 BLACK BOX TESTING
  10. 10 How is Black Box Testing done?
  11. 11 Types of Black Box Testing
  12. 12 12
  13. 13 13
  14. 14 Example 1: How to make Decision Base Table for Login Screen
  15. 15 Example 2: How to make Decision Table for Upload Screen
  16. 16 Example 2: How to make Decision Table for Upload Screen
  17. 17 Process for decision table testing
  18. 18 Why Decision Table Testing is Important?
  19. 19 Review Question: Decision Table Testing
  20. 20 What is Equivalent Class Partitioning?
  21. 21 Example 1:
  22. 22 Example 1:
  23. 23 Review Question
  24. 24 What is Boundary Testing?
  25. 25 Example 1: Boundary Value Testing
  26. 26 Review Question
  27. 27 Review Question
  28. 28 28
  29. 29 29
  30. 30 30
  31. 31 31
  32. 32 Basis path testing:
  33. 33 Steps for Basis Path testing
  34. 34 Source Code Flow Graph Notations
  35. 35 1-Flow Graph Notation for a Program
  36. 36 Basis Path Testing: Step 1
  37. 37 Basis Path Testing: Step 1
  38. 38 How to Calculate Cyclomatic Complexity
  39. 39 Basis Path Testing: Step 2
  40. 40 Basis Path Testing: Step 3
  41. 41 41
  42. 42 Sorting the array in descending order
  43. 43 Sorting the array in descending order
  44. 44 How this metric is useful for software testing?
  45. 45 Complexity number and Corresponding meaning of v (G):
  46. 46 Uses of Cyclomatic Complexity
  47. 47 Comparison
  48. 48 48
  49. 49 49
  50. 50 UNIT TESTING
  51. 51 UNIT TESTING
  52. 52 52
  53. 53 53
  54. 54 54
  55. 55 Integration Testing
  56. 56 Why do Integration Testing?
  57. 57 Example of Integration Test Case
  58. 58 Example of Integration Test Case
  59. 59 59
  60. 60 Approaches, Strategies, Methodologies of Integration Testing
  61. 61 Approaches, Strategies, Methodologies of Integration Testing
  62. 62 Integration Testing Approach: Incremental Approach
  63. 63 What is a Stub?
  64. 64 What is a Driver?
  65. 65 Integration Testing Approach: Incremental Approach
  66. 66 Integration Testing Approach: Incremental Approach
  67. 67 System Testing
  68. 68 68
  69. 69 Non-functional software testing
  70. 70 Non-functional software testing (2)
  71. 71 Non-functional software testing (3)
  72. 72 Non-functional software testing (4)
  73. 73 What is Acceptance Testing?
  74. 74 What is Regression Testing?
Slide 1 / 74

Slide 1

Slide 1: Slide 1
Slide 2 / 74

2

Slide 2: 2
Slide 3 / 74

3

Slide 3: 3
Slide 4 / 74

4

Slide 4: 4
Slide 5 / 74

5

Slide 5: 5
Slide 6 / 74

What is Software Testing?

Slide 6: What is Software Testing?

Notes

  1. Testing: running a program to find defects before it is put into use. It shows the presence of bugs, not their absence.

Slide 7 / 74

7

Slide 7: 7
Slide 8 / 74

8

Slide 8: 8
Slide 9 / 74

BLACK BOX TESTING

Slide 9: BLACK BOX TESTING
Slide 10 / 74

How is Black Box Testing done?

Slide 10: How is Black Box Testing done?
Slide 11 / 74

Types of Black Box Testing

Slide 11: Types of Black Box Testing
Slide 12 / 74

12

Slide 12: 12
Slide 13 / 74

13

Slide 13: 13
Slide 14 / 74

Example 1: How to make Decision Base Table for Login Screen

Slide 14: Example 1: How to make Decision Base Table for Login Screen

Notes

  1. Decision table: conditions × actions; each column is a rule → one test case. n binary conditions → up to 2ⁿ rules.

Exam angle

PredictionQ1

How many rules does a full decision table with 3 binary conditions have?

Slide 15 / 74

Example 2: How to make Decision Table for Upload Screen

Slide 15: Example 2: How to make Decision Table for Upload Screen
Slide 16 / 74

Example 2: How to make Decision Table for Upload Screen

Slide 16: Example 2: How to make Decision Table for Upload Screen
Slide 17 / 74

Process for decision table testing

Slide 17: Process for decision table testing
Slide 18 / 74

Why Decision Table Testing is Important?

Slide 18: Why Decision Table Testing is Important?
Slide 19 / 74

Review Question: Decision Table Testing

Slide 19: Review Question: Decision Table Testing
Slide 20 / 74

What is Equivalent Class Partitioning?

Slide 20: What is Equivalent Class Partitioning?

Notes

  1. Equivalence partitioning: divide inputs into classes that behave the same; test one value from each (valid and invalid).

Exam angle

PredictionQ1

Valid ages are 18–60. How many equivalence classes?

Slide 21 / 74

Example 1:

Slide 21: Example 1:
Slide 22 / 74

Example 1:

Slide 22: Example 1:
Slide 23 / 74

Review Question

Slide 23: Review Question
Slide 24 / 74

What is Boundary Testing?

Slide 24: What is Boundary Testing?

Notes

  1. Boundary value analysis: test at and around the edges: min−1, min, min+1, max−1, max, max+1.

Exam angle

PredictionQ1

Valid range 1–100. Which set is BVA?

Slide 25 / 74

Example 1: Boundary Value Testing

Slide 25: Example 1: Boundary Value Testing
Slide 26 / 74

Review Question

Slide 26: Review Question
Slide 27 / 74

Review Question

Slide 27: Review Question
Slide 28 / 74

28

Slide 28: 28
Slide 29 / 74

29

Slide 29: 29
Slide 30 / 74

30

Slide 30: 30
Slide 31 / 74

31

Slide 31: 31
Slide 32 / 74

Basis path testing:

Slide 32: Basis path testing:

Notes

  1. Basis path testing (white-box): draw the flow graph, compute cyclomatic complexity, find independent paths, design one test per path.

Slide 33 / 74

Steps for Basis Path testing

Slide 33: Steps for Basis Path testing
Slide 34 / 74

Source Code Flow Graph Notations

Slide 34: Source Code Flow Graph Notations
Slide 35 / 74

1-Flow Graph Notation for a Program

Slide 35: 1-Flow Graph Notation for a Program
Slide 36 / 74

Basis Path Testing: Step 1

Slide 36: Basis Path Testing: Step 1
Slide 37 / 74

Basis Path Testing: Step 1

Slide 37: Basis Path Testing: Step 1
Slide 38 / 74

How to Calculate Cyclomatic Complexity

Slide 38: How to Calculate Cyclomatic Complexity

Notes

  1. Cyclomatic complexity V(G) = E − N + 2 = P + 1 (P = predicate/decision nodes) = number of regions. It is the number of independent paths.

  2. Tip V(G) = E − N + 2 = decisions + 1 = regions.

Exam angle

PredictionQ1

A flow graph has 9 edges and 7 nodes. V(G) =

PredictionQ2

A function with 3 if-statements (no loops) has V(G) =

Slide 39 / 74

Basis Path Testing: Step 2

Slide 39: Basis Path Testing: Step 2
Slide 40 / 74

Basis Path Testing: Step 3

Slide 40: Basis Path Testing: Step 3
Slide 41 / 74

41

Slide 41: 41
Slide 42 / 74

Sorting the array in descending order

Slide 42: Sorting the array in descending order
Slide 43 / 74

Sorting the array in descending order

Slide 43: Sorting the array in descending order
Slide 44 / 74

How this metric is useful for software testing?

Slide 44: How this metric is useful for software testing?
Slide 45 / 74

Complexity number and Corresponding meaning of v (G):

Slide 45: Complexity number and Corresponding meaning of v (G):
Slide 46 / 74

Uses of Cyclomatic Complexity

Slide 46: Uses of Cyclomatic Complexity
Slide 47 / 74

Comparison

Slide 47: Comparison
Slide 48 / 74

48

Slide 48: 48
Slide 49 / 74

49

Slide 49: 49
Slide 50 / 74

UNIT TESTING

Slide 50: UNIT TESTING
Slide 51 / 74

UNIT TESTING

Slide 51: UNIT TESTING
Slide 52 / 74

52

Slide 52: 52
Slide 53 / 74

53

Slide 53: 53
Slide 54 / 74

54

Slide 54: 54
Slide 55 / 74

Integration Testing

Slide 55: Integration Testing

Notes

  1. Integration testing: test the interfaces between combined units.

Slide 56 / 74

Why do Integration Testing?

Slide 56: Why do Integration Testing?
Slide 57 / 74

Example of Integration Test Case

Slide 57: Example of Integration Test Case
Slide 58 / 74

Example of Integration Test Case

Slide 58: Example of Integration Test Case
Slide 59 / 74

59

Slide 59: 59
Slide 60 / 74

Approaches, Strategies, Methodologies of Integration Testing

Slide 60: Approaches, Strategies, Methodologies of Integration Testing
Slide 61 / 74

Approaches, Strategies, Methodologies of Integration Testing

Slide 61: Approaches, Strategies, Methodologies of Integration Testing
Slide 62 / 74

Integration Testing Approach: Incremental Approach

Slide 62: Integration Testing Approach: Incremental Approach
Slide 63 / 74

What is a Stub?

Slide 63: What is a Stub?

Notes

  1. Stub: a dummy CALLED module (replaces a lower module in top-down integration). Driver: a dummy CALLING module (replaces an upper module in bottom-up).

  2. Memory trick Top-down needs Stubs; Bottom-up needs Drivers.

Exam angle

PredictionQ1

Top-down integration testing needs:

Slide 64 / 74

What is a Driver?

Slide 64: What is a Driver?
Slide 65 / 74

Integration Testing Approach: Incremental Approach

Slide 65: Integration Testing Approach: Incremental Approach
Slide 66 / 74

Integration Testing Approach: Incremental Approach

Slide 66: Integration Testing Approach: Incremental Approach
Slide 67 / 74

System Testing

Slide 67: System Testing

Notes

  1. System testing: test the complete integrated system against requirements (functional and non-functional: performance, load, stress, security, usability).

Slide 68 / 74

68

Slide 68: 68
Slide 69 / 74

Non-functional software testing

Slide 69: Non-functional software testing
Slide 70 / 74

Non-functional software testing (2)

Slide 70: Non-functional software testing (2)
Slide 71 / 74

Non-functional software testing (3)

Slide 71: Non-functional software testing (3)
Slide 72 / 74

Non-functional software testing (4)

Slide 72: Non-functional software testing (4)
Slide 73 / 74

What is Acceptance Testing?

Slide 73: What is Acceptance Testing?

Notes

  1. Acceptance testing: customers test with their data to decide whether to accept the system (alpha: at the developer’s site; beta: at users’ sites).

Exam angle

PredictionQ1

Testing by real users at their own sites before release is:

Slide 74 / 74

What is Regression Testing?

Slide 74: What is Regression Testing?

Notes

  1. Regression testing: re-run tests after changes to make sure nothing that worked is now broken.