2017-09-22 1 views
1

J'essaie de configurer une application ASP.NET sur VSTS. Je reçois une erreur sur Aucun test n'est disponible dans mon RetailerWebsite.UnitTests.dll.VSTS - Tâche de test Visual Studio échoue avec une erreur Aucun test n'est disponible

Voici les journaux:

2017-09-22T18:27:57.5945288Z ##[section]Starting: VsTest - testAssemblies 2017-09-22T18:27:57.5945288Z ============================================================================== 2017-09-22T18:27:57.5945288Z Task : Visual Studio Test 2017-09-22T18:27:57.5945288Z Description : Run tests with Visual Studio test runner 2017-09-22T18:27:57.5945288Z Version : 2.1.8 2017-09-22T18:27:57.5945288Z Author : Microsoft Corporation 2017-09-22T18:27:57.5945288Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=835764) 2017-09-22T18:27:57.5945288Z ============================================================================== 2017-09-22T18:27:59.9381761Z Run the tests locally using vstest.console.exe 2017-09-22T18:27:59.9381761Z ======================================================== 2017-09-22T18:27:59.9381761Z Test selector : Test assemblies 2017-09-22T18:27:59.9381761Z Test assemblies : **\RetailerWebsite.UnitTests.dll,!**\obj\** 2017-09-22T18:27:59.9381761Z Test filter criteria : null 2017-09-22T18:27:59.9381761Z Search folder : C:\agent\_work\4\s\src\RetailerWebsite.UnitTests\bin\Release 2017-09-22T18:27:59.9381761Z Run settings file : C:\agent\_work\4\s 2017-09-22T18:27:59.9381761Z Run in parallel : false 2017-09-22T18:27:59.9381761Z Run in isolation : false 2017-09-22T18:27:59.9381761Z Path to custom adapters : null 2017-09-22T18:27:59.9381761Z Other console options : /UseVsixExtensions:true 2017-09-22T18:27:59.9381761Z Code coverage enabled : false 2017-09-22T18:27:59.9381761Z VisualStudio version selected for test execution : 15.0 2017-09-22T18:27:59.9381761Z [command]C:\agent\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.1.8\vswhere.exe -version [15.0,16.0) -latest -products * -requires Microsoft.VisualStudio.PackageGroup.TestTools.Core -property installationPath 2017-09-22T18:27:59.9381761Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional 2017-09-22T18:27:59.9381761Z [command]C:\Windows\System32\Wbem\WMIC.exe datafile where "name='C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe'" get Version /Value 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z Version=15.0.26720.2 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:27:59.9381761Z 2017-09-22T18:28:00.2506608Z ======================================================== 2017-09-22T18:28:00.5943958Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" C:\agent\_work\4\s\src\RetailerWebsite.UnitTests\bin\Release\RetailerWebsite.UnitTests.dll /logger:trx /UseVsixExtensions:true 2017-09-22T18:28:00.5943958Z Microsoft (R) Test Execution Command Line Tool Version 15.0.26720.2 2017-09-22T18:28:00.5943958Z Copyright (c) Microsoft Corporation. All rights reserved. 2017-09-22T18:28:00.5943958Z 2017-09-22T18:28:01.7349947Z Starting test execution, please wait... 2017-09-22T18:28:02.2974670Z Warning: No test is available in C:\agent\_work\4\s\src\RetailerWebsite.UnitTests\bin\Release\RetailerWebsite.UnitTests.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again. 2017-09-22T18:28:02.2974670Z 2017-09-22T18:28:02.3287159Z 2017-09-22T18:28:02.9536971Z ##[warning]No results found to publish. 2017-09-22T18:28:02.9693206Z ##[section]Async Command Start: Telemetry 2017-09-22T18:28:02.9693206Z ##[section]Async Command End: Telemetry 2017-09-22T18:28:02.9693206Z ##[section]Async Command Start: Telemetry 2017-09-22T18:28:02.9693206Z ##[section]Async Command End: Telemetry 2017-09-22T18:28:02.9693206Z ##[section]Async Command Start: Telemetry 2017-09-22T18:28:02.9693206Z ##[section]Async Command End: Telemetry 2017-09-22T18:28:02.9693206Z ##[section]Async Command Start: Telemetry 2017-09-22T18:28:02.9693206Z ##[section]Async Command End: Telemetry 2017-09-22T18:28:02.9693206Z ##[section]Finishing: VsTest - testAssemblies

+0

Quel cadre de test utilisez-vous? Votre projet de test fait-il référence au coureur de test approprié pour ce cadre de test? –

+0

J'utilise NUnit 3.4.1 – Sameer

Répondre

2

Vous devez faire référence à l'adaptateur de test approprié comme un ensemble NuGet. Pour NUnit, le NUnit Test Adapter est ce que vous cherchez.

+0

Suis-je censé ajouter cet adaptateur à mon projet? – Sameer

+0

@Sameer Vous l'ajoutez en tant que référence via NuGet, puis assurez-vous que les références NuGet sont restaurées pendant votre processus de construction. –

+0

Salut, j'ai le même problème, mais j'utilise simplement le framework de test Visual Studio par défaut. Ai-je besoin de référencer un adaptateur de test? –