diff --git a/figs/asciidoc_narrative.png b/figs/asciidoc_narrative.png new file mode 100644 index 0000000..597903e Binary files /dev/null and b/figs/asciidoc_narrative.png differ diff --git a/thucydides.doc b/thucydides.doc index 233b18a..47bbef2 100644 --- a/thucydides.doc +++ b/thucydides.doc @@ -1193,6 +1193,28 @@ When you run these stories (without having implemented any actual tests), you wi .You can see the requirements that you need to implement n the requirements report image::figs/jbehave-requirements-report.png[scaledwidth="80%", width=475] +===== Narrative in asciidoc format + +Narratives can be written in http://www.methods.co.nz/asciidoc/[Asciidoc] for richer formatting. Set the +narrative.format+ property to +asciidoc+ to allow Thucydides to parse the narrative in asciidoc format. + +For example, the following narrative, + +--------------------- +Item search + +Narrative: +In order to find the items I am interested in faster +As a +buyer+ +*I want to be able to list all the ads with a particular keyword in the description or title*. +--------------------- + +will be rendered on the report as shown below. + +[[asciidoc_narrative]] +.Narrative with asciidoc formatting +image::figs/asciidoc_narrative.png[scaledwidth="80%", width=475] + + ==== Customizing the requirements module You can also easily extend the Thucydides requirements support so that it fits in to your own system. This is a two-step process. First, you need to write an implementation of the `RequirementsTagProvider` interface. @@ -2555,11 +2577,35 @@ This will produce a summary report in the generated Maven site documentation, wi .Thucydides test reports in the Maven site image::figs/thucydides-maven-reports.png[scaledwidth="80%", width=475] +== Converting existing xUnit, specFlow and Lettuce test cases into Thucydides report + +With the Thucydides maven plugin added as described in the previous section, you can also import existing xUnit, http://www.specflow.org/[specflow] and http://lettuce.it/index.html[Lettuce] test cases into a Thucydides report. For this, add the +source+ directory of test cases and +format+ (xunit, specflow or lettuce) parameters to the plugin configuration. + +-------------------- + + + ... + + net.thucydides.maven.plugins + maven-thucydides-plugin + ${thucydides.version} + + src + xunit + + + + +-------------------- + + == Running Thucydides tests from the command line You typically run Thucydides as part of the build process (either locally or on a CI server). In addition to the +webdriver.driver+ option discussed about, you can also pass a number of parameters in as system properties to customize the way the tests are run. The full list is shown here: + * *properties*: Absolute path of the property file where Thucydides system property defaults are defined. Defaults to +~/thucydides.properties+ + * *webdriver.driver*: What browser do you want your tests to run in: firefox, chrome or iexplorer. Basic support for iPhone and Android drivers is also available. * *webdriver.base.url*: The default starting URL for the application, and base URL for relative paths. @@ -2653,7 +2699,7 @@ A complete reference to Firefox's configuration settings is given http://kb.mozi * *thucydides.history*: The directory in which build history summary data is stored for each project. Each project has it's own sub-folder within this directory. Defaults to ~./thucydides. -If you want to set default values for some of these properties for your own development environment (e.g. to always activate the Firebugs plugin on your development machine), create a file called +thucydides.properties+ in your home directory, and set any default values here. These values will still be overridden by any values defined in the environment variables. An example is shown here: +If you want to set default values for some of these properties for your own development environment (e.g. to always activate the Firebugs plugin on your development machine), create a file called +thucydides.properties+ in your home directory (or any property file as defined by setting the system property +properties+), and set any default values here. These values will still be overridden by any values defined in the environment variables. An example is shown here: --------------- thucydides.activate.firebugs = true @@ -2668,6 +2714,8 @@ mvn verify -Dtags="iteration:I1" mvn verify -Dtags="color:red,flavor:strawberry" --------------- + * *narrative.format*: Set this property to 'asciidoc' to activate using http://www.methods.co.nz/asciidoc/[Asciidoc] format in narrative text. + == Integrating with issue tracking systems === Basic issue tracking integration @@ -4002,6 +4050,11 @@ Another new experimental feature introduces the ability to replace the commonly- ------------------ +=== Retrying failed tests + +Sometimes it is required to retry a failed test. This can be achieved by setting the system property +max.retries+ to the number of times you want failed tests to be retried. + + === Using Step methods to document test cases Methods in the Step library can be used to provide additional documentation for the test scenarios in Thucydides reports. You can pass valid HTML text as parameter to @Step methods in the step library. This will show up as formatted text in the reports on the step details page. The following screenshot demonstrates this.