VSTS Test Assemblies - No test assemblies found

2019-08-23 11:20发布

I'm attempting to run some selenium tests in my solution that are in a project called SA.SEPA.Web.UI.Selenium as part of a build definition in VSTS, but it is failing to run the Visual Studio Test task with the error...

No test assemblies found matching the pattern: **\*Selenium*.dll.

Search folder is set to - $(System.DefaultWorkingDirectory)

Preceding tasks are a nuget restore and build solution

enter image description here

Can anyone help?

2条回答
做自己的国王
2楼-- · 2019-08-23 12:01

I ran into this same error but it was a different cause, so I'm adding my solution here.

I was getting the "no test assemblies found" error when trying to run Selenium tests with VSTS as part of a build.

My problem turned out to be that the test assemblies were not checked into change control (git, through VS2017), and therefore were not part of the build. The folders that contain the test assemblies were ignored during my original check-in by default. Once I added those folders to my repository, the build could find the tests and run them.

查看更多
Evening l夕情丶
3楼-- · 2019-08-23 12:08

You are specifying $(System.DefaultWorkingDirectory) as the search folder. By default (unless overridden), this points to the Source folder on the Agent. If you are instructing MSBuild (using the OutDir parameter) to output your assemblies in a specific location then you should use that location.

Edit: If this is an On-premises Agent, it should also be running in interactive mode (not service) if you want to execute any UI tests

查看更多
登录 后发表回答