cobertura | Cobertura is a free Java code coverage reporting tool

 by   christ66 Java Version: Current License: GPL-2.0

kandi X-RAY | cobertura Summary

kandi X-RAY | cobertura Summary

cobertura is a Java library. cobertura has no bugs, it has build file available, it has a Strong Copyleft License and it has high support. However cobertura has 2 vulnerabilities. You can download it from GitHub.

Cobertura is a free Java code coverage reporting tool. It is based on jcoverage 1.0.5. See the Cobertura web page for more details. Since 2.0.0, Cobertura versions follow the Semantic versioning guidelines.

            kandi-support Support

              cobertura has a highly active ecosystem.
              It has 27 star(s) with 285 fork(s). There are 5 watchers for this library.
              It had no major release in the last 6 months.
              There are 1 open issues and 4 have been closed. On average issues are closed in 349 days. There are 8 open pull requests and 0 closed requests.
              It has a negative sentiment in the developer community.
              The latest version of cobertura is current.

            kandi-Quality Quality

              cobertura has 0 bugs and 0 code smells.

            kandi-Security Security

              cobertura has 2 vulnerability issues reported (0 critical, 1 high, 1 medium, 0 low).
              cobertura code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              cobertura is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              cobertura releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 21959 lines of code, 1184 functions and 232 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed cobertura and discovered the below as its top functions. This is intended to give you an instant insight into cobertura implemented functionality, and help decide if they suit your requirements.
            • Sets the classpath reference
            • Process instrumentation classes
            • Create the classpath for instrumentation
            • Get a FileSet for the specified directory
            • Main entry point
            • Start instrument
            • Main method for testing
            • Generate the method to be invoked
            • Generates the class map content
            • Execute the program
            • Returns the code to get and reset the counters and reset the counters
            • Generate HTML package packages
            • Parses the imports
            • Executes the command
            • Copies resources to the given destination directory
            • Merge coverage data
            • Generates method that returns the method to get the cobertuator_counters method
            • Instrument code in a single method
            • Generate the code that should be called for each static initializer block
            • Returns the contents of the specified file
            • Generate code for counters
            • Generate the counters method
            • Executes the program
            • Processes a new line number
            • Merges an instrumentation object
            • Get the common super class
            Get all kandi verified functions for this library.

            cobertura Key Features

            No Key Features are available at this moment for cobertura.

            cobertura Examples and Code Snippets

            No Code Snippets are available at this moment for cobertura.

            Community Discussions


            Jest Coverage fails when using jest.config resetMocks: 'true'
            Asked 2022-Mar-29 at 08:52

            I am using jest config in my package.json:



            Answered 2022-Mar-29 at 08:52

            In answer to your issue - your reset/restore are within the coverageThreshold object, move them outside.



            Coverlet generated coverage.cobertura.xml empty source full path in filename
            Asked 2022-Mar-27 at 19:14

            It works fine in most of my projects, but I have one where the coverage.cobertura.xml is generating like:



            Answered 2022-Mar-27 at 19:14

            I figured it out by digging into the source of coverlet. I think it's this line:


            The tldr; my project only contains a single class to be analysed and it looks like the process of determining the base path requires at least 2 classes.

            I will either:

            • remove an exclusion I currently have in place for one of the classes from test coverage
            • split the only class currently being analysed in two; or
            • add a simple sed command after the report is generated to "fix it up"

            I have added a note to an existing issue in the project to see whether it should be considered a bug and if/how we might improve the way it's handled (potentially just allowing an argument/parameter to "hardcode" the source.



            SonarQube: No analysis found in this build after applying include pattern
            Asked 2022-Feb-26 at 00:04

            I am trying to integrate SonarQube in a CI-pipeline in Azure DevOps. I used the exact configuration that I used in other pipelines where everything runs smoothly. However, this pipeline can't find the analysis in the SonarQube Publish step as shown in the logs below.



            Answered 2022-Feb-26 at 00:04

            As Mickaël Caro stated on my similar post in the SonarSource community forum:

            Unfortunately some characters are not recognized nor parsed correctly when we try to find the report path (We do have this issue filed here : [VSTS-240] Escape regex characters when finding report path file. - SonarSource).

            I changed the [ ] in the name of the build to ( ), and the analysis runs smoothly.



            Change name of columns that have the same name in a df
            Asked 2022-Feb-22 at 14:37

            I have the following df where two columns ara labeled with the same name:



            Answered 2022-Feb-22 at 13:05

            You can do it manually using backticks:



            Azure, .Net, Cobertura - ##[warning]Multiple file or directory matches were found
            Asked 2022-Feb-16 at 10:41

            Hi i am trying to get code coverage with .net5 in azure pipeline.

            Run tests (not entire file)



            Answered 2021-Aug-25 at 08:52

            Please replace your PublishCodeCoverageResults with following steps:



            Mocking @pnp/logging in Jest
            Asked 2022-Feb-13 at 17:20

            I'm working in a Spfx project.
            I have my own Logger class which is a wrapper around the @pnp/logging/Logger.



            Answered 2022-Feb-13 at 17:20

            I wrapped the get method on the web object in a function and finally I got it right by creating the mock below. My wrapper is using a .then pattern which is the reason for the double promise resolve in the mock.

            IMPORTANT the mock can't be inside a it/test or describe, it must be on the top level as also stated in the docs

            I also mocked the sp.setup function in the same mock as that was throwing an error otherwise. Accordingly - you need to set up a double as per my finding. I have tried ts-sinon/ts-mockito etc but nothing took me all the way.



            nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing
            Asked 2022-Feb-11 at 22:39

            This worked fine for me be building under Java 8. Now under Java 17.01 I get this when I do mvn deploy.

            mvn install works fine. I tried 3.6.3 and 3.8.4 and updated (I think) all my plugins to the newest versions.

            Any ideas?



            Answered 2022-Feb-11 at 22:39

            Update: Version 1.6.9 has been released and should fix this issue! 🎉

            This is actually a known bug, which is now open for quite a while: OSSRH-66257. There are two known workarounds:

            1. Open Modules

            As a workaround, use --add-opens to give the library causing the problem access to the required classes:



            Azure Pipeline: File Transform task fails
            Asked 2022-Feb-03 at 20:34

            I added a file transform task to the build pipeline. Here is a part of the pipeline:



            Answered 2022-Feb-02 at 10:02

            You have wrong order here since you try to change package



            Variable values are not injected into local.settings.json
            Asked 2022-Feb-03 at 13:26

            I have an Azure Function project. It includes local.settings.json configuration file with some secrets. Those values are retrieved and used by the xUnit testing project. Everything works well when run on Visual Studio, but in the Azure build pipeline, the values are not injected, and the file contains original placeholder values. The local.settings.json file has Build Action as "Content", and Copy to Output Directory as "Copy if newer". In the pipeline, I use a File Transform task to inject values. Here is a part of my pipeline:



            Answered 2022-Feb-03 at 13:26

            Not sure about the structure of your json file, and how the variables are defined. But according to your description, the variable values are not injected into local.settings.json. It seems that the variables are not defined correctly, or the json file is not found during running the pipeline.

            In targetFiles field provide the json file path directly or relatively, so if you have multiple appsettings files inside folder path you have given in first field than giving relative path will see for all the settings json file like this:'**/settings.json'.

            File transform task will update the fields inside the settings json file from the available variables based on name of variable matching with the field inside the settings json file. For example, take the below json file as our app settings json file:



            Gitlab CI visualize issues on gradle multi-module with dockerd gitlab-runner
            Asked 2022-Jan-28 at 03:53


            Hi All, hope all good.

            From past days, I was setting up the coverage visualization on the multi-module gradle project with the gitlab instance using gitlab-CI and jacoco test reports and cobertura conversion analysis. And need a small assistance in setting up the gitlab-CI for the visualization task.

            My current gitlab-ci.yaml file is as below:



            Answered 2022-Jan-28 at 03:53

            I ended up developing my own plugin jacotura-gradle-plugin that converts the jacoco reports to cobertura reports and executed as gradle task.

            Reference: Jacotura @ Github


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            Jenkins Cobertura Plugin 1.15 and earlier does not configure its XML parser to prevent XML external entity (XXE) attacks.
            An arbitrary file write vulnerability in Jenkins Cobertura Plugin 1.15 and earlier allows attackers able to control the coverage report file contents to overwrite any file on the Jenkins master file system.

            Install cobertura

            You can download it from GitHub.
            You can use cobertura like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the cobertura component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer For Gradle installation, please refer .


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone christ66/cobertura

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries


            by CyC2018


            by Snailclimb


            by MisterBooo


            by spring-projects

            Try Top Libraries by christ66


            by christ66Java


            by christ66Java


            by christ66Java