Skip to content

Create cucumber.json from your SpecFlow suite

License

Notifications You must be signed in to change notification settings

CoverGo/SpecNuts

 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 95.3%
  • Gherkin 4.7%