• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

hibernate/Code Coverage(Emma plugin)

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have an application using Spring,Hibernate(Eclipse IDE) and I have written few Easy Mock unit tests and also few integration tests. I am using Emma for Code Coverage.

1. I run the Junit (Run As Junit)it works fine.
2. I use the Easy Mock for unit tests, they run fine and also the Code Coverage works fine.

problem is

3. When I use the Code Coverage(Coverage As) on the integration tests, all the queries in query files fail with the following exception(s),



Mappings are ok because the Junit Integration tests pass. For some reason the Code Coverage Emma is not picking up the hbm files folder.
What could be the reason for the Code Coverage Emma to fail(errors out) on Integration Tests.


 
Author
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you show the entire stack trace?
 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Javid here is the complete stack trace.

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
So far this is what I have found out..

1. I have my queries in a different package at the same level as the hibernate POJO's.
2. I have the folder mapped in my context file as


3. I am using just the class name in my queries file (not the complete package name )

4. I changed my queries to use the complete package name and now I am getting this



5. As I said before without using the complete package name normal junits run fine but the code coverage emma fails.
reply
    Bookmark Topic Watch Topic
  • New Topic