Yes, thanks, I did find the results under target\nunit-reports

Often when I am troubleshooting tests I put lots of logging in them to see what is going on, and it is just more convenient to run 'mvn test' from the console and look at the output, without having to check file afterwards.

I tried using

<plugin>
<groupId>org.apache.npanday.plugins</groupId>
<artifactId>maven-test-plugin</artifactId>
<version>1.5.0-incubating-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<parameters>
<parameter>-output:stdout</parameter>
</parameters>
</configuration>
</plugin>

but that does not seem to override the nunit-console arguments.

Cheers, Eric

On 4/16/2014 3:53 AM, Brett Porter wrote:
Hi Eric,

I realised this didn't get an answer - the output will be in the RESULTS file you see 
described in the command line. That's equivalent to the Java Surefire plugin's 
"redirect output" configuration.

Regards,
Brett

On 4 Apr 2014, at 8:11 am, Eric Kolotyluk <[email protected]> wrote:

I am having problems running NUnit tests. When I run the test via Maven I get:

[INFO] --- maven-test-plugin:1.5.0-incubating-SNAPSHOT:test (default-test) @ 
csharp-windows-elevate ---
Downloading: 
http://localhost:8081/nexus/content/groups/public/NUnit/NUnit.Framework/2.2.8.0/NUnit.Framework-2.2.8.0.pdb
[INFO] NPANDAY-148-009: Took 244ms to resolve dependencies for 
net.kolotyluk.windows:csharp-windows-elevate:dotnet-executable:0.0.2-SNAPSHOT 
with filter org.apache.maven.artifact.resolver.filter.AndArtifactFilter@3648b0
[INFO]
[WARNING] NPANDAY-126-002: Did not find path for nunit-console in 
[C:\Windows\Microsoft.NET\Framework\v2.0.50727]
[INFO]  +--[ RUNNING: cmd.exe /X /C "nunit-console 
D:\Users\Eric\Software\Project\Repositories\csharp-windows-elevate\target/test-assemblies\csharp-windows-elevate-test.dll
 
-xml:D:\Users\Eric\Software\Project\Repositories\csharp-windows-elevate\target\nunit-re
ports\TEST-csharp-windows-elevate-0.0.2-SNAPSHOT.xml 
-output:D:\Users\Eric\Software\Project\Repositories\csharp-windows-elevate\target\nunit-reports\TEST-csharp-windows-elevate-0.0.2-SNAPSHOT-RESULTS.txt
 -err:D:\Users\Eric\Software\Project\Repositories\csharp-
windows-elevate\target\nunit-reports\TEST-csharp-windows-elevate-0.0.2-SNAPSHOT-ERROR.txt
 -labels"]
[INFO]  | NUnit-Console version 2.6.3.13283
[INFO]  | Copyright (C) 2002-2012 Charlie Poole.
[INFO]  | Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. 
Vorontsov.
[INFO]  | Copyright (C) 2000-2002 Philip Craig.
[INFO]  | All Rights Reserved.
[INFO]  |
[INFO]  | Runtime Environment -
[INFO]  |    OS Version: Microsoft Windows NT 6.2.9200.0
[INFO]  |   CLR Version: 2.0.50727.8000 ( Net 3.5 )
[INFO]  |
[INFO]  | ProcessModel: Default    DomainUsage: Single
[INFO]  | Execution Runtime: net-3.5
[INFO]  |
[INFO]  | Tests run: 2, Errors: 0, Failures: 0, Inconclusive: 0, Time: 
0.158604051638454 seconds
[INFO]  |   Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
[INFO]  |
[INFO]  +--[ DONE ]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.621s
[INFO] Finished at: Thu Apr 03 13:42:10 PDT 2014
[INFO] Final Memory: 28M/1963M
[INFO] ------------------------------------------------------------------------

And there is no console output from my tests. Is there something special I have 
to configure in my pom.xml to get the console output? I cannot seem to find any 
documentation for

<groupId>org.apache.npanday.plugins</groupId>
<artifactId>maven-test-plugin</artifactId>
<version>1.5.0-incubating-SNAPSHOT</version>

Whereas when I run

   nunit-console target\test-assemblies\csharp-windows-elevate-test.dll

Directly my test output appears on the console. When I run 'mvn test' on my 
Java projects, there is console output from the tests by default. Maybe the 
expected behavior of NUnit is different than JUnit???

Cheers, Eric
--
Brett Porter   @brettporter
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter


Reply via email to