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
100
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
68
Contratos fortes com programação funcional
rakaramos
1
23
Other Decks in Programming
See All in Programming
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
400
Ruby on cygwin 2025-02
fd0
0
140
WebDriver BiDiとは何なのか
yotahada3
1
140
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
240
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
230
Immutable ActiveRecord
megane42
0
130
Spring gRPC について / About Spring gRPC
mackey0225
0
220
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
550
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
100
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
730
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
210
Featured
See All Featured
Become a Pro
speakerdeck
PRO
26
5.1k
Being A Developer After 40
akosma
89
590k
BBQ
matthewcrist
86
9.5k
The Cult of Friendly URLs
andyhume
78
6.2k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
The Language of Interfaces
destraynor
156
24k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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