【问题标题】:xunit.runner.dnx on visual studio online no tests foundVisual Studio Online 上的 xunit.runner.dnx 未找到测试
【发布时间】:2015-06-14 11:21:04
【问题描述】:

在 Visual Studio Online 中,我有一个 dnx 项目可以工作,而且看起来都非常好。

但是,当测试项目找到测试程序集时,它没有在其中找到测试。它确实在本地的视觉工作室中工作。

这是日志

> 2015-06-10T12:44:40.4024316Z Microsoft (R) Test Execution Command Line
> Tool Version 14.0.22823.1
> 
> 6  2015-06-10T12:44:40.4034315Z Copyright (c) Microsoft Corporation. 
> All rights reserved.
> 
> 7  2015-06-10T12:44:40.9083471Z Starting test execution, please
> wait...
> 
> 8  2015-06-10T12:44:41.0261699Z Warning: Using Isolation mode to run
> the tests as diagnostic data adapters were enabled in the runsettings.
> Use the /inIsolation parameter to suppress this warning.
> 
> 9  2015-06-10T12:44:57.8605322Z Warning: No test is available in
> C:\a\2b7cb926\Anne Prototype\ANNe\artifacts\bin\Test.ANNe.Compiler\Debug\dnx451\Test.ANNe.Compiler.dll
> C:\a\2b7cb926\Anne
> Prototype\ANNe\artifacts\bin\Test.ANNe.Compiler\Debug\dnxcore50\Test.ANNe.Compiler.dll
> C:\a\2b7cb926\Anne
> Prototype\ANNe\artifacts\bin\Test.ANNe.Core\Debug\dnx451\Test.ANNe.Core.dll
> C:\a\2b7cb926\Anne
> Prototype\ANNe\artifacts\bin\Test.ANNe.Core\Debug\dnxcore50\Test.ANNe.Core.dll
> C:\a\2b7cb926\Anne
> Prototype\ANNe\artifacts\bin\Test.Console\Debug\dnx451\Test.Console.dll
> C:\a\2b7cb926\Anne
> Prototype\ANNe\artifacts\bin\Test.Console\Debug\dnxcore50\Test.Console.dll.
> Make sure that installed test discoverers & executors, platform &
> framework version settings are appropriate and try again.
> 
> 10  2015-06-10T12:44:58.0834255Z Attachments:
> 
> 11  2015-06-10T12:44:58.0874253Z  
> C:\a\2b7cb926\TestResults\daa5a111-9c85-40a3-930d-d5a511bbf1ee\buildguest_TASKAGENT-0001
> 2015-06-10 12_44_50.coverage
> 
> 12  2015-06-10T12:44:58.1054246Z Information: Additionally, you can
> try specifying '/UseVsixExtensions' command if the test discoverer &
> executor is installed on the machine as vsix extensions and your
> installation supports vsix extensions. Example: vstest.console.exe
> myTests.dll /UseVsixExtensions:true
> 
> 13  2015-06-10T12:44:58.3310571Z ##[warning]No results found to
> publish.

Runner 在 project.json 中设置

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

我现在不想使用我自己的构建服务器。

【问题讨论】:

    标签: azure-devops xunit dnx


    【解决方案1】:

    你需要在 Visual Studio 中安装一些东西才能让它工作吗?不幸的是,由于 build dev get 不属于您,您将无法运行需要插件的测试。支持 MSTest 和 nUnit。

    【讨论】:

    • 不,不需要安装任何东西......但是它确实集成到了VS测试中,它必须拾取有一个dll,不知何故它需要被告知跑步者是xunit.runner.dnx。这在 VS 本地是自动的。
    • 那么它确实需要安装年赛跑者。它是在 Nuget 还是 vsix 中实现的?
    • 我所做的只是将运行器添加到使用 nuget 的 project.json 中。我使用 powershell 脚本在构建之前安装 dnx。
    • 请描述“安装dnx”?您无权在托管构建服务器上安装任何东西。
    • & $env:USERPROFILE\.dnx\bin\dnvm install $dnxVersion -r coreclr -arch x64 -nonative works
    猜你喜欢
    • 1970-01-01
    • 2013-06-07
    • 1970-01-01
    • 2022-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多