Configuring MsTest with TeamCity

2019-08-05 16:28发布

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.

enter image description here

2条回答
聊天终结者
2楼-- · 2019-08-05 16:51

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\

enter image description here

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

查看更多
Deceive 欺骗
3楼-- · 2019-08-05 16:51

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

查看更多
登录 后发表回答