Modifying results XML output within test methods

Asked by JeremyEllsworth

Is there a way to allow a test method to modify the results XML output? For example, this is the current output of a test:

<test-case name="TestTestProject.UnitTest2.TestMethod2" executed="True" success="False" time="0.004" asserts="0">
  <failure>
    <message><![CDATA[System.ApplicationException was expected]]></message>
    <stack-trace />
  </failure>
</test-case>

Compared to what I'd like to have:

<test-case name="TestTestProject.UnitTest2.TestMethod2" executed="True" success="False" time="0.004" asserts="0">
  <failure>
    <message><![CDATA[System.ApplicationException was expected]]></message>
    <stack-trace />
  </failure>
  <text-output>
      <![CDATA[arbitrary text output goes here]]>
  </text-output>
</test-case>

Or something similar to that. The arbitrary output would contain, e.g., stdout, stderr.

Question information

Language:
English Edit question
Status:
Solved
For:
NUnit Framework Edit question
Assignee:
No assignee Edit question
Solved by:
Charlie Poole
Solved:
Last query:
Last reply:
Revision history for this message
Best Charlie Poole (charlie.poole) said :
#1

There's not currently a way to do it. Including text output by the test in the xml as you describe is a requested feature that will be in the 3.0 series.

Revision history for this message
JeremyEllsworth (staque) said :
#2

Sounds good; I look forward to 3.0.

Revision history for this message
JeremyEllsworth (staque) said :
#3

Thanks Charlie Poole, that solved my question.