model based mutation driven test case generation
play

MODEL-BASED, MUTATION-DRIVEN TEST CASE GENERATION VIA - PowerPoint PPT Presentation

MODEL-BASED, MUTATION-DRIVEN TEST CASE GENERATION VIA HEURISTIC-GUIDED BRANCHING SEARCH Andreas Fellner FMCAD Student Forum Wien, October 4th 2017 TEST CASE GENERATION WITH 1 Andreas Fellner TEST CASE GENERATION WITH Abstract Model UML /


  1. MODEL-BASED, MUTATION-DRIVEN TEST CASE GENERATION VIA HEURISTIC-GUIDED BRANCHING SEARCH Andreas Fellner FMCAD Student Forum Wien, October 4th 2017

  2. TEST CASE GENERATION WITH 1 Andreas Fellner

  3. TEST CASE GENERATION WITH Abstract Model UML / Event-B 1 Andreas Fellner

  4. TEST CASE GENERATION WITH Abstract Model Executable Model UML / Event-B Action System 1 Andreas Fellner

  5. TEST CASE GENERATION WITH Abstract Model Executable Model UML / Event-B Action System Automatic Translation 1 Andreas Fellner

  6. TEST CASE GENERATION WITH Abstract Model Executable Model UML / Event-B Action System Automatic Translation Mutated Action Systems 1 Andreas Fellner

  7. TEST CASE GENERATION WITH Abstract Model Executable Model UML / Event-B Action System Automatic Translation Mutated Action Systems 1 Andreas Fellner

  8. TEST CASE GENERATION WITH Abstract Model Executable Model UML / Event-B Action System Automatic Translation Mutated Action Systems c := c + 1 Original: c := c Mutation: 1 Andreas Fellner

  9. TEST CASE GENERATION WITH Abstract Model Executable Model UML / Event-B Action System Automatic Translation Mutated Action Systems c := c + 1 Original: c := c Mutation: if signal > 100 Original: … if false Mutation: … 1 Andreas Fellner

  10. TEST CASE GENERATION WITH Abstract Model Test Cases Executable Model UML / Event-B Action System Automatic Translation Mutated Action Systems c := c + 1 Original: c := c Mutation: if signal > 100 Original: … if false Mutation: … 1 Andreas Fellner

  11. TEST CASE GENERATION WITH Input/Output Abstract Model Test Cases Executable Model Sequence UML / Event-B Action System Automatic Translation Mutated Action Systems c := c + 1 Original: c := c Mutation: if signal > 100 Original: … if false Mutation: … 1 Andreas Fellner

  12. TEST CASE GENERATION WITH Input/Output Abstract Model Test Cases Executable Model Sequence UML / Event-B Action System Branching Search Automatic Translation Mutated Action Systems c := c + 1 Original: c := c Mutation: if signal > 100 Original: … if false Mutation: … 1 Andreas Fellner

  13. TEST CASE GENERATION WITH Input/Output Abstract Model Test Cases Executable Model Sequence UML / Event-B Action System Branching Search Automatic Translation Mutated Action Systems Mutants killed / alive / equivalent? c := c + 1 Original: c := c Mutation: if signal > 100 Original: … if false Mutation: … 1 Andreas Fellner

  14. TEST CASE GENERATION WITH Input/Output Abstract Model Test Cases Executable Model Sequence UML / Event-B Action System Branching Search Automatic Translation Mutated Action Systems Mutants killed / alive / equivalent? Mutant Killed: c := c + 1 Original: - Same Input c := c Mutation: - Different Output if signal > 100 Original: … if false Mutation: … 1 Andreas Fellner

  15. BRANCHING SEARCH AND MUTATION KILLING 2 Andreas Fellner

  16. BRANCHING SEARCH AND MUTATION KILLING • Explore model in branches 2 Andreas Fellner

  17. BRANCHING SEARCH AND MUTATION KILLING • Explore model in branches ? ! ? ! ? ! 2 Andreas Fellner

  18. BRANCHING SEARCH AND MUTATION KILLING • Explore model in branches ? ? ? ? ! ! ? ! ? ! 2 Andreas Fellner

  19. BRANCHING SEARCH AND MUTATION KILLING • Explore model in branches ? ? ? ? ! ! ? ? ! ! ? ! 2 Andreas Fellner

  20. BRANCHING SEARCH AND MUTATION KILLING • Explore model in branches ? ? ? ? ! ? ! ? ? ! ! ? ? ! ! 2 Andreas Fellner

  21. BRANCHING SEARCH AND MUTATION KILLING • Explore model in branches • Each branch is explored in parallel ? ? ? ? ! ? ! ? ? ! ! ? ? ! ! 2 Andreas Fellner

  22. BRANCHING SEARCH AND MUTATION KILLING • Explore model in branches • Each branch is explored in parallel ? ? ? • Explore mutated models in parallel ? ! ? ! ? ? ! ! ? ? ! ! 2 Andreas Fellner

  23. BRANCHING SEARCH AND MUTATION KILLING • Explore model in branches • Each branch is explored in parallel ? ? ? • Explore mutated models in parallel ? ! ? ! ? ? ! ! ? ? ? ! ! ! 2 Andreas Fellner

  24. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! ? ! ? ? ! ! ? ? ? ! ! ! 2 Andreas Fellner

  25. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! • Only explore relevant parts ? ! ? ? ! ! ? ? ? ! ! ! 2 Andreas Fellner

  26. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! • Only explore relevant parts ? ! ? ? • Set of heuristics guiding branching search ! ! ? ? ? ! ! ! 2 Andreas Fellner

  27. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! • Only explore relevant parts ? ! ? ? • Set of heuristics guiding branching search ! • Where to start new branches • ! How to expand branches ? ? ? ! ! ! 2 Andreas Fellner

  28. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! • Only explore relevant parts ? ! ? ? • Set of heuristics guiding branching search ! • Where to start new branches • ! How to expand branches ? ? • ? Construct test cases from exploration graph ! ! ! 2 Andreas Fellner

  29. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! • Only explore relevant parts ? ! ? ? • Set of heuristics guiding branching search ! • Where to start new branches • ! How to expand branches ? ? • ? Construct test cases from exploration graph • Prune irrelevant exploration steps ! ! ! 2 Andreas Fellner

  30. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! • Only explore relevant parts ? ! ? • Set of heuristics guiding branching search • Where to start new branches • ! How to expand branches ? ? • ? Construct test cases from exploration graph • Prune irrelevant exploration steps ! ! ! 2 Andreas Fellner

  31. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! • Only explore relevant parts ! ? • Set of heuristics guiding branching search • Where to start new branches • ! How to expand branches ? • ? Construct test cases from exploration graph • Prune irrelevant exploration steps ! ! 2 Andreas Fellner

  32. BRANCHING SEARCH AND MUTATION KILLING ? • Explore model in branches ? • Each branch is explored in parallel ? ? ? ? • Explore mutated models in parallel ! ? ! • Only explore relevant parts ! ? • Set of heuristics guiding branching search • Where to start new branches • ! How to expand branches ? • ? Construct test cases from exploration graph • Prune irrelevant exploration steps ! • ! Map test cases to mutant kills 2 Andreas Fellner

  33. SUMMARY • Model based testing • Test high level behavior based on abstract description of the system • Mutation testing • Connect tests to faults • Prune irrelevant test steps • Demanding models from industrial context, thus emphasis on scalability • Branching Search • Fully leverage parallelism • Flexibility through set of heuristics • Shorter and more effective tests Andreas Fellner Andreas Fellner 3

  34. FUTURE WORK • Distance metric based on mutant constraints • Designated strong killing algorithm • Semi symbolic methods • Dynamic symbolic execution • Unfoldings, Partial Orders & Petri Nets • Static analysis • Better estimation of state space • Eliminate equivalent mutants Andreas Fellner Andreas Fellner 4

Recommend


More recommend