Configuring MsTest with TeamCity

ぃ、小莉子 提交于 2019-12-24 08:19:22

问题


I'm using TeamCity with a Git repository and MSTest.

The step running the tests gives the following error:

[Step 4/4] No assemblies, run configuration and test metadata were found
[Step 4/4] Process exited with code 1

So the assembly path seems to be wrong.

To execute the tests I need to specify the assembly path, what I don't understand, is where my dll is supposed to be ? The Git repository does not contain the bin folder of the project, must I add it to Git ? Is there a place the dll is build before executing the tests ?

MSTest agent has been installed on the server. Here is my configuration.


回答1:


I forgot to create a MSBuild step to build the test project. As @Gintama stated, you can check if the project was built by looking in

C:\TeamCity\buildAgent\work\57e7c4dbaf38234a\

However, TeamCity does not make any difference between slashes and backslashes in the path, both work.




回答2:


How about change / to \ ^^ And be sure your assembly file's directory is right

(ex: C:\BuildAgent\work\40fa7118ff755fcc\Project\TestProject\bin\Release\yours.dll then it must be Project\TestProject\bin\Release\yours.dll)

And .dll file is created after build step



来源:https://stackoverflow.com/questions/24892511/configuring-mstest-with-teamcity

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