Selenium + Specflow: ATDD for .Net

Selenium + Specflow: ATDD for .Net

32de0bd2ba869609d26fd052a4622778?s=128

Ryan Cromwell

March 12, 2012
Tweet

Transcript

  1. Acceptance Test Driven Development for .Net

  2. me => (Ryan Cromwell)

  3. Coder Agile Coach ALM MVP

  4. Acceptance Test Driven Development (ATDD) is a practice in which

    the whole team collaboratively discusses acceptance criteria, with examples, and then distills them into a set of concrete acceptance tests before development begins. - Elisabeth Hendrickson
  5. • TDD + 1! • Confidence • Collaboration Requirements Design

    Code Test
  6. None
  7. “Selenium automates browsers.” http://seleniumhq.org/

  8. IDE • Record and Playback • Create quick bug reproduction

    scripts • Create scripts to aid later automation • Not scalable WebDriver • Create robust regression scripts • Scale and distribute scripts across many environments • API (Java, .Net, Ruby, Javascript, Python, others)
  9. http://bit.ly/selenese

  10. None
  11. BDD – Behavior Driven Development Gherkin – Given, When, Then…

    plus others Top of the testing pyramid http://specflow.org/
  12. None
  13. None
  14. None
  15. Code Or It Didn’t Happen <!{}>

  16. None
  17. Good • Given I go to Address Book • When

    I Quick Add John Doe • And I Quick Add John Doe • Then I’m told of the duplicate Bad • Given I Go To <Url> • When I Type John Doe • And hit Save • And I type John Doe • And hit Save • Then I see “Sorry, duplicate”
  18. • Refactor • Consolidate Url Knowledge • SOLID+

  19. • Will Feel Silly • Methods = Features/Behaviors • Single

    Dom throws a
  20. • TFS Test Controllers & Agents • Selenium Grid •

    SauceLabs
  21. • VMM Templates • PowerShell • Script Seed Data

  22. Selenium (install-package Selenium.WebDriver) Selenium Helpers (install-package Selenium.Support) SpecFlow (install-package specflow,

    specflow.org) NUnit (install-package nunit)* ShouldFluent (install-package)*
  23. Test Code is Production Code Discipline Confidence

  24. None
  25. github.com/cromwellryan

  26. @cromwellryan blog.cromwellhaus.com