0x4D616E75 / SpecNuts

Create cucumber.json from your SpecFlow suite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generating Gherkin JSON from your SpecFlow test suite Build status NuGet version

SpecNuts was created to get Gherkin JSON from your automated SpecFlow testsuite. With unit tests most times reporting is only interesting for developers and testers. But when practicing BDD, the output of your automated tests might be valuable for the whole development team, management and perhaps even end-users. You can use tool such as Donut to generate a better looking report from your JSON file.

Table of contents

Usage

Make your existing StepDefinitions class inherit from SpecResults.ReportingStepDefinitions

Initialize and add the reporter(s) in [BeforeTestRun] and register on one of the events to get notified when something gets reported:

[Binding]
public class StepDefinitions : ReportingStepDefinitions
{
	[BeforeTestRun]
	public static void BeforeTestRun()
	{
		Reporters.Add(new JsonReporter());
		
		Reporters.FinishedReport += (sender, args) => {
			Console.WriteLine(args.Reporter.WriteToString());
		};
	}
}	

About

Create cucumber.json from your SpecFlow suite

License:MIT License


Languages

Language:C# 95.3%Language:Gherkin 4.7%