The introduction of test
pattern making
Reference
• The content is quoted from
“A priactitioner’s Guide to Software design”.
• If you need further information,
please reference it.
Outline
• Black box testing technique
• Equivalence class testing
• Boundary value testing
• Decision table testing
• Pairwise testing
• State transition testing
• Use case testing
• White box testing techniques
• Control flow testing
• Data flow testing
• The testing paradigm
• The process of designing testing
What is the benefit of testing
• Automated testing is always faster than manual testing.
• You can perform regression test by little cost.
Black box testing and white box testing(Type)
• Black box testing
• Only test the input and output
• User-perspective testing
• White box testing
• Test the code flow and logic
• Programmer-perspective testing
Black box testing – Equivalence class testing
• Given a sample program. How many test case should we make?
Design by contract and Testing by contract
• Contract
• defines pre-condition and post-condition
• Post-condition
• defines what a module promises to do
• Pre-condition
• defines what the module requires to reach post-condition
• Testing by contract
• Only test the situations which pre-conditions are met
Defensive design and defensive testing
• Defensive design
• A module is designed to accept any input.
• Defensive testing
• Need to test all the conditions.
Black box testing – Boundary value testing
• The bugs ofter happens on boundary
• Test {BoundaryValue -1, BoundaryValue, BoundaryValue+1 }
Black box testing – Boundary value testing
• The bugs ofter happens on boundary
• Test {BoundaryValue -1, BoundaryValue, BoundaryValue+1 }
Black box testing – Decision table testing
• List every possible conditions and actions.
• Maximize coverage of conditions ,Minimize test numbers.
Black box testing – Decision table testing
• List every possible conditions and actions.
• Maximize coverage of conditions ,Minimize test numbers.
Black box testing – Pairwise testing
• 1. Identify the variables
• 2. Determine the number of each variables
• 3. Make an orthogonal array to list all the possibility
• 4. Delete unnecessary test case
Black box testing – Pairwise testing
Black box testing – State transition testing
• 1. Draw state transition graph
• 2. Test every possible path.
Black box testing – Use case testing
• List the use scenario and test.
White box testing
White box testing – Control flow testing
White box testing – Control flow testing
The testing paradigm
The process of designing testing

Software testdesign

  • 1.
    The introduction oftest pattern making
  • 2.
    Reference • The contentis quoted from “A priactitioner’s Guide to Software design”. • If you need further information, please reference it.
  • 3.
    Outline • Black boxtesting technique • Equivalence class testing • Boundary value testing • Decision table testing • Pairwise testing • State transition testing • Use case testing • White box testing techniques • Control flow testing • Data flow testing • The testing paradigm • The process of designing testing
  • 4.
    What is thebenefit of testing • Automated testing is always faster than manual testing. • You can perform regression test by little cost.
  • 5.
    Black box testingand white box testing(Type) • Black box testing • Only test the input and output • User-perspective testing • White box testing • Test the code flow and logic • Programmer-perspective testing
  • 6.
    Black box testing– Equivalence class testing • Given a sample program. How many test case should we make?
  • 7.
    Design by contractand Testing by contract • Contract • defines pre-condition and post-condition • Post-condition • defines what a module promises to do • Pre-condition • defines what the module requires to reach post-condition • Testing by contract • Only test the situations which pre-conditions are met
  • 8.
    Defensive design anddefensive testing • Defensive design • A module is designed to accept any input. • Defensive testing • Need to test all the conditions.
  • 9.
    Black box testing– Boundary value testing • The bugs ofter happens on boundary • Test {BoundaryValue -1, BoundaryValue, BoundaryValue+1 }
  • 10.
    Black box testing– Boundary value testing • The bugs ofter happens on boundary • Test {BoundaryValue -1, BoundaryValue, BoundaryValue+1 }
  • 11.
    Black box testing– Decision table testing • List every possible conditions and actions. • Maximize coverage of conditions ,Minimize test numbers.
  • 12.
    Black box testing– Decision table testing • List every possible conditions and actions. • Maximize coverage of conditions ,Minimize test numbers.
  • 13.
    Black box testing– Pairwise testing • 1. Identify the variables • 2. Determine the number of each variables • 3. Make an orthogonal array to list all the possibility • 4. Delete unnecessary test case
  • 14.
    Black box testing– Pairwise testing
  • 15.
    Black box testing– State transition testing • 1. Draw state transition graph • 2. Test every possible path.
  • 16.
    Black box testing– Use case testing • List the use scenario and test.
  • 18.
  • 19.
    White box testing– Control flow testing
  • 20.
    White box testing– Control flow testing
  • 21.
  • 22.
    The process ofdesigning testing