Top Banner
TGV: theory, principles and algorithms David Reisenberger Basics TGV overview IOLTS Formal test purposes Principles and algorithms Synchronous product Extracting visible behaviour Test selection Controllability On-The-Fly synthesis The Tool Conclusion TGV: theory, principles and algorithms David Reisenberger May 31, 2012
26

TGV: theory, principles and algorithms · TGV: theory, principles and algorithms David Reisenberger Basics TGV overview IOLTS Formal test purposes Principles and algorithms Synchronous

Feb 15, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    TGV: theory, principles and algorithms

    David Reisenberger

    May 31, 2012

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    The paper

    Claude Jard, Thierry Jeron

    Published online 2004, Springer-Verlag

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    TGV

    Test generation with verification technology

    automatic synthesis of conformance test cases from aformal specification of a (non-deterministic) reactivesystem

    ”on-the-fly” synthesis

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Outline

    1 BasicsTGV overviewIOLTSFormal test purposes

    2 Principles and algorithmsSynchronous productExtracting visible behaviourTest selectionControllabilityOn-The-Fly synthesis

    3 The Tool

    4 Conclusion

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Definitions

    Test case: testing particular functionality

    Test suite: a set of tests

    Test: outputs are stimuli for IUT, inputs are observationsof IUT’s outputs

    Fail verdict: IUT is rejected

    Pass verdict: IUT is accepted

    Inconclusive verdict: correct behaviour is observed buttest purpose can’t be reached

    Soundness: test cases only reject non-conformant IUT’s

    Exhaustiveness: all non-conformant IUT’s are rejected

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Functional view

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    IOLTS

    M = (QM ,AM ,!M , qM0 )AM = AMI [ AMO [ IM

    a(i) 2 AM \ IM

    ⌧(i) 2 IM

    Fireable actions: �(q)

    Transitions:a�!

    Visible behaviour: )Input: ?a

    Output: !x

    det(M): M without internal actions

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    IOLTS cont.

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Quiescence

    Deadlock: �(q) = ;Output quiescence: �(q) ✓ AMILivelock

    deadlock(M) ✓ outputlock(M)quiescent(M) = livelock(M) [ outputlock(M)

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Suspension automaton �(S)

    TP SP

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    det(�(S)) = SVIS

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Test purpose

    TP = (QTP ,ATP ,!TP , qTP0 )AcceptTP : select target behaviour

    RefuseTP : cut down specification

    Allows e�cient test selection on-the-fly

    Smaller than specification but complete (...?)

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Test purpose cont.

    S SP

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Principles and algorithms

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Synchronous product

    Mark behaviours of S by Accept,Refuse

    Accepted behaviour of SP are accepted behaviours of S byTP

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    S ⇥ TP = SP

    S TP

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    SPVIS = det(�(SP))

    CTG

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Test selection

    Extracting test case by selection of accepted behaviours

    ACTGO ✓ AVISIACTGI = A

    VISO

    L2A: all states that lead to accept

    Pass: AcceptVIS

    Inconc: direct successors of states in L2A by output inSPVIS

    Fail: else

    Result: CTG (Complete Test Graph)

    TGVLoop, based on Tarjan’s algo (O(n), S(n))

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Test selection

    SPVIS TC

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Controllability

    Extract a controllable subgraph of CTG

    Get rid of choices between I/O (pruning)

    This can happen during TGVLoop (partially)

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    A test case

    CTG

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    On-The-Fly synthesis

    perform lazy construction of subgraphs of S , SP , SPVIS

    needed functions

    initfireablesuccComparison functionFunction to compute membership of Accept/Refuse

    goal: reduce size of graphs

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    The Tool

    Several software layersCommunicate through APIsEach one is simulation of IOLTS (allows graph traversal)Each level implements one of the algorithmsOutput: test cases in TTCN or graph formats (.aut, .bcg)Can be used to verify manually created test casesSunOS 5, Windows XP, Linux

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Architecture

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Timers

  • TGV: theory,principles andalgorithms

    DavidReisenberger

    BasicsTGV overviewIOLTSFormal testpurposes

    Principles andalgorithmsSynchronousproductExtractingvisible behaviourTest selectionControllabilityOn-The-Flysynthesis

    The Tool

    Conclusion

    Conclusion

    TGV can synthesize tests from industrial size specs

    Drawback: manual creation of test purpose

    Still better than manual test case creation

    Future: distributed tests, improvements of algorithms

    BasicsTGV overviewIOLTSFormal test purposes

    Principles and algorithmsSynchronous productExtracting visible behaviourTest selectionControllabilityOn-The-Fly synthesis

    The ToolConclusion