jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Sonar .NET Ecosystem
  • Sonar .NET Ecosystem
  • SONARDOTNT-174

OpenCover support

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

OpenCover is the new "PartCover".
The license is LGPL and so the binaries could be embedded.
The command line is similar to what we are used to with PartCover.
Below an example :

OpenCover.Console.exe -register:user -arch:64 -target:C:\...\Gallio.Echo.exe -targetargs:"\"C:\...\Example\Example.Core.Tests\bin\Debug\Example.Core.Tests.dll\" \"C:\...\Example\Example.Dummy.Tests\bin\Debug\Example.Dummy.Tests.dll\"" -filter:"+[Example.Application]* +[Example.Core]* -[Example.Core.Tests]* -[Example.Dummy.Tests]*" -output:opencover-output.xml

Command line used on my 64b box on the Example solution

OpenCover site : https://github.com/sawilde/opencover
Nice tutorial : http://www.palmmedia.de/Blog/2011/6/21/code-coverage-testing-with-opencover-and-partcover

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    mvn.log
    27/Dec/11 5:23 AM
    1.93 MB
    Chand

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Shaun Wilde added a comment - 19/Oct/11 5:40 PM

Just to let you know the licence is MIT and that the -arch:64 switch is no longer required.

Show
Shaun Wilde added a comment - 19/Oct/11 5:40 PM Just to let you know the licence is MIT and that the -arch:64 switch is no longer required.
Hide
Permalink
Martin Harris added a comment - 04/Nov/11 10:04 AM - edited

I have just discovered this to be more important to me than I first thought. It turns out that Partcover does not work with some of our tests. So I would like to move over to OpenCover as soon as we can.

Show
Martin Harris added a comment - 04/Nov/11 10:04 AM - edited I have just discovered this to be more important to me than I first thought. It turns out that Partcover does not work with some of our tests. So I would like to move over to OpenCover as soon as we can.
Hide
Permalink
Alexandre Victoor added a comment - 06/Nov/11 3:50 PM

Command line builder done
Need to implement the XML parser now

Show
Alexandre Victoor added a comment - 06/Nov/11 3:50 PM Command line builder done Need to implement the XML parser now
Hide
Permalink
Alexandre Victoor added a comment - 22/Nov/11 5:53 PM

parser done
Last thing to do : update the wiki

Show
Alexandre Victoor added a comment - 22/Nov/11 5:53 PM parser done Last thing to do : update the wiki
Hide
Permalink
Chand added a comment - 20/Dec/11 8:53 AM - edited

Hi Alexandre,

Can you point us to the Sonar Opencover plugin beta please.
I'd like to it show to my mates and tell them there is no need to go to NCover

Regards,
Chandran

Show
Chand added a comment - 20/Dec/11 8:53 AM - edited Hi Alexandre, Can you point us to the Sonar Opencover plugin beta please. I'd like to it show to my mates and tell them there is no need to go to NCover Regards, Chandran
Hide
Permalink
Fabrice Bellingard added a comment - 20/Dec/11 10:22 AM

Hi Chandran,

this functionality is not released yet, it is planned for next version of the C# Plugins Ecosystem. If you want to test it, you currently have to build the plugins from their SVN source.

Show
Fabrice Bellingard added a comment - 20/Dec/11 10:22 AM Hi Chandran, this functionality is not released yet, it is planned for next version of the C# Plugins Ecosystem. If you want to test it, you currently have to build the plugins from their SVN source.
Hide
Permalink
Chand added a comment - 27/Dec/11 2:19 AM

Hi Fabrice,

Can you point me to the source of next version please. I'll try to build it and use it.

Regards,
Chandra

Show
Chand added a comment - 27/Dec/11 2:19 AM Hi Fabrice, Can you point me to the source of next version please. I'll try to build it and use it. Regards, Chandra
Hide
Permalink
Fabrice Bellingard added a comment - 27/Dec/11 3:25 AM

Sure, you'll find them here: http://svn.codehaus.org/sonar-plugins/trunk/php/
Just run "mvn clean install" in this folder once you checked it out, and when the process is successfully finished, you'll find the plugin JAR in "sonar-php-plugin/target" folder.

