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
Gherkin
Search
Ayrton Araújo
September 04, 2014
Programming
0
79
Gherkin
Checando qualidade de requisitos
Ayrton Araújo
September 04, 2014
Tweet
Share
More Decks by Ayrton Araújo
See All by Ayrton Araújo
Pull Requests e Isolamento Contínuo
ayr_ton
0
74
Ser ou não ser autônomo? Não era para ser uma questão
ayr_ton
0
290
Other Decks in Programming
See All in Programming
ThorVG Viewer In VS Code
nors
0
770
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
190
Package Management Learnings from Homebrew
mikemcquaid
0
210
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
CSC307 Lecture 05
javiergs
PRO
0
500
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
190
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
200
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
CSC307 Lecture 06
javiergs
PRO
0
680
AI巻き込み型コードレビューのススメ
nealle
1
160
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
The untapped power of vector embeddings
frankvandijk
1
1.6k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
63
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
700
Navigating Team Friction
lara
192
16k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
For a Future-Friendly Web
brad_frost
182
10k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Transcript
Gherkin: Checando qualidade de requisitos FPF Tech http://ayr-ton.net/@
G+: http://ayr-ton.net/+ Twitter: http://ayr-ton.net/@ E-mail:
[email protected]
ayr-ton at irc.freenode.net #cucumber
ayr-ton at GitHub CSM, CSD, CSPO, LPIC-2 Dev at FPF Tech Ubuntu Brazilian Community Council. $whoami
TDD e o BDD Desmistificando
I know that feel bro
The Cucumber Book Aslak Hellesøy
Tea-Driven Development Matt Wynne
“Já fez o TDD?” Referindo-se a testes de unidade
“Qual o sentido de testar o que ainda não foi
desenvolvido?” Sobre escrever os testes primeiro
“Você só pode usar BDD para testes de tela” Sobre
o BDD
“TDD ou BDD? Qual é o melhor?” Referindo-se a testes
automatizados
Escrever um teste falho Fazer o teste passar Refatorar
Escrever um teste falho Fazer o teste passar Refatorar
Escrever um teste falho Fazer o teste passar Refatorar
Escrever um teste falho Fazer o teste passar Refatorar
Escrever um novo teste falho Fazer o teste passar Refatorar
Defina “testes” Por que temos que falhar os “testes”?
Testes de unidade Outros tipos de testes automatizados?
Defina “comportamento” Dan North: “cenários”, “exemplos”
Defina “passos” Agora sim, automação.
BDD TDD, agora vai!
Trabalhar de fora para dentro Iniciando a partir de uma
meta de negócios
Use exemplos Para clarear requisitos
Desenvolver numa linguagem obíqua Para garantir compreensão global
Gherkin
Sintax line- oriented Python/YAML like
Feature: Serve coffee Coffee should not be served until paid
for Coffee should not be served until the button has been pressed If there is no coffee left then money should be refunded
# language: pt Funcionalidade: Adição Para evitar erros bobos Como
um péssimo matemático Eu quero saber como somar dois números
Given-When-Then Passos
Scenario: Buy last coffee Given there are 1 coffees left
in the machine And I have deposited 1$ When I press the coffee button Then I should be served a coffee
Cenário: Adicionar dois números Dado que eu digitei 50 na
calculadora E que eu digitei 70 na calculadora Quando eu aperto o botão de soma Então o resultado na calculadora deve ser 120
feature coffe.feature test steps unit coffeTest.mylang integration $ ls
feature coffe.feature test steps unit coffeTest.mylang integration $ ls
feature coffe.feature spec steps unit coffeSpec.mylang integration $ ls
Refatore!
G+: http://ayr-ton.net/+ Twitter: http://ayr-ton.net/@ E-mail:
[email protected]
ayr-ton at irc.freenode.net #cucumber
ayr-ton at GitHub CSM, CSD, CSPO, LPIC-2 Perguntas? $whoami