- Revision
- 1540
- Author
- mauro
- Date
- 2010-02-05 04:39:48 -0600 (Fri, 05 Feb 2010)
Log Message
JBEHAVE-163: Updated documentation.
Modified Paths
Diff
Modified: trunk/core/distribution/src/site/content/faq.html (1539 => 1540)
--- trunk/core/distribution/src/site/content/faq.html 2010-02-04 17:15:46 UTC (rev 1539) +++ trunk/core/distribution/src/site/content/faq.html 2010-02-05 10:39:48 UTC (rev 1540) @@ -118,6 +118,7 @@ <p>Yes, one can write steps as POJOs and then create an instance of <a href="" via the <a href="" +</p> <pre class="brush: java"> StepsConfiguration configuration = ... // optional configuration new StepsFactory(configuration).createCandidateSteps(new TraderSteps())); @@ -126,5 +127,20 @@ <p>Alternatively, one can extend the <a href="" class.</p> +<h3>Can I insert comments in the textual scenarios?</h3> + +<p>Yes, one can add them the scenario title, which allows free text up the first keyword of the scenario, e.g. the first Given.</p> + +<p>From version 2.4.1, one can also insert ignorable steps between executable steps, using keyword "!--" (which can be changed via I18n properties)</p> +<pre class="brush: bdd"> +Scenario: This is a description of the scenario, of the intended behaviour and its verification + +Given a precondition +!-- This is an ignorable step, used to insert a comment, +which can be multiline, just like any other step! +When something happens +Then outcome is verified +</pre> + </body> </html> \ No newline at end of file
Modified: trunk/core/distribution/src/site/content/grammar.html (1539 => 1540)
--- trunk/core/distribution/src/site/content/grammar.html 2010-02-04 17:15:46 UTC (rev 1539) +++ trunk/core/distribution/src/site/content/grammar.html 2010-02-05 10:39:48 UTC (rev 1540) @@ -34,7 +34,7 @@ NonSpaceCharacter := ? Any Unicode character except Space ? ; ; The keywords which are reserved (or equivalent in I18n-ed locale) -KeyWord := "Scenario:" | "GivenScenarios:" | "Given" | "When" | "Then" | "And" ; +KeyWord := "Scenario:" | "GivenScenarios:" | "Given" | "When" | "Then" | "And" | "!--"; ; The comma-separated list of scenario resources that specify the scenarios to be run before the scenario steps GivenScenarios:= "GivenScenarios:" (ScenarioResourcePath ','?)+ ; @@ -55,7 +55,7 @@ Step := StepStartingWord StepContent ; ; The step starting words (or equivalent in I18n-ed locale) -StepStartingWord :== ("Given" | "When" | "Then" | "And" ) ; +StepStartingWord :== ("Given" | "When" | "Then" | "And" | "!--") ; ; The step content is any sequence of characters that do not match a step starting word StepContent := ? Any sequence of StepCharacter that does not match StepStartingWord ? ;
Modified: trunk/core/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/wildcard_search.scenario (1539 => 1540)
--- trunk/core/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/wildcard_search.scenario 2010-02-04 17:15:46 UTC (rev 1539) +++ trunk/core/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/wildcard_search.scenario 2010-02-05 10:39:48 UTC (rev 1540) @@ -7,7 +7,8 @@ |Curly|Stooge 2| !-- This is a comment, which will be ignored in the execution When a wildcard search ".*y" is executed -!-- This is another comment, also ignored +!-- This is another comment, also ignored, +but look Ma! I'm on a new line! Then the traders returned are: |name|rank| |Larry|Stooge 3|
Modified: trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/grammar.ebnf (1539 => 1540)
--- trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/grammar.ebnf 2010-02-04 17:15:46 UTC (rev 1539) +++ trunk/core/jbehave-core/src/main/java/org/jbehave/scenario/parser/grammar.ebnf 2010-02-05 10:39:48 UTC (rev 1540) @@ -24,7 +24,7 @@ NonSpaceCharacter := ? Any Unicode character except Space ? ; ; The keywords which are reserved (or equivalent in I18n-ed locale) -KeyWord := "Scenario:" | "GivenScenarios:" | "Given" | "When" | "Then" | "And" ; +KeyWord := "Scenario:" | "GivenScenarios:" | "Given" | "When" | "Then" | "And" | "!--"; ; The comma-separated list of scenario resources that specify the scenarios to be run before the scenario steps GivenScenarios:= "GivenScenarios:" (ScenarioResourcePath ','?)+ ; @@ -45,7 +45,7 @@ Step := StepStartingWord StepContent ; ; The step starting words (or equivalent in I18n-ed locale) -StepStartingWord :== ("Given" | "When" | "Then" | "And" ) ; +StepStartingWord :== ("Given" | "When" | "Then" | "And" | "!--" ) ; ; The step content is any sequence of characters that do not match a step starting word StepContent := ? Any sequence of StepCharacter that does not match StepStartingWord ? ;
To unsubscribe from this list please visit:
