Narrative Acceptance Tests<br />A Behaviour Driven Approach<br />Antony Marcano & Andy Palmer<br />
Introduction<br />
@AntonyMarcano<br />http://antonymarcano.com<br />@AndyPalmer<br />http://andypalmer.com<br />
May-07<br />Antony Marcano<br />8<br />
Photo taken at www.tnmoc.org on site at www.bletchleypark.org.uk<br />
Photo taken at www.tnmoc.org on site at www.bletchleypark.org.uk<br />
Telephone Game<br />We lose information by repeatedly switching between examples and abstractions<br />http://www.brokenpi...
Example Driven Approaches<br />Why not just use the same examples for the whole process?<br />The developers might even pr...
2009<br />Antony Marcano<br />13<br />
Example Driven Approaches<br />Common attributes:<br />Desired behaviour is expressed as a concrete example<br />The examp...
2009<br />15<br />http://www.parlezuml.com/blog/?postid=490<br />
User Stories are elaborated with Examples<br />For each story likely to be worked on in next iteration<br />Have a convers...
Implement story<br /> (TDD with unit tests)<br />test should pass<br />Have a conversation<br />For each <br />Example not...
Given-When-Then<br />Given-When-Then<br />Given some initial context (the givens),<br />When an event occurs,<br />then en...
2009<br />19<br />Activity<br /><ul><li> Acceptance Tests
 Use Cases</li></ul>General<br />Specific<br /><ul><li> Some manual test scripts
 Automated Test Script </li></ul> using GUI Test tool (e.g. <br /> selenium, QTP, SilkTest)<br /><ul><li> Some manual...
A Place To Start<br />As a Team Member<br />I want a place to start<br />So that I know that the software is running<br />
Given thatthe FitNesse wiki was able to start for the first time<br />When the Project Team Member attempts to go to the H...
Given that the FitNesse wiki was able to start for the first time<br />When the Project Team Member attempts to go to the ...
Given that the FitNesse wiki was able to start for the first time<br />When the Project Team Member attempts to go to the ...
Given that the FitNesse wiki was able to start for the first time<br />When the Project Team Member attempts to go to the ...
Edit the Home Page<br />As a Project Team Member<br />I want to edit the Front Page<br />So that it is relevant to my proj...
Putting it on the table<br />
A more fluent approach<br />Let’s take a look at JNarrate...<br />
Other tools and frameworks<br />JBehave<br />Nbehave<br />Cucumber<br />RSpec<br />
Further reading…<br />Bridging the Communication Gap -Gojko Adzic<br />Agile Testing: A Practical Guide for Testers and Ag...
of 35

Narrative Acceptance Tests River Glide Antony Marcano

Published on: Mar 3, 2016
Published in: Technology      Education      
Source: www.slideshare.net


Transcripts - Narrative Acceptance Tests River Glide Antony Marcano

  • 1. Narrative Acceptance Tests<br />A Behaviour Driven Approach<br />Antony Marcano & Andy Palmer<br />
  • 2. Introduction<br />
  • 3. @AntonyMarcano<br />http://antonymarcano.com<br />@AndyPalmer<br />http://andypalmer.com<br />
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. May-07<br />Antony Marcano<br />8<br />
  • 9. Photo taken at www.tnmoc.org on site at www.bletchleypark.org.uk<br />
  • 10. Photo taken at www.tnmoc.org on site at www.bletchleypark.org.uk<br />
  • 11. Telephone Game<br />We lose information by repeatedly switching between examples and abstractions<br />http://www.brokenpicturetelephone.com/<br />
  • 12. Example Driven Approaches<br />Why not just use the same examples for the whole process?<br />The developers might even preserve the language of the business domain<br />
  • 13. 2009<br />Antony Marcano<br />13<br />
  • 14. Example Driven Approaches<br />Common attributes:<br />Desired behaviour is expressed as a concrete example<br />The example is evaluated against the product, demonstrating the absence of the behaviour<br />The behaviour is implemented<br />The example is re-evaluated to determine if the correct behaviour has been implemented<br />Such as:<br />ATDD, TDD, BDD<br />
  • 15. 2009<br />15<br />http://www.parlezuml.com/blog/?postid=490<br />
  • 16. User Stories are elaborated with Examples<br />For each story likely to be worked on in next iteration<br />Have a conversation<br />Customer,<br />Developer & Tester<br />Discuss examples & summarise<br />on back of story card<br />Or, one card per example<br />
  • 17. Implement story<br /> (TDD with unit tests)<br />test should pass<br />Have a conversation<br />For each <br />Example noted earlier<br />Express the example as<br />automated<br /> acceptance<br /> test<br />Test should fail<br />When all <br />tests pass, <br />story is done<br />(almost)<br />During the iteration<br />
  • 18. Given-When-Then<br />Given-When-Then<br />Given some initial context (the givens),<br />When an event occurs,<br />then ensure some outcomes.<br />For example…<br />http://dannorth.net/introducing-bdd<br />
  • 19. 2009<br />19<br />Activity<br /><ul><li> Acceptance Tests
  • 20. Use Cases</li></ul>General<br />Specific<br /><ul><li> Some manual test scripts
  • 21. Automated Test Script </li></ul> using GUI Test tool (e.g. <br /> selenium, QTP, SilkTest)<br /><ul><li> Some manual </li></ul> Test scripts<br />Task<br />
  • 22. A Place To Start<br />As a Team Member<br />I want a place to start<br />So that I know that the software is running<br />
  • 23. Given thatthe FitNesse wiki was able to start for the first time<br />When the Project Team Member attempts to go to the Home Page<br />Then the content of the Home Page for the Project Team Member should be &quot;Welcome to the Wonderful World of FitNesse!&quot;<br />
  • 24. Given that the FitNesse wiki was able to start for the first time<br />When the Project Team Member attempts to go to the Home Page<br />Then the content of the Home Page for the Project Team Membershould be &quot;Welcome to the Wonderful World of FitNesse!&quot;<br />
  • 25. Given that the FitNesse wiki was able to start for the first time<br />When the Project Team Member attempts to go to the Home Page<br />Then the content of the Home Pagefor the Project Team Membershould be &quot;Welcome to the Wonderful World of FitNesse!&quot;<br />
  • 26. Given that the FitNesse wiki was able to start for the first time<br />When the Project Team Member attempts to go to the Home Page<br />Then the content of the Home Pagefor the Project Team Membershould be &quot;Welcome to the Wonderful World of FitNesse!&quot;<br />
  • 27. Edit the Home Page<br />As a Project Team Member<br />I want to edit the Front Page<br />So that it is relevant to my project<br />Let’s leave the slides and do something real…<br />
  • 28. Putting it on the table<br />
  • 29.
  • 30.
  • 31.
  • 32.
  • 33. A more fluent approach<br />Let’s take a look at JNarrate...<br />
  • 34. Other tools and frameworks<br />JBehave<br />Nbehave<br />Cucumber<br />RSpec<br />
  • 35. Further reading…<br />Bridging the Communication Gap -Gojko Adzic<br />Agile Testing: A Practical Guide for Testers and Agile Teams -Lisa Crispin & Janet Gregory<br />FIT for Developing Software: Framework for Integrated Tests-Rick Mugridge & Ward Cunningham<br />
  • 36. Discussion<br />
  • 37. the.guys@pairwith.us<br />http://pairwith.us<br />http://pairwith.us/tv<br />Twitter:<br />@AntonyMarcano @AndyPalmer<br />