I am used to XUnit.net for all my unit testing needs in my C# projects. For my personal projects I was using TeamCity as my CI server and with the right plugin, the unit tests were correctly launched and results correctly reported in TeamCity.
However for work we have the constraint to use Jenkins as our CI server. I would like to know if Jenkins correctly supports XUnit.net (and also XUnit.net theories). I have seen a plugin XUnit for Jenkins which can support various XUnit frameworks, however I have not found any guide or discussion specifically related to XUnit.net framework support in Jenkins.
I would mainly like to know if I can start implementing unit tests based on XUnit.net (with theories as well), and rest assured that Jenkins will correctly report all runned tests (and correctly consider each theory as a distinct test) ... or if I will run into issues and should go with using NUnit instead.
This plugin publishes test results of an execution of a testing tool in Jenkins.
I've been using xUnit for quite some time now, and it's my Unit testing framework of choice. It's an open source unit testing tool for . Net framework that's compatible with ReSharper, CodeRush, TestDriven.Net, and Xamarin. You can take advantage of xUnit.Net to assert an exception type easily.
Jenkins provides an out of box functionality for Junit, and provides a host of plugins for unit testing for other technologies, an example being MSTest for . Net Unit tests. If you go to the link https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin it will give the list of Unit Testing plugins available.
MSTest is concerned, the biggest difference between xUnit and the other two test frameworks (NUnit and MSTest) is that xUnit is much more extensible when compared to NUnit and MSTest. The [Fact] attribute is used instead of the [Test] attribute.
This is kind of an old question, but I think it make sense to stress it as an answer here to save some time to anyone who will be interested in it in the future:
Starting from the version 1.93 xUnit+Plugin (universal unit testing plugin for Jenkins) do support xUnit.net v2 (unit testing framework for .NET):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With