35
Gherkin: Checando qualidade de requisitos FPF Tech http://ayr-ton.net/@

Gherkin

Embed Size (px)

DESCRIPTION

Checando qualidade de requisitos

Citation preview

Page 1: Gherkin

Gherkin:Checando qualidade de requisitos

FPF Techhttp://ayr-ton.net/@

Page 2: Gherkin

G+: http://ayr-ton.net/+Twitter: http://ayr-ton.net/@E-mail: [email protected] at irc.freenode.net#cucumberayr-ton at GitHub

CSM, CSD, CSPO, LPIC-2

Dev at FPF TechUbuntu Brazilian Community Council.

$whoami

Page 3: Gherkin

TDD e o BDDDesmistificando

Page 4: Gherkin

I know that feel bro

Page 5: Gherkin

The Cucumber Book

Aslak Hellesøy

Page 6: Gherkin

Tea-Driven Development

Matt Wynne

Page 7: Gherkin

“Já fez o TDD?”Referindo-se a testes de unidade

Page 8: Gherkin

“Qual o sentido de testar o que

ainda não foi desenvolvido?”

Sobre escrever os testes primeiro

Page 9: Gherkin

“Você só pode usar BDD para testes de tela”

Sobre o BDD

Page 10: Gherkin

“TDD ou BDD? Qual é o melhor?”

Referindo-se a testes automatizados

Page 11: Gherkin

Escrever um teste falho

Fazer o teste passar

Refatorar

Page 12: Gherkin

Escrever um teste falho

Fazer o teste passar

Refatorar

Page 13: Gherkin

Escrever um teste falho

Fazer o teste passar

Refatorar

Page 14: Gherkin

Escrever um teste falho

Fazer o teste passar

Refatorar

Page 15: Gherkin

Escrever um novo teste falho

Fazer o teste passar

Refatorar

Page 16: Gherkin

Defina “testes”Por que temos que falhar os

“testes”?

Page 17: Gherkin

Testes de unidadeOutros tipos de testes

automatizados?

Page 18: Gherkin

Defina “comportamento”

Dan North: “cenários”, “exemplos”

Page 19: Gherkin

Defina “passos”Agora sim, automação.

Page 20: Gherkin

BDDTDD, agora vai!

Page 21: Gherkin

Trabalhar de fora para dentro

Iniciando a partir de uma meta de negócios

Page 22: Gherkin

Use exemplosPara clarear requisitos

Page 23: Gherkin

Desenvolver numa linguagem obíqua

Para garantir compreensão global

Page 24: Gherkin

Gherkin

Page 25: Gherkin

Sintax line-oriented

Python/YAML like

Page 26: Gherkin

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

Page 27: Gherkin

# language: ptFuncionalidade: Adição Para evitar erros bobos Como um péssimo matemático Eu quero saber como somar dois números

Page 28: Gherkin

Given-When-ThenPassos

Page 29: Gherkin

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

Page 30: Gherkin

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

Page 31: Gherkin

feature coffe.featuretest steps unit coffeTest.mylang integration

$ ls

Page 32: Gherkin

feature coffe.featuretest steps unit coffeTest.mylang integration

$ ls

Page 33: Gherkin

feature coffe.featurespec steps unit coffeSpec.mylang integration

$ ls

Page 34: Gherkin

Refatore!

Page 35: Gherkin

G+: http://ayr-ton.net/+Twitter: http://ayr-ton.net/@E-mail: [email protected] at irc.freenode.net#cucumberayr-ton at GitHub

CSM, CSD, CSPO, LPIC-2

Perguntas?$whoami