Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing test assemblies with artifacts in order to use them during functional tests on VSTS

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?

like image 396
Bruno Casarotti Avatar asked Jul 25 '18 20:07

Bruno Casarotti


People also ask

Where does Azure DevOps publish Artifacts?

Artifacts can be published at any stage of your pipeline. You can use YAML or the classic Azure DevOps editor to publish your packages. pathToPublish: the path of your artifact. This can be an absolute or a relative path.

How do you use Artifacts in Azure pipeline?

Publish NuGet packages to Azure Artifacts feeds or public registries such as nuget.org. Publish npm packages to Azure Artifacts feeds or public registries such as nmpjs.com. Publish Maven packages to Azure Artifacts feeds. Publish Python packages to Azure Artifacts feeds or PyPI.org.

What is the use of Artifacts in Azure DevOps?

Azure Artifacts enables developers to share their code efficiently and manage all their packages from one place. With Azure Artifacts, developers can publish packages to their feeds and share it within the same team, across organizations, and even publicly.


2 Answers

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

like image 144
Andy Li-MSFT Avatar answered Oct 21 '22 19:10

Andy Li-MSFT


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.

like image 35
Halling Avatar answered Oct 21 '22 20:10

Halling