Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.

Running scenarios

Adam Ralph edited this page Sep 29, 2013 · 22 revisions

xBehave.net scenarios can be run using any tooling which is capable of running xUnit.net tests.

This includes, but is not restricted to:

When an xBehave.net scenario is executed, an xUnit.net test command is generated for each step in the scenario. The scenario only succeeds if every step succeeds.

As soon as one step fails, all remaining steps in the scenario are not executed and are marked as failures. This behaviour can be overridden, see Continuing step execution after failure.

If the example shown in Quickstart is executed using xunit.console.clr4.exe, the html output is as follows:-

xbehave.xunit.console.html.png

Depending on how your test runner works, you may have an equivalent output in a GUI or in the VS console.

The name of each test command consists of the containing type name, scenario name, a three part numeric used for ordering the output (see below) and the step description.

If a step fails, you will see a message identifying that step and all subsequent steps which were also marked as failures. E.g.

xbehave.xunit.console.html.fail.png

Three part numeric

The three part numeric is used to order the test output and is in the form {method call #}.{isolated step #}.{step #}.

The first number, (method call #) is incremented for each set of example values passed to the scenario method (see Scenarios with examples). If there are are no example values then this is always 01.

The second number (isolated step #) is incremented each time an isolated step is encountered and executed (see Isolated steps). If there are no isolated steps then this is always 01.

The third number (step #) is incremented for each step.

Clone this wiki locally