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
95
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
66
Contratos fortes com programação funcional
rakaramos
1
21
Other Decks in Programming
See All in Programming
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
260
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
340
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
1k
React への依存を最小にするフロントエンド設計
takonda
12
3.2k
Contemporary Test Cases
maaretp
0
140
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.3k
C++でシェーダを書く
fadis
6
4.1k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Making Projects Easy
brettharned
115
5.9k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Facilitating Awesome Meetings
lara
50
6.1k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
What's in a price? How to price your products and services
michaelherold
243
12k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Site-Speed That Sticks
csswizardry
0
33
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
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