$30 off During Our Annual Pro Sale. View Details »
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
73
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
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
140
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
250
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
410
クラウドに依存しないS3を使った開発術
simesaba80
0
150
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
350
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
5
700
AIコーディングエージェント(NotebookLM)
kondai24
0
220
認証・認可の基本を学ぼう前編
kouyuume
0
270
Deno Tunnel を使ってみた話
kamekyame
0
230
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
2
560
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
120
Featured
See All Featured
A Soul's Torment
seathinner
1
2k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
100
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Being A Developer After 40
akosma
91
590k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
400
WENDY [Excerpt]
tessaabrams
8
35k
Accessibility Awareness
sabderemane
0
24
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Odyssey Design
rkendrick25
PRO
0
430
Darren the Foodie - Storyboard
khoart
PRO
0
1.9k
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