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
Agile Brazil 2016 - 5 fundamentos essenciais de...
Search
Stefan Teixeira
November 07, 2016
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
Transcript
53 slides
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!
More Decks by Stefan Teixeira
See All by Stefan Teixeira
Scrum Gathering Portugal 2016 - Containerizing Tests with Docker
stefanteixeira
0
95
Latinoware 2016 - Continuous Delivery com ferramentas open source
stefanteixeira
0
82
Ágiles 2016 - Using open source tools to support Continuous Delivery
stefanteixeira
0
69
6º Encontro do Grupo de Testes Carioca - Testes em um contexto de Continuous Delivery
stefanteixeira
0
56
TDC 2016 SP - Desmistificando cobertura de código como métrica de qualidade
stefanteixeira
0
150
TDC 2016 SP - Continuous Delivery para aplicações Java com ferramentas open-source
stefanteixeira
0
100
TDC 2016 SP - Cobertura de código de procedures T-SQL com SQLCC
stefanteixeira
0
88
TDC 2016 SP - 5 libs de teste JavaScript que você deveria conhecer
stefanteixeira
0
82
Scrum Gathering Rio 2016 - Conteinerizando Testes com Docker Compose
stefanteixeira
0
81
Other Decks in Programming
See All in Programming
protojson における文字化けの扱い
kazuki1023
0
460
AppFunctionsの内部実装を紐解く
hiroaki404
0
120
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
130
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
270
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1.1k
Ruby から Emacs を操作したい
phigasui
0
390
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
420
Debian JP Projectのサーバー構成
uwabami
1
180
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
200
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
180
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
210
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
480
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
650
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
540
So, you think you're a good person
axbom
PRO
2
2.3k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Technical Leadership for Architectural Decision Making
baasie
4
660
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
2
150
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Building Applications with DynamoDB
mza
96
7.3k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k