Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
76
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
Transcript
22 slides
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
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
43
O que Cloud Native realmente significa? Um olhar sobre Cloud Native por outros ângulos
barbararossallizup
0
110
Agile Testing: Evoluindo seus testes e entregando valor rápido com arquitetura evolutiva
barbararossallizup
1
120
ARQUITETURA EVOLUTIVA: escalando seu negócio e empoderando seu deploy, sem trazer complexidade para sua arquitetura
barbararossallizup
0
73
Survival Guide for the Java Architect in the Cloud Era
barbararossallizup
1
230
Como otimizar sua service mesh para fazer um rollout inteligente
barbararossallizup
0
89
Other Decks in Programming
See All in Programming
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
230
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
430
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
500
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
Lean で手続き的プログラム の証明が書けるようになった
inoueasei
8
2.7k
小さなアプリを作って公開するまで
onozaty
0
250
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.6k
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
1
260
Apache Airflow Introduction
leew
1
100
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
210
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
Statistics for Hackers
jakevdp
799
230k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
630
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.2k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
580
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
990
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
560
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Speed Design
sergeychernyshev
33
2.3k