Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xUnit with TFS2015 and VisualStudio2015 doesn't find any test

I have an xUnit Test Project with the following project.json:

"dependencies": {
  "xunit": "2.1.0-beta2-*",
  "xunit.runner.dnx": "2.1.0-beta2-*"
},

"commands": {
  "test": "xunit.runner.dnx"
},

"frameworks": {
  "dnx451": { },
  "dnxcore50": {
    "dependencies": {
      "System.Collections": "4.0.10-beta-22816",
      "System.Linq": "4.0.0-beta-22816",
      "System.Threading": "4.0.10-beta-22816",
      "Microsoft.CSharp": "4.0.0-beta-22816"
    }
  }
}

My Buildserver is able to build everything correctly, but it gives me the following message by trying to test:

2015-05-17T18:41:26.0903225Z Warning: No test is available in C:\TfsData\Build\_work\c55817e8\...\artifacts\bin\

My Buildserver runs with TFS2015 and I installed VisualStudio 2015RC. I found similar questions, but only about TFS2013, which doesn't help me, because there is no TestAgent in TFS2015. Nowadays the xUnit-"Util" is included with NuGet via json file.

Testing with VisualStudio works fine, even at the server installation of VS.

Screenshot of Test Explorer inside VisualStudio

Can someone give me a hint, how to fix that issue, please?

like image 841
TimBoss Avatar asked Dec 13 '25 22:12

TimBoss


1 Answers

The DNX support in Visual Studio has very likely not made it to TFS Build yet. It does not use the standard test discovery of other xUnit.net test types, but rather something the ASP.NET team added to Visual Studio to support unit tests in any project.json-based project.

like image 141
Brad Wilson Avatar answered Dec 16 '25 00:12

Brad Wilson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!