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
50
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
18
O que Cloud Native realmente significa? Um olhar sobre Cloud Native por outros ângulos
barbararossallizup
0
62
Agile Testing: Evoluindo seus testes e entregando valor rápido com arquitetura evolutiva
barbararossallizup
1
80
ARQUITETURA EVOLUTIVA: escalando seu negócio e empoderando seu deploy, sem trazer complexidade para sua arquitetura
barbararossallizup
0
48
Survival Guide for the Java Architect in the Cloud Era
barbararossallizup
1
190
Como otimizar sua service mesh para fazer um rollout inteligente
barbararossallizup
0
48
Other Decks in Programming
See All in Programming
為你自己學 Python - 冷知識篇
eddie
1
340
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
200
tool ディレクティブを導入してみた感想
sgash708
1
160
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
19
4.6k
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
550
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
180
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
18
9.7k
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
580
個人軟體時代
ethanhuang13
0
300
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
ソフトウェアテスト徹底指南書の紹介
goyoki
1
140
AIレビュアーをスケールさせるには / Scaling AI Reviewers
technuma
2
240
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
185
54k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
We Have a Design System, Now What?
morganepeng
53
7.8k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
RailsConf 2023
tenderlove
30
1.2k
How to train your dragon (web standard)
notwaldorf
96
6.2k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Automating Front-end Workflow
addyosmani
1370
200k
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