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
Have you ever tested your tests?
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Rafael Machado
November 09, 2019
Programming
120
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Have you ever tested your tests?
Rafael Machado
November 09, 2019
More Decks by Rafael Machado
See All by Rafael Machado
Evolução da arquitetura do Magalu e os desafios da modularização
rakaramos
0
80
Contratos fortes com programação funcional
rakaramos
1
29
Other Decks in Programming
See All in Programming
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
220
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
570
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
880
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
710
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.6k
Oxcを導入して開発体験が向上した話
yug1224
4
310
スマートグラスで並列バイブコーディング
hyshu
0
120
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
270
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
How to train your dragon (web standard)
notwaldorf
97
6.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
290
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
730
Mobile First: as difficult as doing things right
swwweet
225
10k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
How to Talk to Developers About Accessibility
jct
2
230
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
We Have a Design System, Now What?
morganepeng
55
8.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Transcript
HAVE YOU EVER TESTED YOUR TESTS?
Henrique Morbin iOS @ Consumer
Rafael Machado iOS @ Driver
AGENDA 1. SOFTWARE QUALITY & METRICS 2. CODE COVERAGE 3.
MUTATION TESTING 4.MUTER: AUTOMATED MUTATION TESTING FOR SWIFT
SOFTWARE QUALITY & METRICS
CODE COVERAGE
None
class Tests: XCTestCase { func test_view() { let sut =
ViewController(presenter: .dummy) XCTAssertNotNil(sut.view) } }
55% VALIDATION
COVERAGE ISN’T EVERYTHING
?
MUTATION TESTING
HOW DOES IT WORK?
None
None
None
MUTATION SCORE = Mutants killed Total of mutants
MUTATION OPERATORS
None
C# JAVASCRIPT JAVA PYTHON SWIFT C/C++ OBJECTIVE-C
Muter Automated mutation testing for Swift
DISCOVERY TESTS REPORT
None
$ muter init
!// muter.conf.json { "executable": “/usr/bin/xcodebuild", "arguments": [ "-project", "ExampleApp.xcodeproj", "-scheme",
"ExampleApp", "-sdk", "iphonesimulator", "-destination", "platform=iOS Simulator,name=iPhone 8", "test" ], "exclude": ["AppDelegate.swift"] }
$ muter
$ muter —output-xcode
None
$ muter —files-to-mutate "/Sources/**/*.swift"
$ muter —files-to-mutate \ $(echo \"$(git diff "--name-only HEAD HEAD~1
| tr '\n' ‘,')\")
RECAP COVERAGE ISN’T EVERYTHING PAPERS HIGH COST MUTATION SCORE FEW
OPERATORS ARE ENOUGH
THANK YOU
#VemProiFood