1 / 13

MOGENTES 3 rd and Final Review Reporting Period January 2010 – March 2011 Cologne, 26 May 2011

MOGENTES 3 rd and Final Review Reporting Period January 2010 – March 2011 Cologne, 26 May 2011. Scientific Results - UML Mutations R. Schlick, AIT. model. Model-Based Mutation Testing. Requirements. fault models. mutated models. conformance. test case generator. conformance.

sally
Télécharger la présentation

MOGENTES 3 rd and Final Review Reporting Period January 2010 – March 2011 Cologne, 26 May 2011

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MOGENTES 3rd and Final Review Reporting Period January 2010 – March 2011 Cologne, 26 May 2011 Scientific Results - UML MutationsR. Schlick, AIT

  2. model Model-Based Mutation Testing Requirements fault models mutated models conformance test case generator conformance conformance • Mutants provide test efficiency measure: • Evaluate test sets • Generate test cases • Can emulate common coverage metrics SUT (black box) test case executor verdicts

  3. Black box test case generation from UML – Tool Chain Motivation: • Requirements coverage • Test oracle needed • No access to source

  4. Mutation Operators • Init values, constants, OCL literals, AGSL literals: • Constant Value Variation Step / Factor • Enum Value Exchange • Set Constant Value to Zero/Max • States: • Remove State Entry/Exit Action • Exchange State Entry/Exit Action Method • Transitions: • Remove Transition • Exchange Transition Source/Target • Exchange Transition Trigger • Triggers • Exchange Trigger Signal • Minimally Change Time Trigger Duration • Substantially Change Time Trigger Duration • Minimize/Maximize Time Trigger Durartion • Modify Change Trigger Expression  • Exchange Call Trigger Method • Guards: • Fix Guard Value • Invert Guard • Modify Guard Expression • Effect: • Remove Effect • Exchange Effect Method • Modify Effect Body • OCL: • Fix Expression • Negate Expression • Fix Subexpression • Negate Subexpression • Modify Boolean Operator • Modify Relational Operator • Modify Arithmetic Operator • Modify Set Operator • Modify Quantifier • AGSL: • Remove Statement • Reorder Statement • Fix Parameter/Property • Modify Parameter/Property • Modify Operator • Fix Operand • Modify Operand • Fix Result

  5. „All mutants are equal(ly important)“ • Lots of possible mutants • Checking test cases against mutants takes effort • Generating is more expensive than checking • Equivalent Mutants Can we: • leave out mutation operators or mutants ? • sort mutants/operators to reduce generation effort?

  6. Example: Car Alarm System (Ford) • 11 states • 17 transitions • Used Elements • Time trigger • Change trigger • OCL guards (minimal) • Activities (atomic or two lines, AGSL) • Nested states • Orthogonal regions

  7. Mutants and test cases • 15 applicable mutation operators, • 20 locations • 111 mutants • 152 generated test cases (minimal search depth)

  8. Coverage overview Test cases Mutants

  9. Observations: • Strongest generated test case covers 75% of mutants, weakest only 1 mutant • Weakest test case is needed! (short, quiescence) • Longest 4 test cases from minimal set from the 8 mutants cover 96% • Test cases for „guard false“ mutation operator cover over 90 % • 1 mutant is found by manual tests but not by guard false mutation-operator • All mutants from minimal set are located at transitions • Test cases from fine grained changes cover coarser changes

  10. Conclusions • Go for difficult ones first (evidence by ETH) • e.g. pre-sort mutants by expected test case depth • Leave out coarser mutants if a more fine grained one is available • Even mutants with small „impact“ might be needed From comparison with classic aproach: • Test cases with state/transition coverage are usually weaker, because they do not necessarily make an error observable (parts presented at FMCO 2010, journal paper planned with further empirical data)

  11. Activity show values can not be mutated (e.g. dropped) for signal error fixed anymore Caveats – Black box testing (1)

  12. Implementation might get stuck in display state Error, while output state goes back to Move. Caveats – Black box testing (2)

  13. Modeling for black box mutation testing Rules for requirements e.g. Negative statements and compound statements are prohibited. Rules for building requirements models e.g. Do not combine identical conditions from requirements into one model element Automatically “de-factor” models before mutating (risk of spurious requirement – mutation traces)

More Related