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
Rafael Machado
November 09, 2019
Programming
2
110
Have you ever tested your tests?
Rafael Machado
November 09, 2019
Tweet
Share
More Decks by Rafael Machado
See All by Rafael Machado
Evolução da arquitetura do Magalu e os desafios da modularização
rakaramos
0
74
Contratos fortes com programação funcional
rakaramos
1
27
Other Decks in Programming
See All in Programming
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
Basic Architectures
denyspoltorak
0
680
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
110
今から始めるClaude Code超入門
448jp
8
9k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
Featured
See All Featured
Fireside Chat
paigeccino
41
3.8k
4 Signs Your Business is Dying
shpigford
187
22k
How to Talk to Developers About Accessibility
jct
2
130
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
WENDY [Excerpt]
tessaabrams
9
36k
RailsConf 2023
tenderlove
30
1.3k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Six Lessons from altMBA
skipperchong
29
4.2k
Google's AI Overviews - The New Search
badams
0
910
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
56
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