views:

386

answers:

1

Hi,

Is there any way to produce visual results of NUnit tests from within TeamCity's "Tests" tab, currently my NAnt script outputs an .xml file of the results using the following task:

<nunit2 haltonfailure="false" failonerror="false" verbose="true">
  <formatter type="Xml" extension=".xml" outputdir="${tests.output.dir}" usefile="true" />
  <test assemblyname="${assemblies.output.dir}/TestApp.Tests.dll" />
</nunit2>

TIA

A: 

It can be done using TeamCity import data service message:

Print to the console the next message:

##teamcity[importData type='nunit' path='xml results path']

'xml results path' should point to the path where nunit placed the test results.

By the way, you can use TeamCity nunit launcher to execute and report tests automatically.

Elisha