TFS 2015 RC Build.Preview Execute xUnit Tests

We are trying to run xUnit tests correctly using TFS 2015 RC. We are trying to access the test runner stored in our NuGet package folder, which is located in the folder with the Build Agent drop-down list.

We are trying to reference the test runner using this path in the "Path to custom test adapters" $ (Build.SourcesDirectory) \ WebIZ \ packages \ xunit.runners.1.9.2 \ tools.The build can resolve the path in order (it used to be with an invalid path message), but now he cannot find a test runner

2015-06-09T20: 05: 40.4008595Z Executing powershell script: D: \ TFS \ Build_vNext \ AgentSchlitz \ agent \ tasks \ VSTest \ 1.0.8 \ VSTest.ps1

2015-06-09T20: 05: 41.9947507Z Warning: path "D: \ TFS \ Build_vNext \ AgentSchlitz \ 1c692895 \ WebIZ \ WebIZ \ packages \ xunit.runners.1.9.2 \ tools \ 'specified in' TestAdapterPath 'does not contain test adapters, provides a valid path and try again.extensions Example: vstest.console.exe myTests.dll / UseVsixExtensions: true

What should be the correct setting for "Path to custom test adapters"? If the correct setting is: $ (Build.SourcesDirectory) \ WebIZ \ Packages \ xunit.runners.1.9.2 \ tools * $ (Build.SourcesDirectory) \ WebIZ \ packages \ xunit.runners.1.9.2 \ tools *

+4
source share
4 answers

I think you need to use XUnit 2.0 with Nuget-based runners.

Esteban Garcia, .

, , .

+4
0

, , tools\ bin\?

.

: "$(Build.SourcesDirectory)\WebIZ\packages\xunit.runners.1.9.2\bin"


Also, if you copy this path from a blog post or other source that uses non-standard double quotes, you will receive an invalid error. Just enter double quotes directly in the input field or whatever, to make sure you have raw double quotes.

0
source

I tried all combinations with the same problem that fixed for me, adding an entry to the package.config file for a test project ...

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="NUnit" version="3.5.0" targetFramework="net45" />
  <package id="NUnit3TestAdapter" version="3.5.0" targetFramework="net45" />
</packages>

Despite the fact that I referred to the Nunit3Adapter in the project and solution, the last entry there in the config should have been added manually.

0
source

All Articles