I have some test to check my code. I have generated my report in sonarcloud but I have a problem: The coverage percentage takes into account also the test classes, that are obviously uncovered by other test. Is there any option just to take into account all the classes but the test ones??
How to exclude test classes form Coverage Analysis using Jacoco
1.2k Views Asked by Jesús Navarro Hdez At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in JACOCO
- Using JaCoCo with Liberty Profile 8.5.5.4 in Eclipse does not produce any code coverage
- Exclude classes of jar files from jacoco coverage report
- How to check code coverage with JaCoCo agent?
- Getting jacoco report from cucumber tests with gradle
- Gradle SonarQube Plugin Analysis fails at the very end with MySQLNonTransientConnectionException
- How could I get code coverage for individual tests in Java
- Gradle & Jacoco: Get jacoco reports for Test-type task other than "test"
- Android Gradle Jacoco: offline instrumentation for integration tests
- FileNotFound Jacoco / Gradle
- Execute a task in gradle just before Test Executor ends
- Integrating JaCoCo with Sonar for integration test coverage in Android
- Jacoco Integration test report is not correct
- Jacoco - ignore MyClass.1
- How to generate Jacoco integration test report using offline instrumentation?
- jacoco offline instrumentation original class path
Related Questions in SONARCLOUD
- Is there any SonarCloud API that can retrieve historical trend of issue by severity?
- SonarCloud requiring code coverage for files ignored with Istanbul
- java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed
- 3rd-party tool for analysis converts its report to the Generic Issues format in sonarcloud
- Merge python and javascript coverage to appear in one SonarCloud key
- The SonarCloud scan is analyzing the default master branch instead of the develop branch
- How to make this Code SonarClud Compliant
- Sonarcloud analysis report capture in the azure pipeline
- Azure Devops Run SonarCloud Analysis for .Net Project
- Problems with SonarCloud
- SonarCloud in GitHub doesn't recognise C# 12 primary constructors
- Sonar cloud does not reflect the code coverage information for maven project with Azure CICD pipeline
- Error SonarCloud with openjdk8 during pipeline gitlab-ci in java
- How to exclude test classes form Coverage Analysis using Jacoco
- SonarCloud and specific rules for NodeJS project within repository code
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
First of all i would not adapt Jacoco, but you can exclude files from coverage report within sonarqube/sonarcloud with the
sonar.coverage.exclusionsproperty, where you can eg. specify a pattern like**/*Test.javato exlude all java files ending withTest.Additionally you could also set this up within the UI, represented on the following screenshot:
Sidenote: i would inspect the sonar configuration, for me it looks like that test code is provided as normal sources to sonar. This would create such an topic, but normally sonar has an own property to configure test code. see analysis parameters documentation for further details or if you use gradle or maven plugins, check the respective documentation on how to organize the source code.