Title: [1272] trunk/core: Added dependencies and faq pages.

Diff

Modified: trunk/core/distribution/pom.xml (1271 => 1272)

--- trunk/core/distribution/pom.xml	2009-09-20 22:18:38 UTC (rev 1271)
+++ trunk/core/distribution/pom.xml	2009-09-21 21:38:45 UTC (rev 1272)
@@ -17,6 +17,16 @@
     </dependency>
     <dependency>
       <groupId>${pom.groupId}</groupId>
+      <artifactId>jbehave-ant</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
       <artifactId>jbehave-maven-plugin</artifactId>
       <version>${pom.version}</version>
     </dependency>
@@ -175,7 +185,7 @@
   <distributionManagement>
     <site>
       <id>codehaus.org</id>
-      <url>dav:https://dav.codehaus.org/waffle/</url>
+      <url>dav:https://dav.codehaus.org/jbehave/</url>
     </site>
   </distributionManagement>
 </project>
\ No newline at end of file

Modified: trunk/core/distribution/src/site/content/bdd-concepts.html (1271 => 1272)

--- trunk/core/distribution/src/site/content/bdd-concepts.html	2009-09-20 22:18:38 UTC (rev 1271)
+++ trunk/core/distribution/src/site/content/bdd-concepts.html	2009-09-21 21:38:45 UTC (rev 1272)
@@ -8,21 +8,73 @@
 
 <h2>BDD Concepts</h2>
 
-<p>BDD revolves around the concept of a <b>Scenario</b>, which at
-its core comprises of a number of executed Steps. The <b>Steps</b> can
-be of three types:</p>
-<ul>
-    <li><b>Given</b> represents a precondition to an event</li>
-    <li><b>When</b> represents an event</li>
-    <li><b>Then</b> represents an outcome of the event</li>
-</ul>
-<p>A <b>Story</b> or a <b>Feature</b>, in turn, comprises of one of
-more <b>Scenarios</b>.</p>
+<h2>A definition of BDD</h2>
 
+<span class="followup">BDD is about implementing an application
+by describing it from the point of view of its stakeholders </span>
+
+<h2>Scenarios and Steps</h2>
+
+<p>Behaviour-Driven Development (BDD) revolves around the concept of
+a <b>Scenario</b>, which represents an <b>automatable execution of
+business functionality</b>. At its core a Scenario comprises of a number of
+executed steps. These <b>Steps</b> can be of three types:</p>
+<pre class="brush: bdd">
+Scenario:  A scenario is a collection of executable steps of different type 
+
+A Given step represents a precondition to an event
+A When step represents the occurrence of the event
+A Then step represents the outcome of the event
+</pre>
+<p><b>Given</b>, <b>When</b> and <b>Then</b> are also called <b>BDD
+Keywords</b></p>
+<p>A <b>Story</b> or a <b>Feature</b>, in turn, comprises of one or
+more <b>Scenario</b>s.</p>
+
+<p>A scenario can contain any number of steps, and steps of the same
+type can follow each other:</p>
+<pre class="brush: bdd">
+Given a wizard named Harry
+Given a wizard named Hermione
+When the wizards meet
+Then a spark should occur
+</pre>
+<p>This scenario signals that there are two preconditions to the
+event of the wizards meeting. As such, it may be expressed in an
+equivalent way:</p>
+<pre class="brush: bdd">
+Given a wizard named Harry
+And a wizard named Hermione
+When the wizards meet
+Then a spark should occur
+</pre>
+<p>We can then introduce another keyword:</p>
+<pre class="brush: bdd">
+A step starting with And assumes the same meaning of the previous step
+</pre>
+
+<h2>Communication is the key</h2>
+
+<p>BDD aims to provide an <b>automatable</b> description of the
+behaviour of the system, from the point of view of the stakeholders. As
+such, it is essential that the language used in the description reflects
+the langauge used by the business users. The language and its grammar
+represents the shared understanding of the behaviour between the
+business users and the development team. And as any language it evolves
+with the evolution of this shared understanding. BDD provides the
+grammar, but the language is agreed between the business and the team.</p>
+<p>The emphasys should be placed on concepts relevant to the
+business, shielding away issues of technical implementation. A good rule
+of thumb is that if details of the technical implementation can be
+changed without affecting the overall behaviour, as visible by the
+business user, then it should not appear in the scenario.</p>
+
 <h2>Next?</h2>
 
 <span class="followup">Learn about the full <a
-    href="" Grammar</a> JBehave supports.</span>
+    href="" Grammar</a> JBehave supports. Or refer
+to <a href="" Resources</a> for more BDD-related
+information.</span>
 
 <div class="clear">
 <hr />

Added: trunk/core/distribution/src/site/content/dependencies.html (0 => 1272)

--- trunk/core/distribution/src/site/content/dependencies.html	                        (rev 0)
+++ trunk/core/distribution/src/site/content/dependencies.html	2009-09-21 21:38:45 UTC (rev 1272)
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<title>Dependencies</title>
+</head>
+
+<body>
+
+<h2>Dependencies required by JBehave</h2>
+
+<h3>JBehave Core</h3>
+
+<p>The <a href="" Core</a> requires
+the following dependencies to be in the classpath:</p>
+<ul>
+    <li><a href=""
+    <li><a href=""
+</ul>
+<p><b>Attention</b>: if you use <b>junit.jar</b>, be awared that
+from version 4.4 it comes bundled bundled with a copy of Hamcrest API,
+so you may experience unpredictable behaviours based on the relative
+position of the jars in the classpath. It is advisable to use the <b>junit-dep.jar</b>
+which is identitical, except that is come unbundled and any dependencies
+must be declared.</p>
+
+<p><b>Note</b>: JBehave Core is agnostic of any build tools,
+althought it does contain an optional dependency on the <a
+    href="" for the implementaion of
+the <a
+    href=""
+This is a utilily class which is used only by the <a
+    href="" Ant</a> and <a
+    href="" Maven Plugin</a>
+modules.</p>
+
+<h3>JBehave Ant</h3>
+
+<p>The <a href="" Ant</a> module
+requires the following dependencies to be in the classpath (in addition
+to Core and its dependencies):</p>
+<ul>
+    <li><a href=""
+</ul>
+
+<h3>JBehave Maven Plugin</h3>
+
+<p>The <a href="" Maven
+Plugin</a> module requires the following dependencies to be in the classpath
+(in addition to Core and its dependencies):</p>
+<ul>
+    <li><a href=""
+</ul>
+
+</body>
+</html>
\ No newline at end of file

Added: trunk/core/distribution/src/site/content/faq.html (0 => 1272)

--- trunk/core/distribution/src/site/content/faq.html	                        (rev 0)
+++ trunk/core/distribution/src/site/content/faq.html	2009-09-21 21:38:45 UTC (rev 1272)
@@ -0,0 +1,112 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<title>FAQs</title>
+</head>
+
+<body>
+
+<h2>FAQs</h2>
+
+<h3>What is BDD?</h3>
+
+<p>BDD stands for Behaviour-Driven Development and you can learn
+more about BBD from our <a href="" Resources</a>.</p>
+
+<h3>What Java version is required by JBehave?</h3>
+
+<p>JBehave uses Java 5 annotations, so any JDK 1.5+ will work.</p>
+
+<h3>How do I use JBehave within my development environment?</h3>
+
+<p>Scenarios can be run in IDEs, as <a href=""
+tests.</p>
+
+<p>Scenarios can also be run on command line, see <a
+    href="" scenarios</a>.</p>
+
+<h3>What libraries does JBehave depend on?</h3>
+
+<p>Check the <a href="" details.</p>
+
+<h3>Eclipse can't seem to find annotations if they are contained
+within a jar</h3>
+
+<p>Some versions of Eclipse need to be aware of the JBehave source
+to enable the JUnit plugin for scenarios, as they canÕt spot the <b>@Test</b>
+annotation in a class jar. The link to the core sources is available
+from the <a href="" page.</p>
+
+<p>Alternatively, <a href=""
+users can downlaod the sources automatically.</p>
+
+<p>A workaround is to override the runScenario() method annotated
+with @Test</p>
+
+<pre class="brush: java">
+public class YourScenario extends JUnitScenario {
+
+    @Test
+    public void runScenario() throws Throwable {
+        super.runScenario();
+    }
+
+}
+</pre>
+<p>Note that this is only required for the root scenario of all your
+scenarios.</p>
+
+<h3>Can I run my scenarios in IDE with TestNG?</h3>
+
+<p>Similarly to the proposed workaround above, you should be able to
+run with TestNG by simply annotating the runScenario() method in your
+root Scenario class with the TestNG @Test annotation.</p>
+
+<pre class="brush: java">
+public class YourScenario extends JUnitScenario {
+
+    @org.testng.annotations.Test 
+    public void runScenario() throws Throwable {
+        super.runScenario();
+    }
+
+}
+</pre>
+
+<p>Note that we don't tend to use TestNG so this solution as not
+been tested. If you encounter any issues please let us know.</p>
+
+<h3>How do I make my scenarios fail when steps are not matched and
+are shown as pending?</h3>
+
+<p>Configure the <a
+    href=""
+in <a href=""
+<pre class="brush: java">
+new Configuration(){
+   public PendingErrorStrategy forPendingSteps() {
+       return PendingErrorStrategy.FAILING;
+   }
+} 
+</pre>
+
+<h3>How do I output all my scenario steps - and not just when a
+scenario fails?</h3>
+
+<p>Configure the <a
+    href=""
+in <a href=""
+
+<pre class="brush: java">
+new Configuration(){
+     public ScenarioReporter forReportingScenarios() {
+          return new PrintStreamScenarioReporter();
+    }
+} 
+</pre>
+
+<p>Alternatively, you can use <a
+    href=""
+setting system property <b>"org.jbehave.outputall"</b>.</p>
+</body>
+</html>
\ No newline at end of file

Modified: trunk/core/distribution/src/site/content/getting-started.html (1271 => 1272)

--- trunk/core/distribution/src/site/content/getting-started.html	2009-09-20 22:18:38 UTC (rev 1271)
+++ trunk/core/distribution/src/site/content/getting-started.html	2009-09-21 21:38:45 UTC (rev 1272)
@@ -11,7 +11,7 @@
 <h3>Write a textual scenario</h3>
 
 <p>Create a textual scenario file with a name that expresses the
-behaviour to verify, e.g. i_can_toggle_a_cell and define steps in it:</p>
+behaviour to verify, e.g. <b>i_can_toggle_a_cell</b> and define steps in it:</p>
 <pre class="brush: bdd">
       Given a 5 by 5 game
       When I toggle the cell at (2, 3)
@@ -98,13 +98,15 @@
 <h3>Run scenario in IDE</h3>
 
 <p>Open your favourite IDE, the <b>ICanToggleACell.java</b> class
-will allow itself to run as a JUnit test.</p>
+will allow itself to run as a JUnit test. Be sure to check that you have
+all the required <a href="" in your classpath.</p>
 
-<h2>Looking for more examples?</h2>
+<h2>Next?</h2>
 
 <span class="followup">JBehave has a number of working <a
     href=""
-in the source repository, which illustrate its features.</span>
+in the source repository, which illustrate its features.  The examples also show command-line ways of
+<a href="" scenarios</a>.</span>
 
 </body>
 </html>
\ No newline at end of file

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

--- trunk/core/distribution/src/site/content/sitemap.xml	2009-09-20 22:18:38 UTC (rev 1271)
+++ trunk/core/distribution/src/site/content/sitemap.xml	2009-09-21 21:38:45 UTC (rev 1272)
@@ -3,6 +3,8 @@
     <name>About</name>
     <page>index.html</page>
     <page>getting-started.html</page>
+    <page>dependencies.html</page>
+    <page>faq.html</page>
     <page>license.html</page>
     <page>download.html</page>
     <page>javadoc.html</page>

Modified: trunk/core/distribution/src/site/resources/style/jbehave.css (1271 => 1272)

--- trunk/core/distribution/src/site/resources/style/jbehave.css	2009-09-20 22:18:38 UTC (rev 1271)
+++ trunk/core/distribution/src/site/resources/style/jbehave.css	2009-09-21 21:38:45 UTC (rev 1272)
@@ -1,5 +1,5 @@
 #banner {
