Error while executing Run Functional Test task in VSTS

白昼怎懂夜的黑 提交于 2019-12-06 07:16:27

We've run into a similar problem when trying to run tests direction from an MTM test plan using the "Run Functional Tests" build step but referencing test cases that had associated automation which linked to NUnit test cases.

It appears that the "Run Functional Tests" build step is somehow using vstest.console.exe on the back end to execute the tests on the Test Agent. vstest.console by default does not know how to run NUnit tests and if running from the command line, one would use /TestAdapterPath:. Since this isn't possible from the build, we need vstest.console to know by default how to execute NUnit tests.

To work around this problem, as part of building the test solution before deploying to the remote Test Agent machine, we've included the NuGet package for the NUntTestAdapter. This should download the following DLLs:

  • nunit.core.dll
  • nunit.core.interfaces.dll
  • nunit.util.dll
  • NUnit.VisualStudio.TestAdapter.dl

We then deploy these DLLs to the remote machine to the following location:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions

From that point on, you should be able to execute your tests from either vstest.console.exe directly on your test agent without having a reference to /TestAdapterPath or the build (since it's using vstest.console as part of "Run Functional Tests") will attempt to use that adapter to pickup and run NUnit tests.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!