Yesterday I released “FAKE – F# Make” version 0.14 with xUnit.net support. The usage is very easy and similar to the usage of NUnit:
Target "xUnitTest" (fun () ->
let testAssemblies =
!+ (testDir + @"\Test.*.dll")
|> Scan
xUnit
(fun p ->
{p with
ShadowCopy = false;
HtmlPrefix = testDir})
testAssemblies
)
This sample works perfectly with TeamCity and creates a html-page per test project in addition:
If you want to publish the xUnit.net test results in CruiseControl.NET just modify the build script a little:
Target "xUnitTest" (fun () ->
let testAssemblies =
!+ (testDir + @"\Test.*.dll")
|> Scan
xUnit
(fun p ->
{p with
ShadowCopy = false;
HtmlPrefix = testDir;
XmlPrefix = testDir })
testAssemblies
)
Now follow the steps in the CrusieControl.NET documentation. You will need to download the xUnitSummary.xsl file and save it to your webdashboard directory. If everything works correctly you should see something like this:
Tags: CruiseControl.NET, F#, F-sharp Make, Fake, nunit, xUnit.net. TeamCity