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
Gherkin
Search
Ayrton Araújo
September 04, 2014
Programming
83
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
81
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
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
450
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
290
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
contenteditable と日本語入力に向き合う
colorful12
0
200
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
880
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
Domain-Driven Transformation
hschwentner
2
2.3k
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
A Soul's Torment
seathinner
8
3.8k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Making Projects Easy
brettharned
120
6.8k
Paper Plane
katiecoart
PRO
5
54k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
A Tale of Four Properties
chriscoyier
163
24k
Technical Leadership for Architectural Decision Making
baasie
3
600
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
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