Nant script does not display unit test details

Can someone tell me why my build script (nant) is not displaying unit test data in the command prompt window? I have a verbose set for true, but it doesn't want to display any details about my unit tests. Here's the goal:

<target name="run-unit-tests" depends="compile, move.assemblies.for.tests, rebuildDatabase">
        <mkdir dir="${tests.output.dir}" />

        <nunit2 haltonfailure="true" failonerror="true" verbose="true">
            <formatter type="Xml" extension=".xml" outputdir="${tests.output.dir}" usefile="true" />
            <test assemblyname="${test.assembly.file}" />
        </nunit2>
    <echo message="Unit Testing Done!" />
    </target>

      

The command line window simply displays this:

[mkdir] Creating directory 'C:\Projects\TestProject\build\artifacts\UnitTestOutput'.
[echo] Unit Testing Done!
build:
BUILD SUCCEEDED

      

Did I miss something?

Thanks!

+1


a source to share


2 answers


I found the answer. I looked at the source for CodeCampServer and saw the line

<formatter type="Plain" />

      

and added it to my build script so it looks like this:



<nunit2 haltonfailure="true" failonerror="true" verbose="true">
            <formatter type="Xml" extension=".xml" outputdir="${tests.output.dir}" usefile="true" />
      <formatter type="Plain" />
            <test assemblyname="${test.assembly.file}" />
        </nunit2>

      

and now it displays the details.

Sorry to ask the question prematurely, but at least it might help someone in the future if they have a similar problem.

+1


a source


Is there a log file in $ {tests.output.dir}? If so, what if you set usefile to false and enter "Plain"?



0


a source







All Articles