Cucumber: 小黃瓜驗收測試工具

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites & 3 Groups

    Cucumber: 小黃瓜驗收測試工具 - Presentation Transcript

    1. Cucumber ihower@handlino.com
    2. about me • (a.k.a ihower) http://ihower.idv.tw/blog/ • http://handlino.com http://registrano.com
    3. Q: In order ... As a COSCUP 2009 attendee I want ...
    4. Q: In order ... [business value] As a COSCUP 2009 attendee [role] I want ... [feature]
    5. ? What’s your acceptance criteria?
    6. Scenario: COSCUP 2009 Given When ihower Then And
    7. “I believe that the hardest part of software projects, the most common source of project failure, is communication with the customers and users of that software. By providing a clear yet precise language to deal with domains, a DSL can help improve this communication.” Martin Fowler
    8. “ (DSL) ” Martin Fowler
    9. (DSL) ?
    10. Cucumber Ruby Feature
    11. Cucumber Feature Feature: { Scenario: Given < > And < > When < > And < > Then < > And < >
    12. Given Given /^ (.*)$/ do |fruit| #.... your test code assert_equal(fruit, ' ') end Ruby
    13. Given Given /^ (.*)$/ do |fruit| #.... your test code assert_equal(fruit, ' ') end Ruby
    14. Given Regexp match Given /^ (.*)$/ do |fruit| #.... your test code assert_equal(fruit, ' ') end Ruby
    15. Cucumber • Ruby and Rails • JRuby and Java • IronRuby and .NET • FunFX and Flex • Web apps in any lanuages, with: • Watir, Selenium, Mechanize, Webrat
    16. Cucumber огурец Russian concombre French Japanese Okurkový Czech Gurke German Cucumber English pepino Spanish !! Korean cetriolo Italian gurka Swedish agurk Danish castravete Romanian Arabic ‫ﺍﳋﻴﺎﺭ‬ ogórek Polish ketimun Indonesian Kurk Estonian Hebrew ‫מְלָפְפֹון‬ dưa chuột Vietnamese Cogombre Catalan uhorka Slovak CUCUMBR LOLCats gurķis Latvian Agurk Norwegian Agurkas Lithuanian 黄 !! Korean Salátauborka Hungarian gurka Swedish Kurkku Finnish castravete Romanian Краставица Bulgarian ogórek Polish Pepino Portuguese Kurk Estonian dưa chuột Vietnamese uhorka Slovak gurķis Latvian Agurkas Lithuanian Salátauborka Hungarian Kurkku Finnish Краставица Bulgarian Pepino Portuguese
    17. Feature :               :      3      2      divide      1.5
    18. Ruby code Given / (d+)/ do |n| @calc.push n.to_i end When / (w+)/ do |op| @result = @calc.send op end Then / (.*)/ do |result| @result.should == result.to_f end
    19. Web Integration Testing
    20. Feature: Scenario: Given I am on the "1934356085" book page When I press "Add to Cart" Then I should see "Programming Ruby 1.9"
    21. Ruby Code Given /^I am on (.+)$/ do |page_name| visit path_to(page_name) end When /^I press "([^"]*)"$/ do |button| click_button(button) end Then /^I should see "([^"]*)"$/ do |text| response.should contain(text) end
    22. Ruby Code Given /^I am on (.+)$/ do |page_name| visit path_to(page_name) end When /^I press "([^"]*)"$/ do |button| click_button(button) end Then /^I should see "([^"]*)"$/ do |text| response.should contain(text) end
    23. { 1: 2: Ruby Outside 3: (fail) 4. (pass) Inside { 4-1. 4-2 Unit Test (Fail) (Pass)
    24. thank you. http://cukes.info/

    + Wen-Tien ChangWen-Tien Chang, 3 months ago

    custom

    828 views, 3 favs, 2 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 828
      • 601 on SlideShare
      • 227 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 23
    Most viewed embeds
    • 224 views on http://ihower.idv.tw
    • 3 views on http://ihower.tw

    more

    All embeds
    • 224 views on http://ihower.idv.tw
    • 3 views on http://ihower.tw

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Groups / Events