{"id":874,"date":"2009-10-18T18:09:16","date_gmt":"2009-10-18T16:09:16","guid":{"rendered":"http:\/\/www.navision-blog.de\/2009\/10\/18\/xunit-support-in-fake-f-make-0-14\/"},"modified":"2009-10-18T19:03:20","modified_gmt":"2009-10-18T17:03:20","slug":"xunit-support-in-fake-f-make-0-14","status":"publish","type":"post","link":"http:\/\/www.navision-blog.de\/blog\/2009\/10\/18\/xunit-support-in-fake-f-make-0-14\/","title":{"rendered":"xUnit.net support in &ldquo;FAKE &ndash; F# Make&rdquo; 0.14"},"content":{"rendered":"<p>Yesterday I released <a href=\"http:\/\/code.google.com\/p\/fake\/\">\u201cFAKE \u2013 F# Make\u201d<\/a> version 0.14 with <a href=\"http:\/\/www.codeplex.com\/xunit\">xUnit.net<\/a> support. The usage is very easy and similar to the usage of NUnit: <\/p>\n<div style=\"font-family: courier new; background: white; color: black; font-size: 10pt\">\n<p style=\"margin: 0px\">Target <span style=\"color: maroon\">&quot;xUnitTest&quot;<\/span> (<span style=\"color: blue\">fun<\/span> () <span style=\"color: blue\">-&gt;<\/span>&#160; <\/p>\n<p style=\"margin: 0px\">&#160; <span style=\"color: blue\">let<\/span> testAssemblies = <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160; !+ (testDir + <span style=\"color: maroon\">@&quot;\\Test.*.dll&quot;<\/span>) <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160; |&gt; Scan<\/p>\n<p style=\"margin: 0px\">&#160;<\/p>\n<p style=\"margin: 0px\">&#160; xUnit <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160; (<span style=\"color: blue\">fun<\/span> p <span style=\"color: blue\">-&gt;<\/span> <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160;&#160; {p <span style=\"color: blue\">with<\/span> <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ShadowCopy = <span style=\"color: blue\">false<\/span>;<\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HtmlPrefix = testDir}) <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160; testAssemblies&#160; <\/p>\n<p style=\"margin: 0px\">)<\/p>\n<\/p><\/div>\n<p>This sample works perfectly with <a href=\"http:\/\/www.jetbrains.com\/teamcity\/\">TeamCity<\/a> and creates a html-page per test project in addition:<\/p>\n<p><img loading=\"lazy\" class=\"bordered\" title=\"TeamCity output\" alt=\"TeamCity output\" src=\"http:\/\/www.navision-blog.de\/images\/xUnitsupportinFAKEFMake0.14_FF4A\/image.png\" width=\"500\" height=\"279\" \/><\/p>\n<p><img loading=\"lazy\" class=\"bordered\" title=\"HMTL output\" alt=\"HMTL output\" src=\"http:\/\/www.navision-blog.de\/images\/xUnitsupportinFAKEFMake0.14_FF4A\/image_3.png\" width=\"500\" height=\"135\" \/><\/p>\n<p>If you want to publish the xUnit.net test results in <a href=\"http:\/\/confluence.public.thoughtworks.org\/display\/CCNET\/Welcome+to+CruiseControl.NET\">CruiseControl.NET<\/a> just modify the build script a little:<\/p>\n<div style=\"font-family: courier new; background: white; color: black; font-size: 10pt\">\n<p style=\"margin: 0px\">Target <span style=\"color: maroon\">&quot;xUnitTest&quot;<\/span> (<span style=\"color: blue\">fun<\/span> () <span style=\"color: blue\">-&gt;<\/span>&#160; <\/p>\n<p style=\"margin: 0px\">&#160; <span style=\"color: blue\">let<\/span> testAssemblies = <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160; !+ (testDir + <span style=\"color: maroon\">@&quot;\\Test.*.dll&quot;<\/span>) <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160; |&gt; Scan<\/p>\n<p style=\"margin: 0px\">&#160;<\/p>\n<p style=\"margin: 0px\">&#160; xUnit <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160; (<span style=\"color: blue\">fun<\/span> p <span style=\"color: blue\">-&gt;<\/span> <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160;&#160; {p <span style=\"color: blue\">with<\/span> <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ShadowCopy = <span style=\"color: blue\">false<\/span>;<\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HtmlPrefix = testDir;<\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong>XmlPrefix = testDir<\/strong> }) <\/p>\n<p style=\"margin: 0px\">&#160;&#160;&#160; testAssemblies&#160; <\/p>\n<p style=\"margin: 0px\">)<\/p>\n<\/p><\/div>\n<p>Now follow the steps in the <a href=\"http:\/\/xunit.codeplex.com\/wikipage?title=HowToUseCcNet&amp;ProjectName=xunit\">CrusieControl.NET documentation<\/a>. You will need to download the <a href=\"http:\/\/xunit.codeplex.com\/\">xUnitSummary.xsl<\/a> file and save it to your webdashboard directory. If everything works correctly you should see something like this:<\/p>\n<p><img loading=\"lazy\" class=\"bordered\" title=\"CruisControl.NET output\" alt=\"CruisControl.NET output\" src=\"http:\/\/www.navision-blog.de\/images\/xUnitsupportinFAKEFMake0.14_FF4A\/image_4.png\" width=\"500\" height=\"300\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I released \u201cFAKE \u2013 F# Make\u201d version 0.14 with xUnit.net support. The usage is very easy and similar to the usage of NUnit: Target &quot;xUnitTest&quot; (fun () -&gt;&#160; &#160; let testAssemblies = &#160;&#160;&#160; !+ (testDir + @&quot;\\Test.*.dll&quot;) &#160;&#160;&#160;&#160;&#160; |&gt; Scan &#160; &#160; xUnit &#160;&#160;&#160; (fun p -&gt; &#160;&#160;&#160;&#160;&#160;&#160; {p with &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ShadowCopy = false; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[448,546],"tags":[569,664,545,544,219,577],"_links":{"self":[{"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/posts\/874"}],"collection":[{"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/comments?post=874"}],"version-history":[{"count":3,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/posts\/874\/revisions"}],"predecessor-version":[{"id":877,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/posts\/874\/revisions\/877"}],"wp:attachment":[{"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/media?parent=874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/categories?post=874"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/tags?post=874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}