Cannot see coverage files on linux environment, works fine in windows environment

Our configuration is  - Jenkins build server trying to call application functionality deployed on a development server(Weblogic).

Below is my build process:

 

1) Source code is instrumented on Jenkins server and build is performed. (To validate I copied the instrumented code to the app server, I extracted the war and confirmed that additional coverage classes were generated.)

2) Instrumented EAR file and coverage DB file are copied to the application server(Weblogic).

3) Run Junit tests that access code(EJB's) deployed on application server.

4) Shutdown application server.

 

Coverage folder has been setup through "initstring" attribute on my clover-setup. I tried both relative and absolute configurations.

 

I even tried the system property setting "clover.initstring" setting on the application server to override the compile-time relative/absolute paths.

 

But, I never saw the coverage files.

 

The same setup works just fine on my local windows server, where-in I run the instrumented build(same build script) and deploy it to local weblogic server instance. I can see the coverage reported for the same tests I ran on the development server.

 

I have read thru the documentation and clover forum Q&A talking about missing coverage, but none similar to my issue.

 

Appreciate any help in this regard!

 

Thanks,

Mohan

 

 

 

 

 

 

 

2 answers

1 accepted

0 vote

Hello Mohan Krishna,

I'd like to ask you for more information about your configuration:

  1. Which Clover version are you using? If you are using an old version (pre 4.0) please update to the newest 4.0.4 one.
  2. Could you provide us more information about details of your work environments? Is compilation and running application/tests is happening on Linux CI server and for your local development env is on Windows?
  3. How many databases are generated during project instrumentation? Are you using clover-merge? Are you copying all of them to the runtime environment? (in case of Maven for multimodule project there are multiple databases by default) 
  4. Could you specify which initstring exactly were you using? If you have multiple database files maybe clover.initstring.basedir would be more applicable?
  5. Which flush policy are you using? For the default one code coverage will be written on disk after JVM clean shutdown via JVM shutdown hook. Aren't you killing your application server?  Is clover.jar bundled in you web-app or did you put it in the WebLogic's /lib directory or did you pass clover.jar as -Xbootclasspath option?
  6. How are your build plans configured on Jenkins? Is there one plan which compiles, deploys and runs tests or there are separate plans for building, deploying and running tests (and you pass artifacts, such as your WAR/EAR between them)?
  7. Could you please fill-in support ticket on https://support.atlassian.com/ and attach logs from compilation and runtime (application log) from both Jenkins CI and your local environment? Please enable debug logging for a build process (i.e with 'mvn -X' or 'ant -d').

Cheers,

Grzegorz Lewandowski

Thanks Grzegorz 

#1 resolved it. Had to upgrade clover version to 4.0.4.

 

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Posted 13 hours ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

37 views 0 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you