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
Bárbara Rossalli
August 25, 2021
Programming
1
54
Como garantir que o teste unitário que estou escrevendo realmente possui qualidade?
Bárbara Rossalli
August 25, 2021
Tweet
Share
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
23
O que Cloud Native realmente significa? Um olhar sobre Cloud Native por outros ângulos
barbararossallizup
0
70
Agile Testing: Evoluindo seus testes e entregando valor rápido com arquitetura evolutiva
barbararossallizup
1
97
ARQUITETURA EVOLUTIVA: escalando seu negócio e empoderando seu deploy, sem trazer complexidade para sua arquitetura
barbararossallizup
0
53
Survival Guide for the Java Architect in the Cloud Era
barbararossallizup
1
210
Como otimizar sua service mesh para fazer um rollout inteligente
barbararossallizup
0
57
Other Decks in Programming
See All in Programming
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
710
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
220
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
180
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
620
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
Rethinking API Platform Filters
vinceamstoutz
0
1.6k
Nostalgia Meets Technology: Super Mario with TypeScript
manfredsteyer
PRO
0
110
安いハードウェアでVulkan
fadis
1
830
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
200
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.1k
How to stabilize UI tests using XCTest
akkeylab
0
140
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
100
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
240
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Typedesign – Prime Four
hannesfritz
42
3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
A Tale of Four Properties
chriscoyier
163
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How to train your dragon (web standard)
notwaldorf
97
6.6k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
330
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