5
votes

I am having a really hard time trying to figure out how to properly configure functional tests on my realease pipeline. I have a solution that contains some web projects being built using the default build configuration in VSTS. The artifact is ok and I can publish them using a release pipeline. So far so good, now I want to implement functional tests using CodedUI and have them integrated on my releases. We have a development server with a vsagent that was installed when I configured the deployment group. I then installed manually a vstest agent using a tool that I have downloaded here.

I then added a new task on my release pipeline: VsTest configured as follows

enter image description here

This is the log output from the test task in my release pipeline where it says that no test assemblies were found:

enter image description here

My build task:

enter image description here

And this is my artifact package that doesnt seems to have any test assemblies, only web projects:

enter image description here

So basically, how do I publish my test assemblies in order to use them in my release pipeline? Am I doing it right packing the test assemblies together with my web projects artifacts?

3

3 Answers

4
votes

You can try to copy the Test Assemblies to $(build.artifactstagingdirectory) and publish with the artifact.

Alternately you can try to add another Copy Task and Publish Build Artifacts task or directly use Copy and Publish Build Artifacts task to copy the Test Assemblies and publish them as another Artifact.

enter image description here

2
votes

I had a related issue, but was able to fix it by changing the search folder from the template default $(System.DefaultWorkingDirectory) to $(Agent.BuildDirectory). This way I do not need to create a copy task.

My tests are located in a separate project.

0
votes

You need to publish a separate artifact containing your test assemblies.