Junits Passed but when covered in jacoco target tests failed Ant Script

38 views
Skip to first unread message

mohita...@gmail.com

unread,
Jul 12, 2016, 8:41:57 AM7/12/16
to JaCoCo and EclEmma Users
I am calculating coverage using jacoco using ant script.
Refering the documentation i have written my junit wrapped inside jacoco target. When only junits are run they are successful without any exception.
When running inside jacoco coverage target many give exceptions.

Most of them being
java.util.MissingResourceException

Could you all help ?

Marc Hoffmann

unread,
Jul 12, 2016, 10:57:58 AM7/12/16
to jac...@googlegroups.com
So you only use the jacoco:coverage tag, right? No offline
instrumentation?

Also, can you please provide a stacktrace?

Regards,
-marc

mohita...@gmail.com

unread,
Jul 13, 2016, 1:38:59 AM7/13/16
to JaCoCo and EclEmma Users

Yes Marc that is correct I am only using jacoco:coverage tag and no offline instrumentation.The Junits work fine when executed without the jacoco:coverage tag.
Please find the stack trace

null
java.lang.ExceptionInInitializerError
at wt.fc.WTObject.<init>(WTObject.java:239)
at com.xxx.sc.disconnectedSystem._SCActivationRecord.<init>(_SCActivationRecord.java:4)
at com.xxx.sc.disconnectedSystem.SCActivationRecord.<init>(SCActivationRecord.java:55)
at com.xxx.sc.disconnectedSystem.SCActivationRecord.newSCActivationRecord(SCActivationRecord.java:69)
at com.xxx.sc.disconnectedSystem.SCActivationRecordTest.testNewSCActivationRecord(SCActivationRecordTest.java:9)
Caused by: java.util.MissingResourceException: Can't find resource for bundle wt.fc.fcResource_en, key 49
at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
at java.util.ResourceBundle.getObject(ResourceBundle.java:444)
at java.util.ResourceBundle.getString(ResourceBundle.java:407)
at wt.fc.WTObjectCounter.<clinit>(WTObjectCounter.java:401)

Marc R. Hoffmann

unread,
Jul 13, 2016, 2:15:25 AM7/13/16
to jac...@googlegroups.com
Thanks! I just noted that you mentioned multiple errors.

What is the very first error log or exception you see?

Regards,
-marc
--
Marc Hoffmann
hoff...@mountainminds.com
_______________________________________________
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

mohita...@gmail.com

unread,
Jul 13, 2016, 2:19:44 AM7/13/16
to JaCoCo and EclEmma Users
null
java.lang.ExceptionInInitializerError
at wt.fc.WTObject.<init>(WTObject.java:239).
This is the first exception which does not occur when running without the jacoco coverage tag.

Marc Hoffmann

unread,
Jul 13, 2016, 8:37:41 AM7/13/16
to jac...@googlegroups.com
Ok, again can you please provide a stack trace and the source code at
WTObject.java:239?
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages