How should I unit test Spring, Hibernate and Struts using junit?

If you want to perform integration tests on code that accesses database, you may benefit from using DBUnit DBUnit can load test data into the database before each test. This can help you compare the result of the test case against an expected set of values.

If you want to perform integration tests on code that accesses database, you may benefit from using DBUnit. DBUnit can load test data into the database before each test. This can help you compare the result of the test case against an expected set of values.

This blogpost of mine describes a process of unit-testing using spring, hibernate and maven. The maven part can be substituted with your particular build facilities. Тesting Struts (not Structs, I guess) depends on your struts/spring integration.

Anyway take a look at StrutsTestCase and this article about StrutsUT.

Thanks for the link, but I find your blog too general. – TiansHUo Mar 9 '10 at 9:43 1 it is quite concrete, I think. These are the exact steps I take when testing a spring app.

– Bozho Mar 9 '10 at 9:49.

For bernate unit testing you can use HSQL DB : Unit-testing should have as few barriers as possible. For relational databases those barriers range from external dependencies (is the database running? ) to speed to keeping the relational schema synchronized with your object model.

For these reasons it is vital to keep database access code away from the core object model and to test as much as possible without touching a real database. theserverside.com/tt/articles/article.ts....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions