我有一个.net 4.6 MVC应用程序和一个标准测试项目,它是由Visual Studio生成的一些控制器测试。这些都发现并通过了VS测试运行器,但是我试图让VSTS现在执行这些测试并且如果任何测试失败则使构建失败。但是,没有发现任何测试,并且我得到很多输入字符串的格式不正确'错误。 我没有在测试中改变任何东西,我所做的只是将测试任务添加到我的构建阶段。 这是完整的测试输出:
2017-11-28T09:54:11.2442325Z ##[section]Starting: Run Unit Tests
2017-11-28T09:54:11.2598856Z ==============================================================================
2017-11-28T09:54:11.2598856Z Task : Visual Studio Test
2017-11-28T09:54:11.2598856Z Description : Run tests with Visual Studio test runner
2017-11-28T09:54:11.2598856Z Version : 2.2.3
2017-11-28T09:54:11.2598856Z Author : Microsoft Corporation
2017-11-28T09:54:11.2598856Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=835764)
2017-11-28T09:54:11.2598856Z ==============================================================================
2017-11-28T09:54:14.6192312Z Run the tests locally using vstest.console.exe
2017-11-28T09:54:14.6192312Z ========================================================
2017-11-28T09:54:14.6192312Z Test selector : Test assemblies
2017-11-28T09:54:14.6192312Z Test assemblies : **\*test*.dll,!**\obj\**
2017-11-28T09:54:14.6192312Z Test filter criteria : null
2017-11-28T09:54:14.6192312Z Search folder : C:\agent\_work\1\s
2017-11-28T09:54:14.6192312Z Run settings file : C:\agent\_work\1\s
2017-11-28T09:54:14.6192312Z Run in parallel : false
2017-11-28T09:54:14.6192312Z Run in isolation : false
2017-11-28T09:54:14.6192312Z Path to custom adapters : null
2017-11-28T09:54:14.6192312Z Other console options : null
2017-11-28T09:54:14.6192312Z Code coverage enabled : false
2017-11-28T09:54:14.6192312Z VisualStudio version selected for test execution : latest
2017-11-28T09:54:16.7609946Z ========================================================
2017-11-28T09:54:19.1015214Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @C:\agent\_work\_temp\18c48b81-d422-11e7-8218-574cad38a3a3.txt
2017-11-28T09:54:26.1576050Z Microsoft (R) Test Execution Command Line Tool Version 15.0.26228.0
2017-11-28T09:54:26.1576050Z Copyright (c) Microsoft Corporation. All rights reserved.
2017-11-28T09:54:26.1576050Z
2017-11-28T09:54:26.1576050Z vstest.console.exe
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
2017-11-28T09:54:26.1576050Z /logger:"trx"
2017-11-28T09:54:26.1576050Z /TestAdapterPath:"C:\agent\_work\1\s"
2017-11-28T09:54:29.0388328Z Starting test execution, please wait...
2017-11-28T09:54:35.4463920Z Warning: Input string was not in a correct format.
2017-11-28T09:54:35.4463920Z
2017-11-28T09:54:35.8082157Z Warning: Unable to load types from the test source 'C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll'. Some or all of the tests in this source may not be discovered.
2017-11-28T09:54:35.8082157Z
2017-11-28T09:54:35.8394672Z Warning: Input string was not in a correct format.
2017-11-28T09:54:35.8394672Z
2017-11-28T09:54:36.1206800Z Warning: Input string was not in a correct format.
2017-11-28T09:54:36.1206800Z
2017-11-28T09:54:36.1676432Z Warning: Input string was not in a correct format.
2017-11-28T09:54:36.1676432Z
2017-11-28T09:54:36.3706773Z Warning: Unable to load types from the test source 'C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll'. Some or all of the tests in this source may not be discovered.
2017-11-28T09:54:36.3706773Z
2017-11-28T09:54:37.0547894Z Warning: No test is available in C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
2017-11-28T09:54:37.0547894Z
2017-11-28T09:54:37.0700167Z
2017-11-28T09:54:37.6168898Z 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
2017-11-28T09:54:37.6168898Z
2017-11-28T09:54:38.6066846Z ##[warning]No results found to publish.
2017-11-28T09:54:38.6066846Z ##[section]Finishing: Run Unit Tests
有没有人遇到过这个?我有点假设VSTS中的标准Visual Studio测试任务默认运行VS2017生成的标准测试项目! 感谢
答案 0 :(得分:1)
VSTS中为Visual Studio Test提供的模板将测试程序集参数默认为:
public class HomePage extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener{
TextView textViewMovemnet;
EditText editTextDistance, editTextSpeed, editTextTimeInterval;
Button buttonHistory;
LocationManager locationManager;
GoogleApiClient mLocationClient;
LocationListener mListener;
String vehicle, vehicleCat;
double lat, lon;
double carbonDioxideVal;
double distance, speed;
double carbonFootprint;
double x1, x2, y1, y2, t1, t2;
double x_Diff, y_Diff, timeInterval;
double total_TimeIntervals = 0;
double total_DistanceMoved = 0;
double avg_Speed = 0;
CountDownTimer timer;
double finishTime;
String userMail;
DatabaseReference dbref;
DatabaseReference dbref_Profile;
double bicycle[] = {10, 15};
double motorcycle[] = {15, 100};
double car[] = {30, 120};
double bus[] = {25, 80};
double truck[] = {25, 40};
double metro[] = {15, 40};
//////////////
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_page);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
textViewMovemnet = (TextView) findViewById(R.id.textViewMovement);
editTextDistance = (EditText) findViewById(R.id.editTextDistance);
editTextSpeed = (EditText) findViewById(R.id.editTextSpeed);
editTextTimeInterval = (EditText) findViewById(R.id.editTextTimeInterval);
buttonHistory = (Button) findViewById(R.id.buttonHistory);
dbref = FirebaseDatabase.getInstance().getReference().child("UserTrackingData");
dbref_Profile = FirebaseDatabase.getInstance().getReference().child("UserProfileData");
//GPS Enabled ?
LocationManager locationManager;
String context = Context.LOCATION_SERVICE;
locationManager = (LocationManager) getSystemService(context);
if (!locationManager.isProviderEnabled( LocationManager.GPS_PROVIDER )) {
// Build the alert dialog
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(this);
builder.setTitle("Location Services Not Active");
builder.setMessage("Please enable Location Services and GPS");
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialogInterface, int i) {
// Show location settings when the user acknowledges the alert dialog
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(intent);
}
});
builder.setNegativeButton("No", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(getApplicationContext(), "Cannot use app without GPS", Toast.LENGTH_SHORT).show();
}
});
Dialog alertDialog = builder.create();
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();
}
/// =================================== ///
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
///// Retrieve user email from mainActivity
Bundle emailData = getIntent().getExtras();
if (emailData == null) {
return;
}
userMail = emailData.getString("userEMail");
TextView txtUID = (TextView) findViewById(R.id.textViewUId);
txtUID.setText(userMail);
/// End retrieve ///
}
//Network available ?
public boolean isNetworkAvailable() {
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.home_page, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
Intent i = new Intent(HomePage.this, UserProfileActivity.class);
i.putExtra("userEMail", userMail);
startActivity(i);
return true;
}
return super.onOptionsItemSelected(item);
}
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_camera) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
@Override
public void onConnected(@Nullable Bundle bundle) {
mListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
lat = location.getLatitude();
lon = location.getLongitude();
if(String.valueOf(lat).isEmpty()){
lat = 0;
}
if(String.valueOf(lon).isEmpty()){
lon = 0;
}
// Toast.makeText(HomePage.this, "Location: " + location.getLatitude() + " - " + location.getLongitude(), Toast.LENGTH_SHORT).show();
}
};
LocationRequest request = LocationRequest.create();
request.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
request.setInterval(4000);
request.setFastestInterval(1000);
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
else {
LocationServices.FusedLocationApi.requestLocationUpdates(mLocationClient, request, mListener);
}
}
@Override
public void onConnectionSuspended(int i) {
return;
}
@Override
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
return;
}
@Override
protected void onPause() {
super.onPause();
LocationServices.FusedLocationApi.removeLocationUpdates(mLocationClient, mListener);
}
@Override
protected void onStart() {
super.onStart();
firebaseRead(); // call to fetch fm db
}
//Firebase Read//
public void firebaseRead(){
dbref_Profile.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for(DataSnapshot ds : dataSnapshot.getChildren()) {
String emailAdd = ds.child("email").getValue(String.class);
int userAge = Integer.parseInt(ds.child("age").getValue(String.class));
String fname = ds.child("firstname").getValue(String.class);
String lname = ds.child("lastname").getValue(String.class);
String vehicleType = ds.child("vehicle").getValue(String.class);
String vehCat = ds.child("vehicleCateg").getValue(String.class);
/* Toast.makeText(HistoryActivity.this, emailAdd + " - " + String.valueOf(avgSpeed) + " - " + String.valueOf(totalDist) + " - " +
String.valueOf(totalTime) + " - " + currDate, Toast.LENGTH_SHORT).show(); */
if(emailAdd.equals(userMail)){
//String listStr = emailAdd + "|" + currDate + "|" + totalDist + "|" + avgSpeed + "|" + totalTime;
// userDataArr.add(listStr);
vehicle = vehicleType;
vehicleCat = vehCat;
// Toast.makeText(HomePage.this, vehicle + " - " + vehicleCat, Toast.LENGTH_SHORT).show();
}
}//
}
@Override
public void onCancelled(DatabaseError databaseError) {
return;
}
});
} // End firebaseRead
@Override
protected void onResume() {
super.onResume();
/// Location
mLocationClient = new GoogleApiClient.Builder(this)
.addApi(LocationServices.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
mLocationClient.connect();
/////////
// Start timer
timer = new CountDownTimer(6000, 1000) {
public void onTick(long millisUntilFinished) {
if(((millisUntilFinished/1000) == 4)){
x1 = lat;
y1 = lon;
t1 = millisUntilFinished/1000;
}
if(((millisUntilFinished/1000) == 1)){
x2 = lat;
y2 = lon;
t2 = millisUntilFinished/1000;
//timeInterval = t2 - t1;
BigDecimal bd1 = new BigDecimal(x1);
bd1 = bd1.round(new MathContext(7));
x1 = bd1.doubleValue();
BigDecimal bd2 = new BigDecimal(x2);
bd2 = bd2.round(new MathContext(7));
x2 = bd2.doubleValue();
BigDecimal bd3 = new BigDecimal(y1);
bd3 = bd3.round(new MathContext(7));
y1 = bd3.doubleValue();
BigDecimal bd4 = new BigDecimal(y2);
bd4 = bd4.round(new MathContext(7));
y2 = bd4.doubleValue();
x_Diff = Math.abs(x2) - Math.abs(x1);
x_Diff = Math.abs(x_Diff);
y_Diff = Math.abs(y2) - Math.abs(y1);
y_Diff = Math.abs(y_Diff);
// Toast.makeText(getApplicationContext(), "x_Diff: " + x_Diff + "; y-diff: " + y_Diff, Toast.LENGTH_SHORT).show();
// User Vehicle info
// CAR
if(vehicle.equals("Car") && vehicleCat.equals("Small")){
carbonDioxideVal = 0.14545;
}
if(vehicle.equals("Car") && vehicleCat.equals("Medium")){
carbonDioxideVal = 0.1738;
}
if(vehicle.equals("Car") && vehicleCat.equals("Average")){
carbonDioxideVal = 0.17887;
}
if(vehicle.equals("Car") && vehicleCat.equals("Large")){
carbonDioxideVal = 0.21834;
}
// END CAR /////////////
// Van //
if(vehicle.equals("Van") && vehicleCat.equals("Small")){
carbonDioxideVal = 0.14545;
}
if(vehicle.equals("Van") && vehicleCat.equals("Medium")){
carbonDioxideVal = 0.1738;
}
if(vehicle.equals("Van") && vehicleCat.equals("Average")){
carbonDioxideVal = 0.17887;
}
if(vehicle.equals("Van") && vehicleCat.equals("Large")){
carbonDioxideVal = 0.21834;
}
// END Van ////////////////////
// Motorbike //
if(vehicle.equals("Motorbike") && vehicleCat.equals("Small")){
carbonDioxideVal = 0.08474;
}
if(vehicle.equals("Motorbike") && vehicleCat.equals("Medium")){
carbonDioxideVal = 0.10323;
}
if(vehicle.equals("Motorbike") && vehicleCat.equals("Average")){
carbonDioxideVal = 0.11662;
}
if(vehicle.equals("Motorbike") && vehicleCat.equals("Large")){
carbonDioxideVal = 0.13542;
}
// END Motorbike //////////////////
// End User Vehicle info
distance = Math.sqrt(Math.pow((x2 - x1),2) + Math.pow((y2 - y1), 2));
carbonFootprint = distance * carbonDioxideVal;
speed = distance / 3;
// Public transport
if((speed >= 4.5) && (speed <= 8)){
vehicle = "Bus";
vehicleCat = "Long vehicle";
}
if((speed >= 8.5) && (speed <= 12.5)){
vehicle = "Metro";
vehicleCat = "Long vehicle";
}
// End Public transport
timeInterval = t2 - t1;
timeInterval = Math.abs(timeInterval);
editTextDistance.setText(String.valueOf(distance));
editTextSpeed.setText(String.valueOf(speed));
editTextTimeInterval.setText(String.valueOf(timeInterval));
if((speed == 0.0 || speed < 0.00005)){
//// Current time ////
DateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
Date today = Calendar.getInstance().getTime();
String reportDate = df.format(today);
///
textViewMovemnet.setText("still");
avg_Speed = total_DistanceMoved / total_TimeIntervals;
UserTrackData userData = new UserTrackData(userMail, reportDate, String.valueOf(total_DistanceMoved), String.valueOf(total_TimeIntervals), String.valueOf(avg_Speed), String.valueOf(carbonFootprint), vehicle, vehicleCat);
if(String.valueOf(total_DistanceMoved).equals("0.0") || String.valueOf(total_TimeIntervals).equals("0.0") || String.valueOf(avg_Speed).equals("NaN")){
return;
}
dbref.push().setValue(userData);
/* if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) || !userMail.isEmpty() || !reportDate.isEmpty()
|| !String.valueOf(total_DistanceMoved).isEmpty() || !String.valueOf(total_TimeIntervals).isEmpty() ||
!String.valueOf(avg_Speed).isEmpty() || !String.valueOf(carbonFootprint).isEmpty() || !vehicle.isEmpty() ||
!vehicleCat.isEmpty()){
dbref.push().setValue(userData);
}
else {
return;
} */
// Toast.makeText(HomePage.this, "final: " + total_DistanceMoved + " ; " + total_TimeIntervals + " ; " + avg_Speed, Toast.LENGTH_SHORT).show();
avg_Speed = total_DistanceMoved = total_TimeIntervals = 0;
}
else {
textViewMovemnet.setText("moving");
total_DistanceMoved += distance;
total_TimeIntervals += timeInterval;
}
}
finishTime = (millisUntilFinished/1000);
}
public void onFinish() {
//Toast.makeText(getApplicationContext(), "Receive done" + finishTime, Toast.LENGTH_SHORT).show();
this.start();
}
}.start();
Toast.makeText(getApplicationContext(), "Tracking started", Toast.LENGTH_SHORT).show();
}
public void viewHistory(View view){
Intent i = new Intent(HomePage.this, HistoryActivity.class);
i.putExtra("userEMailAddr", userMail);
startActivity(i);
}
不幸的是,其他程序集可能潜入搜索路径。尝试将测试程序集调整为以下内容:
**\*test*.dll
!**\*TestAdapter.dll
!**\obj\**