[ajug-members] Code Coverage
Gunnar Hillert
gunnar at hillert.com
Wed Feb 16 08:28:09 EST 2005
Hello,
I have a general question and a problem...
I've started playing around with a couple of open source code coverage tools. What are you're experiences? - Which is the best in your opinion?
(jCoverage, Emma, GroboCoverage...)
Well, and here is my problem.
I am using GroboCoverage and I am developing a tiny little webapplication, that uses Hibernate for persistence. Everything worked wonderfully until I have started using GroboCoverage together with jUnit.
It looks like whenever my jUnit tests are executed after the insrumentation process. I am getting the following exception.
[junit] Testcase: testEmployee took 0.016 sec
[junit] Caused an ERROR
[junit] (class: com/hillert/ed/service/EmployeeHelperService, method: getJobTitle signature: (I)Ljava/lang/String;) Illegal constant pool index
[junit] java.lang.VerifyError: (class: com/hillert/ed/service/EmployeeHelperService, method: getJobTitle signature: (I)Ljava/lang/String;) Illegal constant pool index
[junit] at com.hillert.ed.unitests.EmployeeServiceTest.testEmployee(EmployeeServiceTest.java:62)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[junit] Test com.hillert.ed.unitests.EmployeeServiceTest FAILED
I was able to narrow it down a little bit. It seems that the error is triggered whenever the followoing Hibernate calls are involved.
jb = (JobTitleBean) session.load(JobTitleBean.class, new Integer(id));
Once my jUnit tests are not using any classes that contain this or similar Hibernate calls - everything works fine. Also if I am not doing any code instrumentation, everything works fine, too. Did anybody ever experience a similar issue? (I've searched the Internet left and right but it looks like I am the only one having this problem....)
Thank you very much for any help/suggestions!!
With best regards,
Gunnar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ajug.org/pipermail/ajug-members/attachments/20050216/6ef0ea61/attachment.html
More information about the ajug-members
mailing list