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

笑着哭i 提交于 2019-12-13 16:13:42

问题


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?


回答1:


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.




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/51527058/publishing-test-assemblies-with-artifacts-in-order-to-use-them-during-functional

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