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
Como garantir que o teste unitário que estou es...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Bárbara Rossalli
August 25, 2021
Programming
62
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Como garantir que o teste unitário que estou escrevendo realmente possui qualidade?
Bárbara Rossalli
August 25, 2021
More Decks by Bárbara Rossalli
See All by Bárbara Rossalli
Stackspot_-__Trilhas_-_TDC_-_Sala_StackSpot_Trilhas_-_TDC_-_Sala_StackSpot_100__10_Para_ativar_o_suporte_para_leitor_de_tela__pressione_Ctrl_Alt_Z_Para_saber_mais_sobre_atalhos_de_teclado__pressione_Ctrl_barra_________Criando_uma_API_Lambda_em_Python_.pdf
barbararossallizup
0
31
O que Cloud Native realmente significa? Um olhar sobre Cloud Native por outros ângulos
barbararossallizup
0
82
Agile Testing: Evoluindo seus testes e entregando valor rápido com arquitetura evolutiva
barbararossallizup
1
110
ARQUITETURA EVOLUTIVA: escalando seu negócio e empoderando seu deploy, sem trazer complexidade para sua arquitetura
barbararossallizup
0
60
Survival Guide for the Java Architect in the Cloud Era
barbararossallizup
1
220
Como otimizar sua service mesh para fazer um rollout inteligente
barbararossallizup
0
75
Other Decks in Programming
See All in Programming
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
930
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.3k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
230
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
180
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
210
OSもどきOS
arkw
0
590
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
180
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
740
The NotImplementedError Problem in Ruby
koic
1
920
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
7.9k
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
100
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
Designing Experiences People Love
moore
143
24k
Docker and Python
trallard
47
3.9k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Mind Mapping
helmedeiros
PRO
1
260
Automating Front-end Workflow
addyosmani
1370
210k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Transcript
Como garantir que o teste unitário que estou escrevendo realmente
possui qualidade? TDC TRANSFORMATION - Trilha Testes com Bárbara Rossalli & Daniela Yabe
Quem somos https://linktr.ee/Rossalli Bárbara Rossalli https://linktr.ee/DanielaYabe Daniela Yabe
Como garantir que o teste unitário que estou escrevendo realmente
possui qualidade?
Test Coverage
É uma métrica que valida o quanto do código foi
coberto pelos testes Quais linhas de código foram executadas ou seja
O problema do Coverage
A cobertura de código não valida a eficiência dos testes
Métrica de test coverage do meu projeto é 80%
None
None
None
Testes mutantes em ação!
Porque testes mutantes?
Mutantes são inseridos no código Testes executados em cima do
código mutado O que são testes mutantes? Se o teste falhar o mutante foi morto Se um mutante sobreviver, significa que você precisa melhorar seus testes unitários :)
Ferramentas
Versão 1.6.9 Release em 2014 Henry Coles Apache 2.0 Maven,
Gradle, Ant Java 8 ou + (1.4.0) Junit4 e Junit5* TestNG 6.1.1 JMock, EasyMock, Mockito, PowerMock and JMockit. Eclipse, IntelliJ PITest pitest.org
None
KILL ALL COVERAGE TESTS!
Teste mutantes não substitui a cobertura de código! É um
complemento!
Desvantagens: Poder Computacional & Tempo de Execução State of Mutation
Testing at Google: https://research.google/pubs/pub46584
Qualidade dos meus testes mutantes depende da qualidade dos casos
de testes escritos!
@Rossalli @YabeDaniela