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
This is the log output from the test task in my release pipeline where it says that no test assemblies were found:
My build task:
And this is my artifact package that doesnt seems to have any test assemblies, only web projects:
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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With