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
Agile Brazil 2016 - 5 fundamentos essenciais de...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Stefan Teixeira
November 07, 2016
Programming
0
110
Agile Brazil 2016 - 5 fundamentos essenciais de padrões xUnit
Palestra apresentada no Agile Brazil 2016, no dia 07/11.
Stefan Teixeira
November 07, 2016
Tweet
Share
More Decks by Stefan Teixeira
See All by Stefan Teixeira
Scrum Gathering Portugal 2016 - Containerizing Tests with Docker
stefanteixeira
0
83
Latinoware 2016 - Continuous Delivery com ferramentas open source
stefanteixeira
0
68
Ágiles 2016 - Using open source tools to support Continuous Delivery
stefanteixeira
0
57
6º Encontro do Grupo de Testes Carioca - Testes em um contexto de Continuous Delivery
stefanteixeira
0
48
TDC 2016 SP - Desmistificando cobertura de código como métrica de qualidade
stefanteixeira
0
130
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-source
stefanteixeira
0
86
TDC 2016 SP - Cobertura de código de procedures T-SQL com SQLCC
stefanteixeira
0
76
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
stefanteixeira
0
62
Scrum Gathering Rio 2016 - Conteinerizando Testes com Docker Compose
stefanteixeira
0
70
Other Decks in Programming
See All in Programming
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.2k
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
140
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
290
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
170
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
110
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
200
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
120
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
570
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
CSC307 Lecture 15
javiergs
PRO
0
240
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
250
Claude Code のすすめ
schroneko
67
220k
A designer walks into a library…
pauljervisheath
210
24k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
380
Designing for humans not robots
tammielis
254
26k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
470
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
70
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
First, design no harm
axbom
PRO
2
1.1k
How to Talk to Developers About Accessibility
jct
2
150
Everyday Curiosity
cassininazir
0
160
Transcript
5 fundamentos essenciais de padrões xUnit Stefan Teixeira @stefan_teixeira
[email protected]
• QA Automation Engineer @ Toptal • Co-organizador dos Meetups
DevOps Carioca e Grupo de Testes Carioca • Blogs: stefanteixeira.com.br (pt-br) / stefanteixeira.com (en) Contatos: • E-mail:
[email protected]
• Twitter: twitter.com/stefan_teixeira • LinkedIn: linkedin.com/in/stefanteixeira • GitHub: github.com/stefanteixeira • SlideShare: slideshare.net/stefanteixeira Sobre
Motivação
Testes Automatizados
Feedback rápido é essencial!
Testes facilitam refactoring
O que é xUnit?
None
http://xunitpatterns.com/
None
Alguns frameworks
Mas é só para unit tests? Não!
5 fundamentos essenciais
1. Conceitos básicos
Classes de teste
Métodos de teste
Four-phase Test
Assertions
Suites
2. Verificação de resultados
Delta assertion
None
Guard assertion
None
None
None
Custom assertions
None
None
3. Organização de testes
Suites
Helpers
Métodos utilitários
4. Manutenção de fixtures
Setup/Teardown • @BeforeClass
Setup/Teardown • @BeforeClass • @Before
Setup/Teardown • @BeforeClass • @Before • @After
Setup/Teardown • @BeforeClass • @Before • @After • @AfterClass
Shared fixtures
None
Shared fixtures • Tempo de execução mais rápido
Shared fixtures • Tempo de execução mais rápido • Cuidado
com estado entre testes!
Fresh fixtures
None
Fresh fixtures • Tempo de execução mais lento
Fresh fixtures • Tempo de execução mais lento • Evita
possíveis problemas de estado entre testes
5. Padrões para testes com bancos de dados
Testando Stored Procedures
Transaction rollback
Table truncation
Leituras recomendadas
None
Stefan Teixeira @stefan_teixeira
[email protected]
Obrigado!