TeamCity doubles number of MSTests on failure

Hi all,

We've noticed a strange behaviour with TeamCity 4.5.4 doubling the number of MSTests when it encounters a test failure.

For example, we have a project with 180 MSTest tests. When all of them pass, TeamCity correctly shows 180 passes. When one or more fails, however, TeamCity doubles everything, showing 358 passes and 2 failures. The build log shows 179 passes and 1 failure, as expected. So does Visual Studio if we load the .trx file.

We communicate the test results to TeamCity using a Service Message:

<echo message="##teamcity[importData type='mstest' path='${myproject.dir}\reports\unittests\mstest-results.trx']" />

We don't see the same behaviour with our NUnit projects.

.trx file, log and screenshot available on request.

Anyone else observed this behaviour? Is it something we're doing wrong or possibly a bug?

Many thanks,


Andy

3 comments
Comment actions Permalink

Could you please attach a build log and sent .trx file.
What build runner to you use?
What version of VS was it?

Thanks!

0
Comment actions Permalink

Eugene,

Thanks for the reply. This was using the NAnt runner. Visual Studio 2008 solution.

I've attached the .trx and a slightly trimmed log file. In the log you'll see that the passes/failures are reported correctly. However I did notice that TeamCity writes the message "Importing data from '...mstest-results.trx' with 'mstest' processor" twice. Could this explain the double-reporting? In a log from a successful build (i.e. no test failures) I do not see this message being written twice.

I'm almost certain there's no logic in our build scripts that could trigger this behaviour. We don't see this with our NUnit tests and we didn't see it on our CruiseControl MSTest builds.

Appreciate your thought on this.

Many thanks,


Andy



Attachment(s):
OurProject_OurProject.Dev.Build_1.0.1765.342.log
mstest-results_doublereported.trx
0
Comment actions Permalink

In you build script you may add many report files. I found that you have published your mstest result twice, and it is the reason why tests were reported twice.

I've created an issue for your request at
http://www.jetbrains.net/tracker/issue/TW-9268
Please watch/vote/have a look to it.

Thanks!

0

Please sign in to leave a comment.