You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-users@incubator.apache.org by Eric Kolotyluk <er...@gmail.com> on 2014/04/03 21:11:02 UTC

NUnit Test Output

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

AW: AW: Can't compile a library

Posted by Lars Corneliussen // Zen <me...@lcorneliussen.de>.
The extensions lets the plugin hook in "earlier" and add packaging types and
corresponding lifecycle maps (means map initialize, compile, deploy, ++ to a
set of plugins)

-----Ursprüngliche Nachricht-----
Von: Eric Kolotyluk [mailto:eric.kolotyluk@gmail.com] 
Gesendet: Montag, 7. April 2014 19:17
An: npanday-users@incubator.apache.org
Betreff: Re: AW: Can't compile a library

Thanks, that did the trick.

Now I feel stupid because I had

     <extensions>true</extensions>

there in the first place, but commented it out because I did not understand
what it was used for.

Cheers, Eric

On 4/7/2014 5:36 AM, Lars Corneliussen // Zen wrote:
> http://incubator.apache.org/npanday/docs/1.5.0-incubating-SNAPSHOT/plu
> gins/m
> aven-compile-plugin/usage.html



Re: AW: Can't compile a library

Posted by Eric Kolotyluk <er...@gmail.com>.
Thanks, that did the trick.

Now I feel stupid because I had

     <extensions>true</extensions>

there in the first place, but commented it out because I did not 
understand what it was used for.

Cheers, Eric

On 4/7/2014 5:36 AM, Lars Corneliussen // Zen wrote:
> http://incubator.apache.org/npanday/docs/1.5.0-incubating-SNAPSHOT/plugins/m
> aven-compile-plugin/usage.html


AW: Can't compile a library

Posted by Lars Corneliussen // Zen <me...@lcorneliussen.de>.
You need to configure the maven-compile-plugin as an extension:

http://incubator.apache.org/npanday/docs/1.5.0-incubating-SNAPSHOT/plugins/m
aven-compile-plugin/usage.html



-----Ursprüngliche Nachricht-----
Von: Eric Kolotyluk [mailto:eric.kolotyluk@gmail.com] 
Gesendet: Montag, 7. April 2014 02:32
An: npanday-users@incubator.apache.org
Betreff: Can't compile a library

When I use

<groupId>net.kolotyluk.windows.elevate</groupId>
<artifactId>elevate-common</artifactId>
<version>0.0.21-SNAPSHOT</version>
<packaging>library</packaging>

I get

D:\Users\Eric\Software\Project\Repositories\csharp-windows-elevate\elevate-c
ommon>mvn
test
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1] [ERROR]
[ERROR]   The project 
net.kolotyluk.windows.elevate:elevate-common:0.0.21-SNAPSHOT
(D:\Users\Eric\Software\Project\Repositories\csharp-windows-elevate\elevate-
common\pom.xml)
has 1 error
[ERROR]     Unknown packaging: library @ line 19, column 14
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

I have also tried

<groupId>net.kolotyluk.windows.elevate</groupId>
<artifactId>elevate-common</artifactId>
<version>0.0.21-SNAPSHOT</version>
<packaging>dotnet-library</packaging>

but that does not work either.

How does one build a library with NPanday?

Cheers, Eric


Can't compile a library

Posted by Eric Kolotyluk <er...@gmail.com>.
When I use

<groupId>net.kolotyluk.windows.elevate</groupId>
<artifactId>elevate-common</artifactId>
<version>0.0.21-SNAPSHOT</version>
<packaging>library</packaging>

I get

D:\Users\Eric\Software\Project\Repositories\csharp-windows-elevate\elevate-common>mvn 
test
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project 
net.kolotyluk.windows.elevate:elevate-common:0.0.21-SNAPSHOT 
(D:\Users\Eric\Software\Project\Repositories\csharp-windows-elevate\elevate-common\pom.xml) 
has 1 error
[ERROR]     Unknown packaging: library @ line 19, column 14
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the 
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, 
please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

I have also tried

<groupId>net.kolotyluk.windows.elevate</groupId>
<artifactId>elevate-common</artifactId>
<version>0.0.21-SNAPSHOT</version>
<packaging>dotnet-library</packaging>

but that does not work either.

How does one build a library with NPanday?

Cheers, Eric

Re: NUnit Test Output

Posted by Brett Porter <br...@apache.org>.
On 17 Apr 2014, at 1:35 am, Eric Kolotyluk <er...@gmail.com> wrote:

> 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.

Yes, this is currently configured within this file: plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java

It would certainly be worthwhile adjusting that so that console can be passed as an option, if you're interested in taking a peek at it.

- Brett

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


Re: NUnit Test Output

Posted by Eric Kolotyluk <er...@gmail.com>.
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 <er...@gmail.com> 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
>


Re: NUnit Test Output

Posted by Brett Porter <br...@apache.org>.
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 <er...@gmail.com> 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