instrumented class show up as not executed even though it is.

Some of my instrumented classes are showing up with no coverage when i generate an html report. i know this is incorrect because the code that's showing no coverage is required to be executed in order for the tests to complete successfully. Is there some other debug i can enable other than "ant -d"? i already looked through that output and i did not see any errors? Any help would be greatly appreciated.

1 answer

1 accepted

0 vote

Are you sure that code is instrumented? Are you referring to production code which shows up with no coverage and you're 100% sure it's being executed I presume.

  • Is the code for which coverage is missing properly instrumented and not excluded?
  • Is the code for which coverage is missing "static", by which I mean it's not being generated by some tool during the build process?
  • Are you using long living JVM, as e.g. Web Server, which isn't really terminated, if so please verify your flush policy, because the default one will flush all data to disk after JVM termination
  • Is instrumentation, test runs and report generation happens on the same machine, if not, are you sure you are copying right and all of coverage files to report generation machine? 
  • If you'd isolate running the code you're not getting coverage, is there coverage files showing up?

Thanks!! The interval on the flush policy was modified and it seems to be working better now.

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
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
Read article

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