Show
Fabrice Bellingard added a comment - 27/Dec/11 3:25 AM Sure, you'll find them here: http://svn.codehaus.org/sonar-plugins/trunk/php/ Just run "mvn clean install" in this folder once you checked it out, and when the process is successfully finished, you'll find the plugin JAR in "sonar-php-plugin/target" folder.
Hide
Permalink
Chand added a comment - 27/Dec/11 5:24 AM - edited

Hi Fabrice,

Build failed. mvn couldn't download very many dependencies.
Have attached the log called mvn.log.
Any help will be much appreciated !!!

Regards,
Chandra

Show
Chand added a comment - 27/Dec/11 5:24 AM - edited Hi Fabrice, Build failed. mvn couldn't download very many dependencies. Have attached the log called mvn.log. Any help will be much appreciated !!! Regards, Chandra
Hide
Permalink
Sergii Mykhailov added a comment - 27/Dec/11 6:17 AM

Seems like Fabrice pointed you incorrect path.
As for me Dot Net plugins are here http://svn.codehaus.org/sonar-plugins/trunk/dotnet/

Show
Sergii Mykhailov added a comment - 27/Dec/11 6:17 AM Seems like Fabrice pointed you incorrect path. As for me Dot Net plugins are here http://svn.codehaus.org/sonar-plugins/trunk/dotnet/
Hide
Permalink
Fabrice Bellingard added a comment - 27/Dec/11 6:36 AM - edited

Ooops, yes, the path was not the good one, thanks Sergil.
Could you please switch to the dev mailing list to discuss problems with the build please?
Thanks!

Show
Fabrice Bellingard added a comment - 27/Dec/11 6:36 AM - edited Ooops, yes, the path was not the good one, thanks Sergil. Could you please switch to the dev mailing list to discuss problems with the build please? Thanks!
Hide
Permalink
Chand added a comment - 28/Dec/11 5:56 AM

Hi Fabrice,

I managed to build it all right and will go to the mailing list on this issue as suggested.
However the sonar gallio configuration page doesn't have any provision for Opencover config. However the c sharp plugin page http://docs.codehaus.org/display/SONAR/sonar-csharp-gallio-plugin seems to say that it does exist.
Don't know what I am missing here..

Regards,
Chandra

Show
Chand added a comment - 28/Dec/11 5:56 AM Hi Fabrice, I managed to build it all right and will go to the mailing list on this issue as suggested. However the sonar gallio configuration page doesn't have any provision for Opencover config. However the c sharp plugin page http://docs.codehaus.org/display/SONAR/sonar-csharp-gallio-plugin seems to say that it does exist. Don't know what I am missing here.. Regards, Chandra
Hide
Permalink
Fabrice Bellingard added a comment - 28/Dec/11 6:30 AM

The documentation says "OpenCover (since version 1.2)", and version 1.2 is not released yet. (should be "OpenCover (starting soon with version 1.2").

Thanks for switching to the mailing list.

Show
Fabrice Bellingard added a comment - 28/Dec/11 6:30 AM The documentation says "OpenCover (since version 1.2)", and version 1.2 is not released yet. (should be "OpenCover (starting soon with version 1.2"). Thanks for switching to the mailing list.
Hide
Permalink
Fabrice Bellingard added a comment - 01/Feb/12 8:49 AM

Tested.

Show
Fabrice Bellingard added a comment - 01/Feb/12 8:49 AM Tested.
Hide
Permalink
Salman Hasanuddin added a comment - 03/Feb/12 10:07 AM

I have OpenCover.2.1.6 installed on Win 2008 R2 32 bit machine and got the same error.I run sonar runner agains C# project and got this error.
Here is the stack trace for error.

09:36:58.499 ERROR Tried to get a CoverageTool with name D:InstallOpenCoverpacka
gesOpenCover.2.1.6, but such a tool is not supported.