-  background: #ffffff url(../images/background-banner.png) repeat top left;
+  background: #fff url(../images/background-banner.png) repeat top left;
 }
 
 #banner img {
@@ -8,8 +8,8 @@
 
 #footer {
   width: 100%;
-  background: #ffffff url(../images/background-footer.png) repeat;
-  color: white;
+  background: #fff url(../images/background-footer.png) repeat;
+  color: #fff;
   border: 1px solid;
   padding: 5px 0 5px 0;
   margin-top: 50px;
@@ -73,8 +73,7 @@
 }
 
 div.section {
-
-  background-color: white;
+  background-color: #fff;
   position: absolute;
   top: 140px;
   padding: 15px;
@@ -103,8 +102,12 @@
   color: #39912b;
 }
 
+b {
+  color: #333;
+}
+
 table.bodyTable th {
-  color: white;
+  color: #fff;
   background-color: #bbb;
   text-align: left;
   font-weight: bold;
@@ -174,7 +177,7 @@
 .MGroup a {
   background: #39912b none repeat scroll 0%;
   border-right: 4px solid #b3b3a1;
-  color: #FFFFFF;
+  color: #fff;
   cursor: pointer;
   display: block;
   font-weight: bold;
@@ -213,43 +216,9 @@
 }
 
 #MSelected {
-  background-color: #FFFFFF;
-  border-right: 4px solid #FFFFFF;
-  color: #333333;
+  background-color: #fff;
+  border-right: 4px solid #fff;
+  color: #333;
   text-shadow: none;
 }
-
-/* Language specific styles */
-
-.dp-highlighter .comment, .dp-highlighter .comments {
-  color: #428BDD;
-}
-
-.dp-highlighter .string {
-  color: #00CC00;
-}
-
-.dp-highlighter .keyword {
-  color: #F9BB00;
-}
-
-.dp-highlighter .preprocessor {
-  color: gray;
-}
-
-.dp-xml .cdata {
-  color: #fff;
-}
-
-.dp-xml .tag, .dp-xml .tag-name {
-  color: #F9BB00;
-}
-
-.dp-xml .attribute {
-  color: #428BDD;
-}
-
-.dp-xml .attribute-value {
-  color: #0c0;
-}
 

Modified: trunk/core/jbehave-core/src/java/org/jbehave/scenario/PropertyBasedConfiguration.java (1271 => 1272)

--- trunk/core/jbehave-core/src/java/org/jbehave/scenario/PropertyBasedConfiguration.java	2009-09-20 22:18:38 UTC (rev 1271)
+++ trunk/core/jbehave-core/src/java/org/jbehave/scenario/PropertyBasedConfiguration.java	2009-09-21 21:38:45 UTC (rev 1272)
@@ -14,8 +14,8 @@
  * PropertyBasedConfiguration is backed by MostUsefulConfiguration as default, but has different
  * behaviour if certain system properties are non-null:
  * <ul>
- *   <li>PropertyBasedConfiguration.FAIL_ON_PENDING: uses  PendingErrorStrategy.FAILING as PendingErrorStrategy</li<
- *   <li>PropertyBasedConfiguration.OUTPUT_ALL:  uses PrintStreamScenarioReporter as ScenarioReporter</li<
+ *   <li>PropertyBasedConfiguration.FAIL_ON_PENDING: uses  PendingErrorStrategy.FAILING as PendingErrorStrategy</li>
+ *   <li>PropertyBasedConfiguration.OUTPUT_ALL:  uses PrintStreamScenarioReporter as ScenarioReporter</li>
  * </ul>
  */
 public class PropertyBasedConfiguration implements Configuration {

Modified: trunk/core/pom.xml (1271 => 1272)

--- trunk/core/pom.xml	2009-09-20 22:18:38 UTC (rev 1271)
+++ trunk/core/pom.xml	2009-09-21 21:38:45 UTC (rev 1272)
@@ -34,7 +34,7 @@
         <version>1.1</version>
       </dependency>
       <dependency>
-        <!-- Optional as only used by scenario class name finder -->
+        <!-- Optional as only required scenario class name finder, used by Ant and Maven Plugin modules -->
         <groupId>org.apache.ant</groupId>
         <artifactId>ant</artifactId>
         <version>1.7.0</version>


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to