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

Accepted Answer
0 votes

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
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

29 views 0 2
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