Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

consuming generated xml documentation within tests
mschaad
#1 Posted : Thursday, July 21, 2016 3:13:46 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/21/2016(UTC)
Posts: 1
Location: United States of America

We generate our public API documentation for our ASP.NET WebApi project using Swashbuckle, which we have configured to pick up the generated XML documentation file that the C# compiler produces.

I would like to be able to test this feature of our app (or perhaps even unit test my comments, checking for speeling errers :-)), but I can't figure out how to how to make it work in NCrunch. It looks as if NCrunch is flipping the "produce XML documentation file" flag to false when compiling the project. Is there a way to configure NCrunch to let the compiler generate my XML documentation file so that I can consume it from my tests?
Remco
#2 Posted : Thursday, July 21, 2016 10:48:53 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting!

I have no personal experience with Swashbuckle, but my first guess would be to check that you have the pre/post build events enabled in NCrunch - http://www.ncrunch.net/documentation/reference_project-configuration_run-pre-or-post-build-events.

If this doesn't work, you may need to take a look at how Swashbuckle is tied into your build system. This means opening up your project file in a text editor and examining the XML to see how this tool is being referenced. It's possible they have code specifically designed to exclude tools like NCrunch (which you could theoretically work around).

Note that generating XML documentation on NCrunch builds will likely increase your build times significantly. It may be worth looking at ways to do this inside the test code itself so you don't add seconds to your cycle times for the majority of your tests that likely don't need it.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download