Executable specifiaction

788
-1

Published on

Introduction to executable specification idea and jBehave acceptance test automation tool

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
788
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×