Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Executable specifiaction

947 views

Published on

Introduction to executable specification idea and jBehave acceptance test automation tool

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Executable specifiaction

  1. 1. Executable Specification Ürgo Ringo
  2. 2. Idea <ul><li>Tests == Examples == Spec
  3. 3. Collaboration
  4. 4. Living documentation </li></ul>
  5. 6. Automation
  6. 7. Level of Automation
  7. 8. Tools <ul><li>Concordion
  8. 9. Cucumber
  9. 10. easyb
  10. 11. GreenPepper
  11. 12. jBehave </li></ul>
  12. 13. Automation layers
  13. 14. Specification in jBehave Scenario : new entry is added Given that Urgo published new entry &quot;Hello World&quot; in his blog When aggregator runs Then aggregated blog contains 1 entry with title &quot;Hello World&quot; Scenario : user without Confluence account has his full name as author Given that user with author name urgo.ringo does not have Confluence account and he published new entry &quot;Hello World&quot; in his blog When aggregator runs Then aggregated blog contains entry &quot;Hello World&quot; with author &quot;Urgo Ringo&quot; Scenario : user with Confluence account has his username as author Given that Urgo has Confluence account with username urgo.ringo and he published new entry &quot;Hello World&quot; in his blog When aggregator runs Then it contains entry &quot;Hello World&quot; with author linked to Confluence account with username urgo.ringo
  14. 15. Steps public class AddNewEntrySteps { ... @BeforeScenario public void setup() { feed = new SimpleSyndFeed(); plugin = new Confluence( currentDateProvider ); plugin .registerBlogToAggregator( feed ); } ... @AfterScenario public void reset() { plugin .uninstallAggregator(); } }
  15. 16. <given> @Given ( &quot;that Urgo published new entry &quot;$title&quot; in his blog&quot; ) public void newBlogEntryPublished(String title) { plugin .installAggregator( &quot;urgo.ringo&quot; ); publishNewBlogEntry(title); }
  16. 17. <when> @When ( &quot;aggregator runs&quot; ) public void aggregatorRuns() { plugin .runAggregator(); }
  17. 18. <then> @Then ( &quot;aggregated blog contains 1 entry with title &quot;$title&quot;&quot; ) public void aggregatedBlogContainNewEntry(String title) { List<ContentEntityObject> entries = plugin .getAggregatedEntries(); assertEquals (1, entries.size()); assertEquals (title, entries.get(0).getTitle()); }
  18. 19. Application runner public class Confluence { public void registerBlogToAggregator(SyndFeed feed) { ... } public void uninstallAggregator() { ... } public void installAggregator(String aggregatedAuthor) { ... } public void createUserAccount(String username) { ... } public void runAggregator() { ... } public List<ContentEntityObject> getAggregatedEntries() { ... } }
  19. 20. Verdict <ul><li>Development cost
  20. 21. What is the problem? </li></ul>
  21. 22. <ul><li>Used pictures </li><ul><li>http://www.flickr.com/photos/shearwater/154210466/ </li></ul></ul><ul><li>urgoringo.wordpress.com </li></ul><ul><li>ignite.ee </li></ul>

×