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
73
Contratos fortes com programação funcional
rakaramos
1
24
Other Decks in Programming
See All in Programming
Software Architecture
hschwentner
6
2.4k
NIKKEI Tech Talk#38
cipepser
0
350
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
650
AIのバカさ加減に怒る前にやっておくこと
blueeventhorizon
0
130
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
500
Swift Concurrency 年表クイズ
omochi
3
210
ビルドプロセスをデバッグしよう!
yt8492
0
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
640
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
850
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
110
オープンソースソフトウェアへの解像度🔬
utam0k
18
3.2k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
161
23k
Product Roadmaps are Hard
iamctodd
PRO
55
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
Automating Front-end Workflow
addyosmani
1371
200k
Thoughts on Productivity
jonyablonski
72
4.9k
Fireside Chat
paigeccino
41
3.7k
Building Adaptive Systems
keathley
44
2.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
940
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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