Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changeset1 #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added figs/asciidoc_narrative.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 54 additions & 1 deletion thucydides.doc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

--------------------
<reporting>
<plugins>
...
<plugin>
<groupId>net.thucydides.maven.plugins</groupId>
<artifactId>maven-thucydides-plugin</artifactId>
<version>${thucydides.version}</version>
<configuration>
<source>src</source>
<format>xunit</format>
</configuration>
</plugin>
</plugins>
</reporting>
--------------------



== 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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.

Expand Down