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

        Activity

        Hide
        Chand added a comment -

        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 - 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
        Fabrice Bellingard added a comment -

        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 - 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
        Fabrice Bellingard added a comment -

        Tested.

        Show
        Fabrice Bellingard added a comment - Tested.
        Hide
        Salman Hasanuddin added a comment -

        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 - 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
        Fabrice Bellingard added a comment -

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

        Show
        Fabrice Bellingard added a comment - Salman, please use the user mailing list for asking questions, not JIRA ! Thanks.

          People

          • Assignee:
            Alexandre Victoor
            Reporter:
            Alexandre Victoor
          • Votes:
            9 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: