Plugin Information
Archive and publish .NET code coverage HTML reports from NCover. ScreenshotsThe post-build action when configuring a project:
Configuring the NCover PluginThe NCover plug-in requires Hudson 1.312 or greater. If you are using an older version of Hudson, use its automatic upgrade feature first by visiting the "Manage Hudson" link on your Hudson dashboard and click the "Upgrade Automatically" button near the top.
Generating NCover HTML reportsFor generic help on this topic, see http://docs.ncover.com/how-to/create-ncover-reports/ When using Gallio, you can simply use the NCover runner. You'll need to pass two arguments to Gallio.Echo.exe. Make sure to replace the variables in caps with the actual path you want:
An example command might look like: C:\Program Files\Gallio\bin\Gallio.Echo.exe "C:\path\to\your.dll"
/runner:ncover3
/runner-property:NCoverArguments="//html artifacts\coverage-html //at ncover3.trend"
Version HistoryVersion 0.3 (Mar 3, 2010)
Version 0.2.6 (Jul 28, 2009)
Version 0.2.5 (Jul 16, 2009)
Version 0.2.0 (UNRELEASED)
Version 0.1.0 (UNRELEASED)
|


Comments (13)
Jul 17, 2009
Dietmar Steinberger says:
Hi - awesome that an NCover Plugin has been released!! I have a bit of...Hi - awesome that an NCover Plugin has been released!!
I have a bit of a problem and not sure what it is.
I get an error when the plugin tries to publish NCover reports
Publishing NCover HTML report...
C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\bootstrap.jar
Debug: file:/C:/.hudson/plugins/ncover/WEB-INF/classes/ncover/NCoverArchiver/header.html
Debug: http://qaserv01:8080/hudson/
FATAL: java.lang.String.isEmpty()Z
java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
at ncover.NCoverArchiver.perform(NCoverArchiver.java:211)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:379)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:367)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:352)
at hudson.model.Run.run(Run.java:958)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:118)
I have a rather old NCover version in place - may this be the problem?
NCoverExplorer.Console 1.4.0.7
Or is it that the result file is not found (is directly located in the workspace folder)?
Jul 28, 2009
Michael Rooney says:
Thanks to Julian this is fixed in the latest version of the plug-in 0.2.6 so upg...Thanks to Julian this is fixed in the latest version of the plug-in 0.2.6 so upgrading automatically should address this!
Jul 20, 2009
Julian Haslinger says:
Hi! I just found out how to get this working! Pre-Reqs: You need mav...Hi! I just found out how to get this working!
Pre-Reqs:
You need maven on the machine in order to be able to build the plugin. Please refer to maven documention for installing maven.
- Get the source code for the ncover plugin
- In the file "NCoverArchiver.java" change the line "if (!report.isEmpty()) {" to "if (!report.trim().equals("")) {".
- Recompile the plugin and use it in your hudson environment (assuming that maven is installed and configured correctly, fire up a cmd [on windows systems], navigate to the source folder (the pom.xml has to be in this folder) and type "mvn".).
I guess you're using an older JDK (1.4?), so the method "isEmpty()" can't be found because it's not supported. The method was introduced in Java 1.6: http://java.sun.com/javase/6/docs/api/java/lang/String.html#isEmpty%28%29\\
HTH,
Best Regards,
Julian
Jul 21, 2009
Dietmar Steinberger says:
I was using jdk 1.5 but with your workaround the report is generated and display...I was using jdk 1.5 but with your workaround the report is generated and displayed fine - thx a lot!
Jul 21, 2009
karega scott says:
Hi, the ncover plugin installed successfully, and I followed the instruction lis...Hi, the ncover plugin installed successfully, and I followed the instruction listed below. but when I click the Code Coverage link it produces the following error.
Status Code: 500
Exception:
Stacktrace: java.lang.NoSuchMethodError: hudson.model.DirectoryBrowserSupport.setIndexFileName(Ljava/lang/String;)V
at ncover.NCoverArchiver$BaseNCoverAction.doDynamic(NCoverArchiver.java:299)
at ncover.NCoverArchiver$NCoverAction.doDynamic(NCoverArchiver.java:308)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:160)
at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:297)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:486)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:318)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:486)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:186)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:486)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:404)
at org.kohsuke.stapler.Stapler.service(Stapler.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:91)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:83)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:155)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
at java.lang.Thread.run(Unknown Source)
Generated by Winstone Servlet Engine v0.9.10 at Tue Jul 21 22:14:09 CDT 2009
Console out list Success
BUILD SUCCEEDED
Total time: 20.1 seconds.
Publishing NCover HTML report...
c:\devtools\Hudson\hudson.war
Debug: file:/c:/devtools/Hudson/plugins/ncover/WEB-INF/classes/ncover/NCoverArchiver/header.html
Debug: http://192.168.83.44:8080/
Report: 'Program/src/Build/Debug/Program.Test.dll-ncoverage.html'
Recording NUnit tests results
Finished: SUCCESS
What am I doing wrong? I need help ASAP! Very new to hudson.
Jul 28, 2009
Michael Rooney says:
Hi Karega, you need at least Hudson 1.312 to use this plug-in. You should be abl...Hi Karega, you need at least Hudson 1.312 to use this plug-in. You should be able to upgrade automatically by going into the "Manage Hudson" link from the main page of your Hudson dashboard.
Jul 31, 2009
Varun Thakur says:
Hi I have been banging my head against NCover plugin but getting this error Tot...Hi I have been banging my head against NCover plugin but getting this error
Total time: 237.6 seconds.
Publishing NCover HTML report...
C:\XXXX\XXXX\XXXXX\hudson\Server\hudson.war
Debug: null
Debug: http://localhost:8080/
FATAL: null
java.lang.NullPointerException
at ncover.NCoverArchiver.readFile(NCoverArchiver.java:164)
at ncover.NCoverArchiver.perform(NCoverArchiver.java:195)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:379)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:367)
at hudson.model.Build$RunnerImpl.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:352)
at hudson.model.Run.run(Run.java:958)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:118)
My Ncover version is .2.6 and hudson is 1.3.15, please help as this is the major hurdle for us in moving from CCnet to hudson.
Aug 12, 2009
Michael Rooney says:
Varun, it looks like you are not using the latest version of the plug-in, but th...Varun, it looks like you are not using the latest version of the plug-in, but the debug information seems to imply that you aren't specifying any reports to display. What values have you specified in the directory and reports field?
Sep 06, 2009
Varun Thakur says:
HI , I have been finally able to get the plugin running, one thing that I...HI ,
I have been finally able to get the plugin running, one thing that I have noticed is that it requires you to speicfy the path in unix format using forward slashes '/' instead of the back slashes of windows "\".
Aug 28, 2009
Trond Andersen says:
Why haven't this plugin used the XML file like the Clover Plugin. This would all...Why haven't this plugin used the XML file like the Clover Plugin. This would allow the plugin to specify Coverage metric targets just like the Clover Plugin. Another benefit would be that The Continuous Integration Game plugin could used the numbers to add or remove points to the developer as they check in code with better or worse test coverage.
Sep 03, 2009
Michael Rooney says:
Hi Trond!That was not in the scope of my project; my goal was just to archiv...Hi Trond!That was not in the scope of my project; my goal was just to archive and publish HTML reports, so that's what the plug-in currently does. If you would like to enhance it more that would be great, however.
Sep 21, 2009
Nathan Craddock says:
Am I correct in observing that the inability to use XML reports would require an...Am I correct in observing that the inability to use XML reports would require anyone using this plugin to purchase a copy of NCover Complete (currently $479) for the build server?
Feb 17
Michael Rooney says:
If the Complete version is the only one that generates HTML reports, that would ...If the Complete version is the only one that generates HTML reports, that would be true. Does the free Community version not generate HTML?