Total time: 32.987s
Final Memory: 3M/15M
Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: java
.lang.IllegalArgumentException: No enum const class org.sonar.dotnet.tools.galli
o.CoverageTool.D:INSTALLOPENCOVERPACKAGESOPENCOVER.2.1.6
at org.sonar.runner.Runner.delegateExecution(Runner.java:189)
at org.sonar.runner.Runner.execute(Runner.java:78)
at org.sonar.runner.Main.main(Main.java:61)
Caused by: java.lang.IllegalArgumentException: No enum const class org.sonar.dot
net.tools.gallio.CoverageTool.D:INSTALLOPENCOVERPACKAGESOPENCOVER.2.1.6
at java.lang.Enum.valueOf(Enum.java:196)
at org.sonar.dotnet.tools.gallio.CoverageTool.valueOf(CoverageTool.java:
32)
at org.sonar.dotnet.tools.gallio.CoverageTool.findFromName(CoverageTool.
java:86)
at org.sonar.dotnet.tools.gallio.GallioCommandBuilder.setCoverageTool(Ga
llioCommandBuilder.java:153)
at org.sonar.plugins.csharp.gallio.GallioSensor.analyse(GallioSensor.jav
a:105)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:6
4)
at org.sonar.batch.phases.Phases.execute(Phases.java:93)
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:14
3)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:111)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:106)
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav
a:102)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.Batch.execute(Batch.java:100)
at org.sonar.runner.Launcher.executeBatch(Launcher.java:65)
at org.sonar.runner.Launcher.execute(Launcher.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.sonar.runner.Runner.delegateExecution(Runner.java:186)

Show
Salman Hasanuddin added a comment - 03/Feb/12 10:07 AM I have OpenCover.2.1.6 installed on Win 2008 R2 32 bit machine and got the same error.I run sonar runner agains C# project and got this error. Here is the stack trace for error. 09:36:58.499 ERROR Tried to get a CoverageTool with name D:InstallOpenCoverpacka gesOpenCover.2.1.6, but such a tool is not supported. Total time: 32.987s Final Memory: 3M/15M Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: java .lang.IllegalArgumentException: No enum const class org.sonar.dotnet.tools.galli o.CoverageTool.D:INSTALLOPENCOVERPACKAGESOPENCOVER.2.1.6 at org.sonar.runner.Runner.delegateExecution(Runner.java:189) at org.sonar.runner.Runner.execute(Runner.java:78) at org.sonar.runner.Main.main(Main.java:61) Caused by: java.lang.IllegalArgumentException: No enum const class org.sonar.dot net.tools.gallio.CoverageTool.D:INSTALLOPENCOVERPACKAGESOPENCOVER.2.1.6 at java.lang.Enum.valueOf(Enum.java:196) at org.sonar.dotnet.tools.gallio.CoverageTool.valueOf(CoverageTool.java: 32) at org.sonar.dotnet.tools.gallio.CoverageTool.findFromName(CoverageTool. java:86) at org.sonar.dotnet.tools.gallio.GallioCommandBuilder.setCoverageTool(Ga llioCommandBuilder.java:153) at org.sonar.plugins.csharp.gallio.GallioSensor.analyse(GallioSensor.jav a:105) at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:6 4) at org.sonar.batch.phases.Phases.execute(Phases.java:93) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:14 3) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:111) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:106) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav a:102) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.Batch.execute(Batch.java:100) at org.sonar.runner.Launcher.executeBatch(Launcher.java:65) at org.sonar.runner.Launcher.execute(Launcher.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.sonar.runner.Runner.delegateExecution(Runner.java:186)
Hide
Permalink
Fabrice Bellingard added a comment - 03/Feb/12 10:12 AM

Salman, please use the user mailing list for asking questions, not JIRA!
Thanks.

Show
Fabrice Bellingard added a comment - 03/Feb/12 10:12 AM Salman, please use the user mailing list for asking questions, not JIRA ! Thanks.

People

  • Assignee:
    Alexandre Victoor
    Reporter:
    Alexandre Victoor
Vote (9)
Watch (10)

Dates

  • Created:
    21/Aug/11 3:22 PM
    Updated:
    12/Oct/12 7:16 AM
    Resolved:
    24/Nov/11 4:17 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.