How to generate jacoco code coverage reports from jacoco.exec generated on remote server
up vote
0
down vote
favorite
I'm trying to generate jacoco code coverage reports from the jacoco exec file (generated on remote server) which I have copied into Jenkins workspace.
My requirement is to start the server in a remote location, then executes scenario tests against the remote server and get the code coverage.
For that purpose, I have placed the jacoco agent in the server side, then attach the jacoco agent as a JVM option and do the instrumentation on the server side. This will automatically generate an empty jacoco exec file in the server side when the server starts up. Then I execute the tests and shutdown the server. Next the generated jacoco exec has copied to jenkins workspace and create a freestyle project. Then added only the exec file in the "Record jacoco coverage report" under "Post-build actions". After that when I triggered a build, I got the results as "Overall coverage: class: 0, method: 0, line: 0, branch: 0, instruction: 0". Could you please help me to get this solved and generate the reports.
I'm using Jenkins 2.138.2 version and jacoco plugin 3.0.4 version.
jenkins jacoco jacoco-maven-plugin
New contributor
add a comment |
up vote
0
down vote
favorite
I'm trying to generate jacoco code coverage reports from the jacoco exec file (generated on remote server) which I have copied into Jenkins workspace.
My requirement is to start the server in a remote location, then executes scenario tests against the remote server and get the code coverage.
For that purpose, I have placed the jacoco agent in the server side, then attach the jacoco agent as a JVM option and do the instrumentation on the server side. This will automatically generate an empty jacoco exec file in the server side when the server starts up. Then I execute the tests and shutdown the server. Next the generated jacoco exec has copied to jenkins workspace and create a freestyle project. Then added only the exec file in the "Record jacoco coverage report" under "Post-build actions". After that when I triggered a build, I got the results as "Overall coverage: class: 0, method: 0, line: 0, branch: 0, instruction: 0". Could you please help me to get this solved and generate the reports.
I'm using Jenkins 2.138.2 version and jacoco plugin 3.0.4 version.
jenkins jacoco jacoco-maven-plugin
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to generate jacoco code coverage reports from the jacoco exec file (generated on remote server) which I have copied into Jenkins workspace.
My requirement is to start the server in a remote location, then executes scenario tests against the remote server and get the code coverage.
For that purpose, I have placed the jacoco agent in the server side, then attach the jacoco agent as a JVM option and do the instrumentation on the server side. This will automatically generate an empty jacoco exec file in the server side when the server starts up. Then I execute the tests and shutdown the server. Next the generated jacoco exec has copied to jenkins workspace and create a freestyle project. Then added only the exec file in the "Record jacoco coverage report" under "Post-build actions". After that when I triggered a build, I got the results as "Overall coverage: class: 0, method: 0, line: 0, branch: 0, instruction: 0". Could you please help me to get this solved and generate the reports.
I'm using Jenkins 2.138.2 version and jacoco plugin 3.0.4 version.
jenkins jacoco jacoco-maven-plugin
New contributor
I'm trying to generate jacoco code coverage reports from the jacoco exec file (generated on remote server) which I have copied into Jenkins workspace.
My requirement is to start the server in a remote location, then executes scenario tests against the remote server and get the code coverage.
For that purpose, I have placed the jacoco agent in the server side, then attach the jacoco agent as a JVM option and do the instrumentation on the server side. This will automatically generate an empty jacoco exec file in the server side when the server starts up. Then I execute the tests and shutdown the server. Next the generated jacoco exec has copied to jenkins workspace and create a freestyle project. Then added only the exec file in the "Record jacoco coverage report" under "Post-build actions". After that when I triggered a build, I got the results as "Overall coverage: class: 0, method: 0, line: 0, branch: 0, instruction: 0". Could you please help me to get this solved and generate the reports.
I'm using Jenkins 2.138.2 version and jacoco plugin 3.0.4 version.
jenkins jacoco jacoco-maven-plugin
jenkins jacoco jacoco-maven-plugin
New contributor
New contributor
edited Nov 8 at 11:09
New contributor
asked Nov 8 at 9:55
MalshaniS
11
11
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
According to my understanding the jacoco.exec
file contains only the information which code has been executed. So in order to measure the code coverage, this information has to be compared with the class
files.
So try to add the class
files to the workspace.
If you also want to drill down into the source code in jenkins, add the source code to your workspace.
I've tried it that way by adding class files to workspace. But still I cannot generate reports. But I can generate the report by adding those class file paths to the POM. Is there any way to generate reports in server side itself in server shutdown.
– MalshaniS
Nov 9 at 10:04
can you please add the log from jenkins? Also maybe a screenshot from jenkins configuration / workspace
– wirnse
Nov 9 at 10:19
Please find the attachments as below.
– MalshaniS
Nov 9 at 10:55
As from your Jenkins Console you do not include any class files. try to use the default plugin configuration or configure the patterns in a way to reflect your workspace.
– wirnse
Nov 9 at 11:07
I have a set of .jar files which I need to pass into class files section. But I cannot provide the jar files with the default plugin configuration. How can I pass them?
– MalshaniS
2 days ago
|
show 5 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
According to my understanding the jacoco.exec
file contains only the information which code has been executed. So in order to measure the code coverage, this information has to be compared with the class
files.
So try to add the class
files to the workspace.
If you also want to drill down into the source code in jenkins, add the source code to your workspace.
I've tried it that way by adding class files to workspace. But still I cannot generate reports. But I can generate the report by adding those class file paths to the POM. Is there any way to generate reports in server side itself in server shutdown.
– MalshaniS
Nov 9 at 10:04
can you please add the log from jenkins? Also maybe a screenshot from jenkins configuration / workspace
– wirnse
Nov 9 at 10:19
Please find the attachments as below.
– MalshaniS
Nov 9 at 10:55
As from your Jenkins Console you do not include any class files. try to use the default plugin configuration or configure the patterns in a way to reflect your workspace.
– wirnse
Nov 9 at 11:07
I have a set of .jar files which I need to pass into class files section. But I cannot provide the jar files with the default plugin configuration. How can I pass them?
– MalshaniS
2 days ago
|
show 5 more comments
up vote
0
down vote
According to my understanding the jacoco.exec
file contains only the information which code has been executed. So in order to measure the code coverage, this information has to be compared with the class
files.
So try to add the class
files to the workspace.
If you also want to drill down into the source code in jenkins, add the source code to your workspace.
I've tried it that way by adding class files to workspace. But still I cannot generate reports. But I can generate the report by adding those class file paths to the POM. Is there any way to generate reports in server side itself in server shutdown.
– MalshaniS
Nov 9 at 10:04
can you please add the log from jenkins? Also maybe a screenshot from jenkins configuration / workspace
– wirnse
Nov 9 at 10:19
Please find the attachments as below.
– MalshaniS
Nov 9 at 10:55
As from your Jenkins Console you do not include any class files. try to use the default plugin configuration or configure the patterns in a way to reflect your workspace.
– wirnse
Nov 9 at 11:07
I have a set of .jar files which I need to pass into class files section. But I cannot provide the jar files with the default plugin configuration. How can I pass them?
– MalshaniS
2 days ago
|
show 5 more comments
up vote
0
down vote
up vote
0
down vote
According to my understanding the jacoco.exec
file contains only the information which code has been executed. So in order to measure the code coverage, this information has to be compared with the class
files.
So try to add the class
files to the workspace.
If you also want to drill down into the source code in jenkins, add the source code to your workspace.
According to my understanding the jacoco.exec
file contains only the information which code has been executed. So in order to measure the code coverage, this information has to be compared with the class
files.
So try to add the class
files to the workspace.
If you also want to drill down into the source code in jenkins, add the source code to your workspace.
answered Nov 9 at 5:02
wirnse
30615
30615
I've tried it that way by adding class files to workspace. But still I cannot generate reports. But I can generate the report by adding those class file paths to the POM. Is there any way to generate reports in server side itself in server shutdown.
– MalshaniS
Nov 9 at 10:04
can you please add the log from jenkins? Also maybe a screenshot from jenkins configuration / workspace
– wirnse
Nov 9 at 10:19
Please find the attachments as below.
– MalshaniS
Nov 9 at 10:55
As from your Jenkins Console you do not include any class files. try to use the default plugin configuration or configure the patterns in a way to reflect your workspace.
– wirnse
Nov 9 at 11:07
I have a set of .jar files which I need to pass into class files section. But I cannot provide the jar files with the default plugin configuration. How can I pass them?
– MalshaniS
2 days ago
|
show 5 more comments
I've tried it that way by adding class files to workspace. But still I cannot generate reports. But I can generate the report by adding those class file paths to the POM. Is there any way to generate reports in server side itself in server shutdown.
– MalshaniS
Nov 9 at 10:04
can you please add the log from jenkins? Also maybe a screenshot from jenkins configuration / workspace
– wirnse
Nov 9 at 10:19
Please find the attachments as below.
– MalshaniS
Nov 9 at 10:55
As from your Jenkins Console you do not include any class files. try to use the default plugin configuration or configure the patterns in a way to reflect your workspace.
– wirnse
Nov 9 at 11:07
I have a set of .jar files which I need to pass into class files section. But I cannot provide the jar files with the default plugin configuration. How can I pass them?
– MalshaniS
2 days ago
I've tried it that way by adding class files to workspace. But still I cannot generate reports. But I can generate the report by adding those class file paths to the POM. Is there any way to generate reports in server side itself in server shutdown.
– MalshaniS
Nov 9 at 10:04
I've tried it that way by adding class files to workspace. But still I cannot generate reports. But I can generate the report by adding those class file paths to the POM. Is there any way to generate reports in server side itself in server shutdown.
– MalshaniS
Nov 9 at 10:04
can you please add the log from jenkins? Also maybe a screenshot from jenkins configuration / workspace
– wirnse
Nov 9 at 10:19
can you please add the log from jenkins? Also maybe a screenshot from jenkins configuration / workspace
– wirnse
Nov 9 at 10:19
Please find the attachments as below.
– MalshaniS
Nov 9 at 10:55
Please find the attachments as below.
– MalshaniS
Nov 9 at 10:55
As from your Jenkins Console you do not include any class files. try to use the default plugin configuration or configure the patterns in a way to reflect your workspace.
– wirnse
Nov 9 at 11:07
As from your Jenkins Console you do not include any class files. try to use the default plugin configuration or configure the patterns in a way to reflect your workspace.
– wirnse
Nov 9 at 11:07
I have a set of .jar files which I need to pass into class files section. But I cannot provide the jar files with the default plugin configuration. How can I pass them?
– MalshaniS
2 days ago
I have a set of .jar files which I need to pass into class files section. But I cannot provide the jar files with the default plugin configuration. How can I pass them?
– MalshaniS
2 days ago
|
show 5 more comments
MalshaniS is a new contributor. Be nice, and check out our Code of Conduct.
MalshaniS is a new contributor. Be nice, and check out our Code of Conduct.
MalshaniS is a new contributor. Be nice, and check out our Code of Conduct.
MalshaniS is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205265%2fhow-to-generate-jacoco-code-coverage-reports-from-jacoco-exec-generated-on-remot%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password