Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate/Code Coverage(Emma plugin)

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • 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.


 
Javid Jamae
Author
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show the entire stack trace?
 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javid here is the complete stack trace.

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic