2019-chicago-jug-mutation-testing.pdf

 2019-chicago-jug-mutation-testing.pdf

3906b007e5c4150115e319a01d2f4ab8?s=128

Jeanne Boyarsky

November 03, 2019
Tweet

Transcript

  1. 1.

    @jeanneboyarsky 1 Intro to Mutation Testing Jeanne Boyarsky Monday, November

    4, 2019 Chicago Java User Group speakerdeck.com/boyarsky
  2. 6.
  3. 22.

    @jeanneboyarsky PIT 22 Mutant Generation Bytecode (ASM) Test Selection Coverage

    Mutant Insertion Instrumentation Mutant Detection Early Exit (fine)
  4. 23.

    @jeanneboyarsky Mutant Generation Options 1. Bytecode • Faster • May

    not map to line of code • Java 8 stream support was immediate 2. Source Code • Slower • Clearer 23 Thank you to pitest.org for this material
  5. 24.

    @jeanneboyarsky Test Selection Options 1. Coverage • Fast - picks

    right test 2. Naive • Slow - brute force 3. Convention • Medium - uses naming conventions 24 Thank you to pitest.org for this material
  6. 25.

    @jeanneboyarsky Mutant Insertion Options 1. Instrumentation • Fast - picks

    right test 2. Classloader • Uses a lot of memory 3. Debugger Hotswap • Can be slower because debugger on 25 Thank you to pitest.org for this material
  7. 26.

    @jeanneboyarsky Mutant Detection Options 1. Early Exit (fine) • Stops

    when test finds a mutant 2. Early Exit (coarse) • Stops when class finds a mutant 3. Naive • Slow - brute force 26 Thank you to pitest.org for this material
  8. 29.

    @jeanneboyarsky JUnit 5 Support • Supported by • Maven •

    Gradle • However…. I find IDE integration to be critical 29
  9. 30.

    @jeanneboyarsky Tips • JUnit tests must pass • Watch console

    to see if still running • Reports on whole project • Fixing one may take care of more 30