Your SlideShare is downloading. ×
SpecFlow and some things I've picked up
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

SpecFlow and some things I've picked up

616
views

Published on

These are the slides for my SpecFlow presentation. This particular version was given as part of my "I'm telling you for the last time"-series (see http://www.marcusoft.net/2013/11/ImTellingYou.html).

These are the slides for my SpecFlow presentation. This particular version was given as part of my "I'm telling you for the last time"-series (see http://www.marcusoft.net/2013/11/ImTellingYou.html).

Published in: Technology, Business

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
616
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
14
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. SpecFlow, Gherkin and some things I’ve picked up using them Marcus Hammarberg
  • 2. Specification by example is not about the tools ! it’s about communication
  • 3. Whether we choose to call it BDD or ATDD or Specification by Example, we want the same result – a shared common understanding of what is to be built to try to build the ‘thing’ right the first time. ! We know it never will be, but the less rework, the better. ! Janet Gregory
  • 4. Hence: Let’s talk tools! http://boulderblimp.com/blimpwp/wp-content/uploads/2012/03/Craftsman-Toolbox.jpg
  • 5. http://www.youtube.com/aptitudsthlm
  • 6. Bandung
  • 7. It’s not in the tool http://www.barbellsandbacon.com/wp-content/uploads/2010/02/mlss_mario-hammer.jpg
  • 8. Tools
  • 9. How does this work?
  • 10. How does this work? [Given("I am on the Activity list")] public void ThisNameIsNotImportantToSpecFlow() ! [When("I click the Create New link")] public void SpecFlowUsesTheAttirbutesPerDefault() ! [Then("I should be on the Create Activity page")] public void SoItDoesntEvenCareWhatYouCallThese()
  • 11. Gherkin
  • 12. Feature http://www.lushtshirts.co.uk/images/products/bug-feature.jpg
  • 13. Feature http://www.lushtshirts.co.uk/images/products/bug-feature.jpg
  • 14. Feature http://www.lushtshirts.co.uk/images/products/bug-feature.jpg
  • 15. Scenario http://images2.fanpop.com/images/photos/7000000/Friends-33-friends-7046166-1280-1024.jpg
  • 16. Scenario http://images2.fanpop.com/images/photos/7000000/Friends-33-friends-7046166-1280-1024.jpg
  • 17. Scenario http://images2.fanpop.com/images/photos/7000000/Friends-33-friends-7046166-1280-1024.jpg
  • 18. Step in time!
  • 19. Step in time!
  • 20. Expressions
  • 21. Expressions When I withdraw $20
  • 22. Expressions When I withdraw $20 [When(@“I withdraw $(d+)“)] public void Withdraw(int amount)
  • 23. Expressions When I withdraw $20 [When(@“I withdraw $(d+)“)] public void Withdraw(int amount) (.*) => string (d+) => integer
  • 24. Background
  • 25. Hooks
  • 26. Hooks
  • 27. Tags
  • 28. Tags
  • 29. @ignore
  • 30. [Given("I have the following persons")] public void IHaveTheFollowingPersons (Table personsTable)
  • 31. SpecFlow.Assist
  • 32. SpecFlow.Assist
  • 33. Scenario outline
  • 34. Scenario outline
  • 35. Language
  • 36. ScenarioContext.Current
  • 37. Do I have time for more? http://appyourmac.com/wp-content/uploads/2009/06/Awaken.png
  • 38. Code here: http://bit.ly/SpecFlowDemos
  • 39. Cuke Envy
  • 40. Gherkin
  • 41. Gherkin Step definition
  • 42. Gherkin Step definition DSL
  • 43. Gherkin Step definition DSL Automation code
  • 44. Gherkin Step definition DSL Automation code SUT
  • 45. Here’s one I’ve prepare earlier
  • 46. Here’s one I’ve prepare earlier http://media.kansascity.com/smedia/2013/02/13/13/33/meBc3.St.81.jpeg
  • 47. Structure
  • 48. Structure Coding by intention
  • 49. Structure Coding by intention Pushing the HOW down
  • 50. Structure Coding by intention Pushing the HOW down DSL Swap
  • 51. A special thank you to my friends: - Cucumber • SpecFlow(specflow.org) on .NET, great Visual Studio integration • NancyFx - Minimalistic web framework, with great testing capabilities (nancyfx.org) • Simple.Data - simple data access, that’s all (github.com/markrendle/Simple.Data) • FluentAutomation - UI Automation, wraps Selenium/Watin/etc (fluent.stirno.com)
  • 52. Code here: http://bit.ly/CukeEnvy
  • 53. Learn more
  • 54. Learn more • http://blog.dannorth.net/introducing-bdd/
  • 55. Learn more • http://blog.dannorth.net/introducing-bdd/ • http://www.specflow.org/
  • 56. Learn more • http://blog.dannorth.net/introducing-bdd/ • http://www.specflow.org/ • http://cukes.info
  • 57. Learn more • http://blog.dannorth.net/introducing-bdd/ • http://www.specflow.org/ • http://cukes.info • https://github.com/marcusoftnet/SpecFlowDemos
  • 58. Learn more • http://blog.dannorth.net/introducing-bdd/ • http://www.specflow.org/ • http://cukes.info • https://github.com/marcusoftnet/SpecFlowDemos • http://skillsmatter.com/podcast/agile-testing/refuctoring-yourcukes
  • 59. Learn more • http://blog.dannorth.net/introducing-bdd/ • http://www.specflow.org/ • http://cukes.info • https://github.com/marcusoftnet/SpecFlowDemos • http://skillsmatter.com/podcast/agile-testing/refuctoring-yourcukes • http://skillsmatter.com/podcast/agile-testing/bdd-as-its-meantto-be-done
  • 60. Learn more • http://blog.dannorth.net/introducing-bdd/ • http://www.specflow.org/ • http://cukes.info • https://github.com/marcusoftnet/SpecFlowDemos • http://skillsmatter.com/podcast/agile-testing/refuctoring-yourcukes • http://skillsmatter.com/podcast/agile-testing/bdd-as-its-meantto-be-done • http://skillsmatter.com/podcast/agile-testing/cuke-envy-a-dotnet-programmers-attempt-to-catch-up
  • 61. www.marcusoft.net @marcusoftnet marcus.hammarberg@aptitud.se
  • 62. www.marcusoft.net @marcusoftnet marcus.hammarberg@aptitud.se
  • 63. Recording of this talk http://www.youtube.com/ aptitudsthlm