Problems reporting failed tests

Hi all,
I'm having some problems while integrating TC with my custom test runner, in case of failed tests. I'm using the testFailed message, but I'm not able to see the error message (with the stack trace) in the Tests tab. Also, it reports all the tests as passed. So, it seems that the testFailed message is ignored by TC.
The output of a failing test, taken from the full build log, is something like that:

[17:04:48]: MyTest
[17:04:49]: [MyTest] ##teamcity[testFailed name='MyFixture.MyTest' message='Test has failed' details='System.ArgumentNullException: Value cannot be null.
[17:04:49]: [MyTest] Parameter name: key
[17:04:49]: [MyTest] at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
[17:04:49]: [MyTest] at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
[17:04:49]: [MyTest] at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
(snip)


How can I fix this problem?

Thanks

3 comments
Comment actions Permalink

If you want to report stacktrace you should properly escape its chracters. Each \n character must be replaced with |n sequence and so on, read more on this here:  http://www.jetbrains.net/confluence/display/TCD4/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-servMsgs

0
Comment actions Permalink

Hi Pavel,
thank you for the answer. I'll try to escape correctly the characters as you pointed out.

Deimos

0
Comment actions Permalink

Hi Deimos,

                  I am using custom runner for executing the testcases and it exporting the results to an xml file. I have converted the xml file to html file and importing the html file as a separate tab in the test results page. But, i want to display test summary information, currently i am using msbuild script. I have no idea,how to send a message to teamcity. Could you please help me out in this issue and i am new to the Teamcity . If you have any sample code, can you send it me. It will be more help full for me.

Thanks in Advance
prasad

0

Please sign in to leave a comment.