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
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
AI時代の認知負荷との向き合い方
optfit
0
160
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
380
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
110
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
CSC307 Lecture 04
javiergs
PRO
0
660
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
720
Data-Centric Kaggle
isax1015
2
780
Package Management Learnings from Homebrew
mikemcquaid
0
230
Grafana:建立系統全知視角的捷徑
blueswen
0
330
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.4k
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
110
Prompt Engineering for Job Search
mfonobong
0
160
Un-Boring Meetings
codingconduct
0
200
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
120
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
97
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
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