I have below error when try to execute integration tests under VSTS CD-task Visual Studio Test
.
No test is available in D:\a\r1\a\SiteSearchFramework\e2e\XXX.SiteSearch.EndToEnd.Integration.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again
I tried few options in below solution, didn't work though.
Logs:
2018-12-30T01:15:07.5727307Z ##[section]Starting: VsTest - End2End Tests
2018-12-30T01:15:07.5735098Z ==============================================================================
2018-12-30T01:15:07.5735255Z Task : Visual Studio Test
2018-12-30T01:15:07.5735424Z Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VsTest) runner. Test frameworks that have a Visual Studio test adapter such as MsTest, xUnit, NUnit, Chutzpah (for JavaScript tests using QUnit, Mocha and Jasmine), etc. can be run. Tests can be distributed on multiple agents using this task (version 2).
2018-12-30T01:15:07.5735595Z Version : 2.144.9
2018-12-30T01:15:07.5735680Z Author : Microsoft Corporation
2018-12-30T01:15:07.5735860Z Help : [More information](https://go.microsoft.com/fwlink/?LinkId=835764)
2018-12-30T01:15:07.5735989Z ==============================================================================
2018-12-30T01:15:08.7136918Z SystemVssConnection exists true
2018-12-30T01:15:08.7303782Z SystemVssConnection exists true
2018-12-30T01:15:08.7401053Z Running tests using vstest.console.exe runner.
2018-12-30T01:15:08.7401220Z ======================================================
2018-12-30T01:15:08.7401424Z Test selector : Test assemblies
2018-12-30T01:15:08.7401563Z Test filter criteria : null
2018-12-30T01:15:08.7401702Z Search folder : D:\a\r1\a
2018-12-30T01:15:08.8673368Z Run in parallel : false
2018-12-30T01:15:08.8673783Z Run in isolation : false
2018-12-30T01:15:08.8674157Z Path to custom adapters : D:\a\r1\a
2018-12-30T01:15:08.8675167Z Other console options : null
2018-12-30T01:15:08.8675533Z Code coverage enabled : false
2018-12-30T01:15:08.8676084Z Diagnostics enabled : true
2018-12-30T01:15:08.8676957Z SystemVssConnection exists true
2018-12-30T01:15:08.8680294Z Run the tests locally using vstest.console.exe
2018-12-30T01:15:08.8680531Z ========================================================
2018-12-30T01:15:08.8680903Z Test selector : Test assemblies
2018-12-30T01:15:08.8681301Z Test assemblies : **\*\*.EndToEnd.Integration.Tests.dll
2018-12-30T01:15:08.8681656Z Test filter criteria : null
2018-12-30T01:15:08.8682253Z Search folder : D:\a\r1\a
2018-12-30T01:15:08.8682609Z Run settings file : D:\a\r1\a
2018-12-30T01:15:08.8683225Z Run in parallel : false
2018-12-30T01:15:08.8683646Z Run in isolation : false
2018-12-30T01:15:08.8686856Z Path to custom adapters : D:\a\r1\a
2018-12-30T01:15:08.8689056Z Other console options : null
2018-12-30T01:15:08.8689537Z Code coverage enabled : false
2018-12-30T01:15:08.8689740Z Diagnostics enabled : false
2018-12-30T01:15:08.8690648Z Rerun failed tests: false
2018-12-30T01:15:09.1368849Z VisualStudio version selected for test execution : toolsInstaller
2018-12-30T01:15:09.4782611Z ========================================================
2018-12-30T01:15:09.4808305Z ======================================================
2018-12-30T01:15:09.4945232Z [command]C:\hostedtoolcache\windows\VsTest\16.0.0-preview-20181205-02\x64\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe @D:\a\_temp\5987b5c1-0bd0-11e9-ab8a-2da31cef68f3.txt
2018-12-30T01:15:09.6112080Z Microsoft (R) Test Execution Command Line Tool Version 16.0.0-preview-20181205-02
2018-12-30T01:15:09.6112672Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-12-30T01:15:09.6112863Z
2018-12-30T01:15:09.6577532Z vstest.console.exe
2018-12-30T01:15:09.6578059Z "D:\a\r1\a\SiteSearchFramework\e2e\XXX.SiteSearch.EndToEnd.Integration.Tests.dll"
2018-12-30T01:15:09.6578280Z /logger:"trx"
2018-12-30T01:15:09.6578485Z /TestAdapterPath:"D:\a\r1\a"
2018-12-30T01:15:11.6317213Z Starting test execution, please wait...
2018-12-30T01:15:14.2322930Z No test is available in D:\a\r1\a\SiteSearchFramework\e2e\XXX.SiteSearch.EndToEnd.Integration.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
2018-12-30T01:15:14.3430162Z Results File: D:\a\r1\a\TestResults\VssAdministrator_fv-az137_2018-12-30_01_15_14.trx
2018-12-30T01:15:14.3453569Z
2018-12-30T01:15:15.9470428Z ##[warning]Invalid results file. Make sure the result format of the file 'D:\a\r1\a\TestResults\VssAdministrator_fv-az137_2018-12-30_01_15_14.trx' matches 'VSTest' test results format.
2018-12-30T01:15:15.9596641Z ##[section]Async Command Start: Publish test results
2018-12-30T01:15:15.9596804Z ##[section]Async Command End: Publish test results
2018-12-30T01:15:15.9597264Z ##[section]Finishing: VsTest - End2End Tests
Test Project (XXX.SiteSearch.EndToEnd.Integration.Tests) references :
Add
xunit.runner.visualstudio
to the solution and make sure it was copied to build artifact output.