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
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Gherkin
Search
Ayrton Araújo
September 04, 2014
Programming
82
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Gherkin
Checando qualidade de requisitos
Ayrton Araújo
September 04, 2014
More Decks by Ayrton Araújo
See All by Ayrton Araújo
Pull Requests e Isolamento Contínuo
ayr_ton
0
79
Ser ou não ser autônomo? Não era para ser uma questão
ayr_ton
0
310
Other Decks in Programming
See All in Programming
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
460
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
200
XHTMLが残したもの
yosuke_furukawa
PRO
2
470
What We Talk About When We Talk About XP
m_seki
2
430
アクセシビリティから考える情報設計
high_g_engineer
0
330
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
230
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
110
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.6k
スマート反転とウェブアクセシビリティ
camiha
0
170
Foundry Localでエージェント開発
seosoft
0
150
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
290
型解析で実現する Go の言語内 DSL / Conference に Go! タイムテーブルの歩き方 for Gophers
mazrean
0
130
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
820
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
510
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
We Are The Robots
honzajavorek
0
350
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
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