0

I am trying to use the official xUnit plugin for Team City. I have tried TC 8.1.5, 9.0, and 9.1.1. I am using the latest version of xUnit.

The plugin works. I see xUnit in the build runner list, and when I examine the build log, it is clear that the test assemblies are found.

But the tests do not run.

Here is an excerpt from the build log:

I tried TC 8.1.5, then 9.1.1, and then 9.0.

In all cases, the plugin finds my tests, but it simply does not run them.

Here is an excerpt from the TC 9.0 build log:

[20:14:34] : Step 2/2: xUnit
[20:14:34]i: [Step 2/2] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_2' value='0.0']
[20:14:34] : [Step 2/2] Testing SomeLibraryTests.dll: C:\TeamCity\buildAgent\work\6dc03847e497c6d3\SomeLibraryTests\bin\Release\SomeLibraryTests.dll
[20:14:34] : [Testing SomeLibraryTests.dll] xUnit.net console test runner (64-bit .NET 4.0.30319.18063)
[20:14:34] : [Testing SomeLibraryTests.dll] Copyright (C) 2015 Outercurve Foundation.
[20:14:34] : [Testing SomeLibraryTests.dll] 
[20:14:35] : [Testing SomeLibraryTests.dll] Discovering: SomeLibraryTests
[20:14:35] : [Testing SomeLibraryTests.dll] Discovered: SomeLibraryTests
[20:14:35] : [Testing SomeLibraryTests.dll] 
[20:14:35] : [Testing SomeLibraryTests.dll] === TEST EXECUTION SUMMARY ===
[20:14:35] : [Testing SomeLibraryTests.dll] SomeLibraryTests.dll Total: 0

Please note that no tests executed.

What am I doing wrong?

Thanks, Scott

1 Answers1

0

There isn't much to go on from the log excerpt. Is the test assembly referencing xunit v1.x or v2.x, is the runner v1.x or v2.x? It could also be something to do with a framework version or assembly binding mismatch?

You could try the xunit meta-runner I wrote which uses the latest xunit console runner available from nuget.org (or your own nuget feed) rather than the embedded fixed version as the plugin does and see if the test discovery failure is down to the console runner version?

Scott Mackay
  • 1,194
  • 10
  • 34