Configure MsTest with TeamCity

I use TeamCity with a Git repository and MSTest.

The step that runs 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 build path seems to be wrong.

To run the tests, I need to specify the build path, what I don’t understand, where should my dll be? Git repository does not contain project bin folder, should I add it to Git? Is there a place where a dll is created before running tests?

The MSTest agent was installed on the server. Here is my configuration.

enter image description here

+1
source share
2 answers

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

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

enter image description here

However, TeamCity has nothing to do between a slash and backslashes in a way, both work.

+2
source

How about changing / to \ ^^ And make sure your build file directory is right.

(for example: C: \ BuildAgent \ work \ 40fa7118ff755fcc \ Project \ TestProject \ bin \ Release \ yours.dll, then it should be Project \ TestProject \ bin \ Release \ yours.dll)

The .dll file is created after the build phase

+1
source

All Articles