Largamos o cucumber

1,084 views
1,011 views

Published on

Apresentando uma LT com os fatos de porquê estamos deixando de usar Cucumber como sendo uma alternativa para testes de aceitação :)

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,084
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Largamos o cucumber

    1. 1. @victorhgLargamos o Cucumber http://www.flickr.com/photos/stuartpilbrow/3687751382/
    2. 2. Falando sobre cucumber!“BDD outside in” em 2011
    3. 3. Bom e velho cucumber  Accessing website with true credentials When I am on the login page And I fill in "email" with "bla@email.com" And I fill in "password" with "qwerty" And I click button "Login" Then I should see "Olá, bla@email.com" smell gerado pelo web_steps.rb
    4. 4. TextNão é esse o ponto!!
    5. 5. +1 Camada de abstração Mais código para manter Clientes Duplicando código em linguagem natural esperam LER a especificaçãoClientes não querem escrever testes!
    6. 6. Alcançando Valor com CucumberAcessing website with truecredentials: When I am on the login page And I use my credentials Then I should see a welcome message
    7. 7. Manutenção continuou um saco! Duplicando rspecs & cucumber steps Refactoring não é perfeitoCada vez menos testes de aceitação com cucumber source
    8. 8. Mantendo “Valor”User accessing website In order to easy accessing process, As a user I can use my facebook account to connect When a visitant doesnt have a website account Accessing the registration process with facebook Should automatically fill in his personal data Should not present the password information
    9. 9. rspec + capybara
    10. 10. specs/acceptance/ facebook_integration.rbdescribe "User acessing website", """ In order to easy accessing process As a user I can use a facebook account to connect with website""" do     context "When a user doesnt have a go2doc account" do     context "Acessing registration process with facebook" do        before do        end        it "Should automatically fill in personal data" do          (CODIGO RSPEC)        end        it "Should not present password information" do          (CODIGO RSPEC)        end      end    end https://gist.github.com/2992243end
    11. 11. Given(:stack) { stack_with(initial_contents) }  context "when empty" do    Given(:initial_contents) { [] }    Then { stack.depth.should == 0 }    context "when pushing" do      When { stack.push(:an_item) }      Then { stack.depth.should == 1 }      Then { stack.top.should == :an_item }    end  endhttps://github.com/jimweirich/rspec-given
    12. 12. feature "Articles", %q{ In order to have an awesome blog As an author I want to create and manage articles} do background do Article.create!(:title => One) end scenario "Article index" do visit /articles page.should have_content(One) endendhttps://github.com/cavalle/steak
    13. 13. No final, éapenas ruby!
    14. 14. Obrigado!@victorhgwww.Lambda3.com.br

    ×