cucumber-maochao

9e37e0609046d4f0465b27cc569cde59?s=47 Mao Chao
October 10, 2015

 cucumber-maochao

2015 rubyconf china maochao presentation

9e37e0609046d4f0465b27cc569cde59?s=128

Mao Chao

October 10, 2015
Tweet

Transcript

  1. R u b y C o n f C h

    i n a 2 0 1 5 ᯯᯯމ੝ଙѺ CUCUMBERӧᚆᦏ֦፥ྋBDD ྷ᩻
  2. ᛔ౯Օᕨ ྷ ᩻ ThoughtWorks Rubist CoCጱᇰᅾᆽঅᘏ ݸᒒ > ڹᒒ >

    Mobile
  3. Cucumber ᓌՕ

  4.   አ ᕍ ෈ ๜ ൈ ᬿ ᤈ ԅ

      አ R u b y ਫ ሿ s t e p   ᬩ ᤈ ଚ Ӭ ஑ ک Კ ᧏   ᖫ ٟ դ Ꮁ ֵ s t e p ᭗ ᬦ   ᬩ ᤈ ଚ ᥡ ੊ s t e p ᭗ ᬦ   ᯿ ॔  a  ྍ ፗ ک ق ᮱ ᭗ ᬦ
  5. Cucumber ሿᇫ

  6. ӨBDD୩ፘى

  7. ᨕྈ᩽۠ B D D C u c u m b

    e r
  8. ֵአଠာ

  9. ASLAKጱݺབ ࣁ B D D ڊ ሿ ጱ  ଙ

    ݸ ҅ ׁ ᆐ ํ ӧ ੝ ࢫ ᴚ ࣁ ֵ አ B D D ෸ ڊ ሿ ᳯ ᷌ ŏ ŏ B D D ׁ ᆐ ᕪ ଉ ᤩ Ո ᧏ ᥴ ౮ ܔ ᕍ ጱ ၥ ᦶ ҅ ౲ ᘏ ฎ Ӟ ӻ ݢ զ ᤩ ӥ ᫹ ጱ ૡ ٍ ŏ ŏ ੪ ࣁ ๋ ᬪ ҅ C u c u m b e r ૪ ᕪ ᤩ ӥ ᫹ ԧ ᩻ ᬦ    ӡ ེ ҅ ౯ உ ṛ ي ਙ ই ྌ ݑ ཻ ᬨ ҅ ݶ ෸ Ԟ ԅ ਙ ᤩ ଠ ာ ጱ ᧏ አ ᘒ ఽ ک ० ๕ ŏ ŏ ਙ ํ ෸ ׁ ᆐ ᤩ Კ ᧏ ጱ ୮ ౮ ԧ ᛔ ۖ ۸ ၥ ᦶ ૡ ٍ ҅ ᘒ ӧ ฎ ౯ ୮ ෸ ڠ ୌ ጱ ӳ ᥜ ̶  A s l a k H e l l e s ø y, C u c u m b e r ֢ ᘏ
  10. ᮎԍᳯ᷌๶ԧ አC u c u m b e r੪ ᚆBDDᐟۑಷ֛

    ԧҘ
  11. DAN NORTH BDD ORIGINATOR

  12. ଙጱᒫӞ࣋ᵪ

  13. ଙጱᒫӞ࣋ᵪ CustomerLookup - finds customer by id - fails for

    duplicate customers …… ෈ਁݒ۸
  14. ᭑ྍᄍᬰ TDD դᎱ ᤈԅ ᫫կ ᤈԅ BDD

  15. DANጱਧԎ B D D ฎ ᒫ ԫ դ ጱ ̵

    ኧ क़ ݊ ٖ ጱ ̵ च ԭ ೉ p u l l ጱ ̵ ग़ ො ڥ ፅ ፘ ى ᘏ ጱ s t a k e h o l d e r ̵ ग़ ᐿ ݢ ಘ ઀ ጱ ̵ ṛ ᛔ ۖ ۸ ጱ භ ഠ ො ဩ ̶ ਙ ൈ ᬿ ԧ Ӟ ӻ Ի ԰ ஗ ሾ ҅ ݢ զ ٍ ํ ଃ ํ ᜉ অ ਧ Ԏ ጱ ᬌ ڊ ҁ ܨ ૡ ֢ Ӿ Ի ՞ ጱ ᕮ ຎ ҂ ғ ૪ ၥ ᦶ ᬦ ጱ ᫫ կ ̶ D a n N o r t h , B D D ݎ ก Ո
  16. MATT ጱਧԎ B D D ጱ ਫ ᪢ ᘏ ժ

    ᭗ ᬦ ဋ ᭗ Ի ၞ ҅ ٍ ֛ ጱ ᐏ ֺ ޾ ᛔ ۖ ۸ ၥ ᦶ ଆ ۗ ՜ ժ ๅ অ ࣈ റ ᔱ ҅ ݎ ሿ ҅ ਧ Ԏ ଚ ḝ ۖ ڊ Ո ժ ፥ ྋ మ አ ጱ ᫫ կ ̶ M a t t W y n n e C u c u m b e r ֢ ᘏ
  17. ୩᧣ဋ᭗

  18. DISCOVERY WORKSHOP GENERATE EXAMPLES DRIVEN DEVELOPMENT Cucumberຽٵၞᑕ

  19. ፥ྋጱᑃᦣ

  20. ቘమஉӿჿ ሿਫஉṋఽ

  21. ӧىဳӱۓ Scenario: Detect agent type based on contract number
 


    Given I am on the 'Find me' page
 And I have entered a contract number
 When I click 'Continue' button
 And a contact number match is found
 Then the "Back" button will be displayed
  22. ਖኻ҅ᬮӧሿڊܻ୵

  23. ᯿॔ጱStep # A feature Given there is student Harry
 And

    there is professor Snape
 And student Harry joins class of professor Snape # B feature, use 1 new step instead of 3 Given student Harry in class of professor Snape
  24. Step્ॺ᧣አ # ֵአVWHSොဩ᧣አ૪ᕪਂࣁጱVWHS
 Given /^student (.*) in class of professor

    (.*)/ do |stu, pro|
 step "there is student #{stu}"
 step "there is professor #{pro}"
 step "student #{stu} joins class of professor #{pro}"
 end Given /^there is student (.*)/ do |student| user = User.create(student) …… end Given /^there is student come from (.*)/ do |country| …… end
  25. ॰ওጱྋڞ ሖሖӥᶎጱྋڞࣁ܃ᯈՋԍҘ /^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}| [1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9] {1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1} [0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}| [1-9]{1}[0-9]{1}|[0-9])$/

  26. ၚ෈໩ փ᭓ӱۓ ၾᴻወజ ᕹӞᦊᦩ

  27. Reportݢ᧛௔૧ ᬯ ฎ ੰ ሸ  ၚ ෈ ໩ 

    
  28. ۱රӧ۱տ ᜉ ᬜ ๕ ֦  ӣ ௏ ᘒ ݸ

    ᤈ ெ  ໏  ኮ  Ḙ
  29. ᵙ ᭲ C u c u m b e r

     ፥ ጱ ӧ অ አ Ҙ
  30. ىဳӱۓ Scenario: Detect agent type based on contract number
 Given

    I am on the 'Find me' page
 And I have entered a contract number
 When I click 'Continue' button
 And a contact number match is found
 Then the "Back" button will be displayed Scenario: Detect agent type based on contract number
 Given I have a "TiedAgent" policy
 When I submit my contract number
 Then I should be asked for my last name
  31. ᯿຅StepਫሿդᎱ 
 Given /^there is student (.*)/ do |student|
 ModelFactory.create_user(student)


    end Given /^there is student (.*)/ do |student| user = User.create(student) …… end
  32. ᯿አStepਫሿդᎱ Given /^student (.*) in class of professor (.*)/ do

    |student, professor|
 ModelFactory.create_user(student, professor)
 ModelFactory.join_class(student, professor)
 end Given /^student (.*) in class of professor (.*)/ do |stu, pro|
 step "there is student #{stu}"
 step "there is professor #{pro}"
 step "student #{stu} joins class of professor #{pro}"
 end
  33. սᐹ෈໩

  34. ಘ઀Cucumber @active-doc
 Scenario: Detect agent type based on contract number


    Given I have a "TiedAgent" policy
 When I submit my contract number
 Then I should be asked for my last name
  35. Ⴒےൈᬿ෈կ ===================== Given I have a "TiedAgent" policy ===================== ##Detail

    Information** **In this step, you are assigned a "TieAgent" policy.** ![screenshot-1](./i-have-a-tied-agent-policy.png) You can click [here](http://example.com) for more information ===================== @active-doc
 Scenario: Detect agent type based on contract number
 Given I have a "TiedAgent" policy
 When I submit my contract number
 Then I should be asked for my last name
  36. ڥአ+22.

  37. ኞ౮෈໩ ᦕ୯VWHS ᬰᤈ౼ࢶ ᘉᦲ0' ᬰᤈ೪ᤰ Cucumber ActiveDoc HTML

  38. ᫨᥯᭬کᆽ

  39. &XFXPEHU Ӥಋᓌܔ҅ᐒ܄ၚ᪋ ෈໩ᤒሿێӧ᪃ ඪ೮ռग़ଘݣ

  40. &RQFRUGLRQ HTML෈໩҅ᤒሿێ୩ ṛݢਧګ۸෈໩ HTML਍ԟ౮๜ṛ ݝඪ೮Java޾C#

  41. &RQFRUGLRQ

  42. &RQFRUGLRQ

  43. Gauge Markdown໒ୗ෈໩ ۑᚆӧਠ࠺ Golang୏ݎ҅௔ᚆ᫾অ

  44. Gauge

  45. ௛ᕮӞӥ %''୩᧣ၞᑕ޾ਫ᪢҅ਙᵱᥝࢫᴚ౮ާጱ᭗ێݳ֢ ݢզଆۗෆӻࢫᴚๅঅጱቘᥴӱۓ҅୏ݎ᫫կ̶ ᥴ٬ԧFXFXPEHUጱӞԶᳯ᷌ԏݸ҅ݢզݎഀๅ୩य़ጱ֢አ̶ ᭌೠӞྃᭇݳࢫᴚᛔ᫝ᵱᥝጱૡٍ҅಍ᚆכᦤࢫᴚᶲڥᬩ֢҅ ੝ᩳ୦᪠̶

  46. ํᳯ᷌᧗ᘶᔮ ྷ᩻ ஙמ im_mao_chao chaomao@thoughtworks.com ᨀᨀ