MSTests Error 4.5.1

We're about to buy TeamCity, as its the best and easiest CI tool that we've tried. I just upgraded from the previous EAP to the enterprise demo to avoid service interruption, and I had hoped it would fix a problem we're having with using TeamCity for MSTests, however it hasn't.

Specifically, we have an issue where the MSTests won't run if the results file (In our case TestResults.trx) doesn't already exist. And if it *does* already exist, it doesn't update the results on either the file or the TeamCity web site, making running the tests completely useless (as we can't find out if anything failed or not). The specific error is:
[MSTest] Caught exception while running service process importData

[MSTest] <Path to file>\TestResults.trx (The system cannot find the file specified)<Path to File>\TestResults.trx (The system cannot find the file specified)
at Method)
at jetbrains.buildServer.mstest.results.XmlParserBase.parse(
at jetbrains.buildServer.mstest.results.MSTestTRXParser.parse(
at jetbrains.buildServer.mstest.results.MSTestDataProcessor.processData(
at jetbrains.buildServer.agent.impl.inspections.DataImportServiceMessage$
at jetbrains.buildServer.agent.impl.serviceProcess.impl.ThreadedServiceProcessFactory$

Another issue is for one set of our tests we require both the dll list and the test configuration field, but its a radio button. Is there a way to integrate the tests to run in the config file that I'm unaware of?

If anyone could provide some help for these issues, that would be great as this is potentially a make or break sort of thing.

Comment actions Permalink

Sorry for double posting, didn't see an edit button.

Anyway, more information, if I blank out the results file field, it still fails with the same error about not being able to find the temporary results file.

Putting an absolute path in the field also results in the same error, once again unable to find the results file.

Also, just for additional information that may or may not be useful. In the "Additional Commands" line I have /runconfig:Local.TestRun.config since I need the config file to be there.

Additional Information: It can in fact find the dlls no problem, I know this because if I manually run the MSTest set from the command line, specify a result file, then point the Results field at the that file it works just fine.

In addition, I've tried the solution of putting the full path in for the dlls and it doesn't seem to help

Update number 4: It looks like the error is being caused by my using the /runconfigfile:<configfilepath> in the Additional Commandline Parameters area, which is very interesting.

Comment actions Permalink

Could you please post an example of right mstest.exe call.What version of MSTest was it?
TeamCity will allways add /resultsfile argument to commandline. If the path is not specified in the UI, it will generate temp file for it.
After MSTest.exe exited TeamCity will parse generated .trx file to load data into TeamCity.

The workaround is to start MSTest.exe explicitly from you build script and than call TeamCity service message to import generated .trx file
into TeamCity and thus report passed/failed/ignored tests. Please see
for details.



Please sign in to leave a comment.