Title: [1292] trunk/core/distribution/src/site/content: Added page.
Revision
1292
Author
mauro
Date
2009-10-05 03:08:59 -0500 (Mon, 05 Oct 2009)

Log Message

Added page.

Modified Paths


Added Paths

Diff

Added: trunk/core/distribution/src/site/content/given-scenarios.html (0 => 1292)

--- trunk/core/distribution/src/site/content/given-scenarios.html	                        (rev 0)
+++ trunk/core/distribution/src/site/content/given-scenarios.html	2009-10-05 08:08:59 UTC (rev 1292)
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<title>Given Scenarios</title>
+</head>
+
+<body>
+
+<h2>Reusing Textual Scenarios</h2>
+
+<p>BDD encourages the description of the acceptance tests in a
+manner that is intelligible and transparent to the business users. This
+in particular may mean setting up explicitly via scenario steps all the
+pre-requirements of a particular scenario. For complex scenarios this
+will rapidly lead to maintainance problems due to duplication of entire
+blocks of steps.</p>
+
+<p>To help the user better manager more complex scenarios, JBehave
+allow the specification of entire scenarios as a pre-requisite for
+another scenario.</p>
+
+<pre class="brush: bdd">
+    Scenario:  A scenario in which the user can run other scenarios as pre-requisites
+    
+    GivenScenarios: path/to/scenario1,path/to/scenario2,...path/to/scenarioN
+    
+    Given ... // normal scenario steps
+</pre>
+<p>When JBehave encounters the keyword <b>GivenScenarios</b>, it
+will run the (one or more) textual scenarios specifed by path in the
+list (using the same Steps instances specified for the parent scenario)
+before proceeding to the execution of the normal scenario steps.</p>
+
+<p>Another way to avoid duplication of textual scenario steps is to
+use the natural ordering of execution of the scenario classes.
+Typically, this means that the scenarios will be executed in the
+alphabetical order of their names and a convention can be adopted to
+have scenarios start with an alphanumberical prefix, such as 'Snn' where
+'nn' is an incremental number. This though has the disadvantage of having
+to run all scenarios leading up to the desired scenario, which in some
+cases can be unnecessary and time consuming. For example, for debugging
+purposes one may need to one run one scenario, which may have a
+dependency on just one other. This is where <b>GivenScenarios</b> is
+most useful.</p>
+
+<div class="clear">
+<hr />
+</div>
+
+</body>
+</html>

Modified: trunk/core/distribution/src/site/content/sitemap.xml (1291 => 1292)

--- trunk/core/distribution/src/site/content/sitemap.xml	2009-10-05 07:41:48 UTC (rev 1291)
+++ trunk/core/distribution/src/site/content/sitemap.xml	2009-10-05 08:08:59 UTC (rev 1292)
@@ -29,6 +29,7 @@
     <page>parameter-injection.html</page>
     <page>parameter-converters.html</page>
     <page>table-examples.html</page>
+    <page>given-scenarios.html</page>
   </section>
   <section>
     <name>Project Info</name>


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to