Tuesday, December 22, 2009

Adding Information to Fit Results

A frequently-asked question is how to add additional information to a Fit results page. There are several ways to do this, but here's a really quick and easy trick. The base Fixture class contains a table of summary information that any fixture can add to. The Summary fixture displays this information.

Here's a C# example that adds some additional information. Other languages will have different syntax, of course.

using fitlibrary; namespace fitSharp.Samples { public class SummarySample: DoFixture { public void AddLink() { TestStatus.Summary["mylink"] = "<a href=\"somewhere\">somewhere</a>"; } } }
Here's our FitNesse test page:

|add link|


No comments:

Post a Comment