[JIRA] (JENKINS-58469) Not able to generate the coverage report with jenkins jacoco plugin 1.0.19 and jacoco 0.7.4

5 views
Skip to first unread message

y.satya1988@gmail.com (JIRA)

unread,
Jul 12, 2019, 8:57:02 AM7/12/19
to jenkinsc...@googlegroups.com
Satya yamanuri created an issue
 
Jenkins / Bug JENKINS-58469
Not able to generate the coverage report with jenkins jacoco plugin 1.0.19 and jacoco 0.7.4
Issue Type: Bug Bug
Assignee: Unassigned
Components: jacoco-plugin
Created: 2019-07-12 12:56
Priority: Minor Minor
Reporter: Satya yamanuri

What went wrong:
Execution failed for task ':CoreServices:testCoverage'.
> Unable to read execution data file C:\p4\nemo\ce\sw\4.0\team\services\CoreServices\build\jacoco\testDebugUnitTest.exec

 

 

Code base:

task testCoverage(type: JacocoReport) {
reports

{ xml.enabled = true html.enabled = true }

def mainSrc = "${project.projectDir}/src"
sourceDirectories = files([mainSrc])

def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
def debugTree = fileTree(dir: "${project.buildDir.getPath()}/intermediates/classes/debug", excludes: fileFilter)
classDirectories = files([debugTree])

// executionData = files("${project.buildDir.getPath()}/jacoco/testDebugUnitTest.exec")
executionData = fileTree(dir: project.projectDir, includes: ['**/*.exec'])

testCoverage.dependsOn('testDebugUnitTest')

}

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

y.satya1988@gmail.com (JIRA)

unread,
Jul 15, 2019, 1:24:02 AM7/15/19
to jenkinsc...@googlegroups.com
Satya yamanuri commented on Bug JENKINS-58469
 
Re: Not able to generate the coverage report with jenkins jacoco plugin 1.0.19 and jacoco 0.7.4

Team any suggestion on this we have to use the 1.0.19 version plugin in Jenkins and this plug in supports only jacococ version 0.7.4.

Ans using 0.7.4 we are getting the following excception.

Unable to read execution data file C:\p4\nemo\ce\sw\4.0\team\services\CoreServices\build\jacoco\testDebugUnitTest.exec

dominik.stadler@gmx.at (JIRA)

unread,
Sep 22, 2019, 10:29:06 AM9/22/19
to jenkinsc...@googlegroups.com
centic commented on Bug JENKINS-58469

Depending on which version of jacoco produced the .exec file, only the matching version of the jacoco-plugin will be able to process the data.

Please at least more clearly describe which versions of jacoco and jacoco-plugin you are using here, as this is not clear from the current description.

In the long run we strongly suggest to update JaCoCo to a newer version and use the latest version of the JaCoCo-plugin, then things should work fine.

See also the note from the README/GitHub page:

Note: Version 2.0.0 and higher requires using JaCoCo 0.7.5 or newer, if your projects still use JaCoCo 0.7.4, the plugin will not display any code-coverage numbers any more! In this case please use version 1.0.19 until you can update jacoco in your codebase.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages