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
77
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
71
Ser ou não ser autônomo? Não era para ser uma questão
ayr_ton
0
280
Other Decks in Programming
See All in Programming
Understanding Kotlin Multiplatform
l2hyunwoo
0
160
Google I/O Extended Incheon 2025 ~ What's new in Android development tools
pluu
1
130
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
560
型で語るカタ
irof
1
810
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
4
1.4k
React は次の10年を生き残れるか:3つのトレンドから考える
oukayuka
40
15k
副作用と戦う PHP リファクタリング ─ ドメインイベントでビジネスロジックを解きほぐす
kajitack
3
450
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
2
210
QA x AIエコシステム段階構築作戦
osu
0
150
MCPで実現できる、Webサービス利用体験について
syumai
7
2k
構造化・自動化・ガードレール - Vibe Coding実践記 -
tonegawa07
0
150
iOS開発スターターキットの作り方
akidon0000
0
180
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
7
530
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
How to train your dragon (web standard)
notwaldorf
96
6.1k
The Pragmatic Product Professional
lauravandoore
35
6.8k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Docker and Python
trallard
45
3.5k
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