Code Monkey home page Code Monkey logo

specresults.webapp's Introduction

Attention: this project was formerly known as SpecFlow.Reporting.WebApp. This is not an offical SpecFlow package and the name clashed with some of the official SpecFlow packages/namespace. Therefor it was renamed to SpecResults.WebApp

All previous published versions of SpecFlow.Reporting.WebApp are still available on NuGet.org, alltough they aren't listed anymore.

WebApp reporter Build status

NuGet: SpecResults.WebApp

Usage

Make your existing StepDefinitions class inherit from SpecResults.ReportingStepDefinitions

Initialize and add the reporter 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()
	{
		var webApp = new WebAppReporter();
		webApp.Settings.Title = "WebAppReporter Showcase";
		
		Reporters.Add(webApp);

		Reporters.FinishedReport += (sender, args) =>
		{
			var reporter = args.Reporter as WebAppReporter;
			if (reporter != null)
			{
				reporter.WriteToFolder("app", true);
			}
		};
	}
}	

Reading the report

In order to browser the web app report, you must host the file into a web browser. Here is an example of hosting it with node.js. Simple go to the app folder and do the following :

Install connect and serve-static with NPM

$ npm install connect serve-static

Create server.js file with this content:

var connect = require('connect');
var serveStatic = require('serve-static');
connect().use(serveStatic(__dirname)).listen(8080);

Run with Node.js

$ node server.js

You can now go to http://localhost:8080/yourfile.html

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.