Running scenarios - adamralph/xbehave.net GitHub Wiki

Since xBehave.net is an extension to xUnit.net, 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 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 reported as skipped.

Output

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

xUnit.net console output

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 number used for ordering the output (see below) and the step description.

Failure

If a step fails, you will see a message identifying that step and all subsequent steps will be skipped. E.g.

xUnit.net console output failure

Ordering number

The ordering number is used to order steps in the test output. It starts at 1 and is incremented for each step in a scenario. It is shown with a single leading zero so that up to 99 steps are ordered correctly within a scenario.