问题
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