Skip to content

ursenzler/xBehaveReportGenerator

Repository files navigation

nuget version issues

xBehaveReportGenerator

Creates a (markdown) report from xBehave specs.

Install

Install the report generator as a global tool with:

dotnet tool install --global xBehaveReportGenerator

Create a trx file

Run the test runner with the trx logger enabled:

dotnet test c:\your\specs.csproj --logger:trx -r c:\your\output\folder

run

Run the report generator with:

xBehaveReportGenerator -i c:\your\output\folder\trace.trx -o c:\your\output\folder\report.md

CLI options

--input, -i <path>    specify an input trx file created with `dotnet test c:\your\spec\assembly.csproj --logger:trx -r c:\your\output\folder`.
--output, -o <path>   specify the output report file.
--title, -t [<title>] an optional title for the report
--help                display this list of options.

Sample

The xBehave report generator will generate from this scenarios:

namespace Sample
{
    public class SimpleSample
    {
        [Background]
        public void Background()
        {
            "some background".x(() => { });
        }

        [Scenario]
        public void SimpleScenario()
        {
            "a value exists".x(() => { });

            "when the value is changed".x(() => { });

            "the value should be changed".x(() => { });
        }

        [Scenario]
        public void AnotherSimpleScenario(
            string value)
        {
            "another value exists".x(() => { });

            "when the other value is changed".x(() => { });

            "the other value should be changed".x(() => { });

            "the other value should really be changed".x(() => { });
        }
    }
}

this markdown report:

Sample

SimpleSample

AnotherSimpleScenario

  1. (Background) some background
  2. another value exists
  3. when the other value is changed
  4. the other value should be changed
  5. the other value should really be changed

SimpleScenario

  1. (Background) some background
  2. a value exists
  3. when the value is changed
  4. the value should be changed

The namespaces and scenarios are sorted alphabetically.

There is no indication whether the tests ran successfully or failed. I assume that the tests should always run successfully ;-)

About

Creates a (markdown) report from xBehave specs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages