|
Obviously this functionality does exist in xunit.net out of the box (see feature request http://xunit.codeplex.com/workitem/5648)
However, your solution is documented here: http://salvoz.com/blog/2010/02/22/running-xunit-from-team-build-2010-and-publishing-results/
Do you understand the integration process?
- Execute tests from build xaml file
- Output to trx format (see http://salvoz.com/blog/2010/02/22/transform-xunit-to-mstest/)
- Ensure output is collected by buildserver
Integrating into TFS is both simple and hard.
The simple part is running the tests - you will need to update the your build.xaml file. Because aren't using the MSTest build runner, the easiest thing to do is put in a new Activity which is a command line runner. So work out how to execute xunit.net from
commandline. Personally, I just use Gallio for most projects because it does all this heavy lifting for me (just as ReSharper does through the GUI).
Next you'll next to transform the xml output to trx format.You need to get all this done before the build scripts pickup the trx output to integrate the test results *nicely* into build results. Sometimes, this just gets hard! I've had one project that it
just wouldn't work and we thought that I was because of some data in TFS rather than the build scripts per se.
In short, to do this on TFS is straighforward once you have it going. All the answers are google-able but the starting point for customising TFS is this blog series (http://www.ewaldhofman.nl/post/2010/04/20/Customize-Team-Build-2010-e28093-Part-1-Introduction.aspx)
and if you are learning about Worflow Activities for the build scripts Andrew Zhu's book has been the best (http://www.amazon.com/Microsoft-Windows-Workflow-Foundation-Cookbook/dp/1849680787).
Prepare yourself to soak many, many hours. Alternatively, use TeamCity and prepare to be wowed. I hope that helps and sorry I can't give a very simple download and deploy answer - that solution would be to write a nice workflow activity that could be included
in the build tasks for the xaml file.
--tb
|