Coder Social home page Coder Social logo

xbehavereportgenerator's Introduction

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 ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.