NOTE - This project is now unsupported. The current build is still available for use, and feel free to fork this code base. There is an alternative plugin that is part of the Team City Meta Runner Power Pack, and Scott Mackay has an example in this blog post. With xUnit becoming more central in .NET core I'd expect better support to come into a future version of TeamCity.
Easily run xUnit tests using Team City.
This Team City plugin adds an extra option when creating a Build Step in Team City 'xUnit'. This is currently quite simple and only allows the selection of one DLL containing xUnit tests to be run. Wildcards and multiple assemblies are not supported (as this is not supported by the xUnit console runner).
The plugin will copy a version of the xUnit runner to all build agents to allow tests to be run without any additional configuration. The plugin is currently using the 2.0.0-beta-build2650 version of the xUnit console runner.
The plugin has been tested on Team City 8.0.3, but should work with any version of Team City 8.
- Download your selected package.
- From within the administration panel in TeamCity, select "Plugins List" and then "Upload plugin zip". This may require a restart of the TeamCity service, depending on version*.
- This can now be consumed just like a typical plugin.
*Since version 9.0.0 of Team City, changes to this folder are automatically detected and the plugin will be distributed to all of your build agents. Prior to version 9.0.0 you will need to restart the Team City service.
##MSBuild MSBuild is supported and a build script is supplied that will zip the contents of the xunit2Runner up for you. It has a single dependency of MS Build Tasks
msbuild zip.msbuild /p:MSBuildCommunityTasksDirectory=[YourMSBuildTasksDirectory]