Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
2019-chicago-jug-mutation-testing.pdf
Search
Jeanne Boyarsky
November 03, 2019
Programming
0
50
2019-chicago-jug-mutation-testing.pdf
Jeanne Boyarsky
November 03, 2019
Tweet
Share
More Decks by Jeanne Boyarsky
See All by Jeanne Boyarsky
2025-java-does-what-now.pdf
boyarsky
0
70
Beyond JUnit 5
boyarsky
0
26
Java 21 Certification (or learning new features)
boyarsky
0
56
Preparing for the Java 21 cert + Learning New Features
boyarsky
0
180
Mastering Logging in Java
boyarsky
0
130
2025 FRC Changes and Awards - NYC FIRST
boyarsky
0
76
Managing Your Time for Work, Learning, and Fun
boyarsky
0
120
Preparing for the Java 21 Certification and Learning New Features
boyarsky
0
270
2024-java21.pdf
boyarsky
0
99
Other Decks in Programming
See All in Programming
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
170
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
170
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1k
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.7k
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
6.7k
Go言語はstack overflowの夢を見るか?
logica0419
0
370
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
400
チームの境界をブチ抜いていけ
tokai235
0
180
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
500
私はどうやって技術力を上げたのか
yusukebe
44
19k
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
550
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Mobile First: as difficult as doing things right
swwweet
225
10k
Scaling GitHub
holman
463
140k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
600
Become a Pro
speakerdeck
PRO
29
5.6k
Writing Fast Ruby
sferik
629
62k
For a Future-Friendly Web
brad_frost
180
10k
Designing for humans not robots
tammielis
254
26k
BBQ
matthewcrist
89
9.8k
Transcript
@jeanneboyarsky 1 Intro to Mutation Testing Jeanne Boyarsky Monday, November
4, 2019 Chicago Java User Group speakerdeck.com/boyarsky
@jeanneboyarsky Shout out to the selection process! 2
@jeanneboyarsky Pause for a Commercial 3
@jeanneboyarsky Why write tests? 4 It used to work!
@jeanneboyarsky How know if tests are good? 5
@jeanneboyarsky If test coverage low 6 Write more tests! Not
ready for mutation testing of class
@jeanneboyarsky If test coverage high 7 All done! Perfect code!
@jeanneboyarsky Or is it? 8 Why is it saying nobody
is registered?
@jeanneboyarsky Code Review! 9
@jeanneboyarsky That’s a mutant! 10
@jeanneboyarsky Too many mutants! 11 They’re everywhere!
@jeanneboyarsky PIT to the rescue! 12
@jeanneboyarsky What is PIT? • Originally Parallel Isolated Test •
Now just PIT 13
@jeanneboyarsky Easy to run 14
@jeanneboyarsky Easy to run 15
@jeanneboyarsky The console flies by 16
@jeanneboyarsky We caught 5 mutants 17
@jeanneboyarsky More detail 18
@jeanneboyarsky The mutants live…. 19
@jeanneboyarsky Level up 20
@jeanneboyarsky Now 32 survived 21
@jeanneboyarsky PIT 22 Mutant Generation Bytecode (ASM) Test Selection Coverage
Mutant Insertion Instrumentation Mutant Detection Early Exit (fine)
@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
@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
@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
@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
@jeanneboyarsky JUnit 5 Support • PitClipse assigned to next version
on Oct 5 27
@jeanneboyarsky JUnit 5 Support • No date for IntelliJ 28
@jeanneboyarsky JUnit 5 Support • Supported by • Maven •
Gradle • However…. I find IDE integration to be critical 29
@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
@jeanneboyarsky For More • Code Kata: https://github.com/vmzakharov/mutate- test-kata 31
@jeanneboyarsky Demo 32