This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Testing and the fly likes integration test via AbstractTransactionalDataSourceSpringContextTests Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » Testing
Reply Bookmark "integration test via AbstractTransactionalDataSourceSpringContextTests" Watch "integration test via AbstractTransactionalDataSourceSpringContextTests" New topic
Author

integration test via AbstractTransactionalDataSourceSpringContextTests

manu chaox
Ranch Hand

Joined: Apr 10, 2006
Posts: 110
Hi,
I would like to use extend AbstractTransactionalDataSourceSpringContextTests or something else to not need delete rows temporary created during integration tests. I afraid I have a problem with transactions of test methods. First I am newbie, I have wroted a test method which checks concrete implementation of generics dao. It is common crud functionality. In the test method :

Note: Before test running there is no row in the database.



If I run the content of the test method in the main method (without asserts) then all works fine, it saves into database.
In the meantime I have solved this problem that I extend AbstractDependencyInjectionSpringContextTests and delete each row via hibernateTemplate. But this solution doesn't make sense. Why do I make something what can do a transaction.

Please, could anyone explain this behavior or where can I make mistake ? I have tried so much version of code that I am desperate from it.
I will very happy for your help.



--------------------------------------------------------------------------------
Before test running or running main I get this exception. It appears that there isn't any relationship with the behavior see above. But as I have written I am newbie.
It throws an exception which it appears it hasn't any influence to test.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: integration test via AbstractTransactionalDataSourceSpringContextTests
 
Similar Threads
Spring Error Log
Integration tests doesn't work after upgrading spring from 2.5.1 to (2.5.6.SEC01)
Error In creating bean with name sessionFactory
Error Log from Console
hibernate/Code Coverage(Emma plugin)