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
65
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
33
O que Cloud Native realmente significa? Um olhar sobre Cloud Native por outros ângulos
barbararossallizup
0
85
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
64
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
77
Other Decks in Programming
See All in Programming
霧の中の代数的エフェクト
funnyycat
1
400
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
360
5分で問診!Composer セキュリティ健康診断
codmoninc
0
340
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
140
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
120
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
140
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
初めてのKubernetes 本番運用でハマった話
oku053
0
130
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
200
継続モナドとリアクティブプログラミング
yukikurage
3
610
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
330
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
Statistics for Hackers
jakevdp
799
230k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
870
The Cost Of JavaScript in 2023
addyosmani
55
10k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
420
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
200
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