Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BDD in .NET - TDD 在實務上的最後一塊拼圖

Avatar for hatelove hatelove
January 12, 2013

BDD in .NET - TDD 在實務上的最後一塊拼圖

TDD 的概念不難,難的是在各個角色之間如何達成共識。
TDD 的技巧不難,難的是怎麼寫出既符合使用者需求,又可以幫助開發人員 TDD 的測試案例。

這次將介紹在實務開發流程中,如何透過 BDD 來滿足使用者、測試人員與開發人員,如何透過 BDD 來產生既符合使用者需求,且大家都看的懂,還可以轉換成測試程式的測試案例。

Avatar for hatelove

hatelove

January 12, 2013
Tweet

More Decks by hatelove

Other Decks in Technology

Transcript

  1. Joey Chen @ 2013 WebConf 2013/01/12 BDD in .NET -

    TDD 在實務上的最後一塊拼圖 1
  2. 19

  3. 39

  4. 40

  5. 41

  6. 42

  7. 43

  8. 44

  9. 45

  10. 46

  11. 47

  12. 48

  13. 49

  14. 50

  15. 主要步驟  由user story撰寫feature  由acceptance test cases撰寫scenarios  建立雛形網站

     錄製selenium腳本  將selenium腳本匯出成C#程式  將selenium的C#程式放到scenario的steps中  完成acceptance testing code – 紅燈  撰寫production code,通過測試 – 綠燈  重構 56
  16. 補充 – SpecFlow 特色 •依據不同 testing framework 產生測試程式框架 •可於 Scenario

    上偵錯 •支援 table layout 與取得強型別物件 •支援註冊型別,取得物件 ( IoC framework ) •支援 attribute hook event ( AOP ) 63
  17. 參考資料  The Art of Unit Testing: With Examples in

    .Net  Test Driven: TDD and Acceptance TDD for Java Developers  Growing Object-Oriented Software, Guided by Tests  Emergent Design: The Evolutionary Nature of Professional Software Development  Brownfield Application Development in .Net  Scrum and XP from the Trenches (Enterprise Software Development)  30 天快速上手 TDD (by 91)  SpecFlow 官網 64
  18. 65