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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ayrton Araújo
September 04, 2014
Programming
0
80
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
75
Ser ou não ser autônomo? Não era para ser uma questão
ayr_ton
0
300
Other Decks in Programming
See All in Programming
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.1k
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.7k
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
230
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
520
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
5
990
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
830
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
940
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
120
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
330
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
110
Featured
See All Featured
Building an army of robots
kneath
306
46k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Navigating Team Friction
lara
192
16k
Agile that works and the tools we love
rasmusluckow
331
21k
Raft: Consensus for Rubyists
vanstee
141
7.4k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
320
sira's awesome portfolio website redesign presentation
elsirapls
0
190
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
150
Making the Leap to Tech Lead
cromwellryan
135
9.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
150
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