This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Testing and the fly likes How to use the Junit with Struts and Springs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "How to use the Junit with Struts and Springs" Watch "How to use the Junit with Struts and Springs" New topic
Author

How to use the Junit with Struts and Springs

umesh annegirikar
Greenhorn

Joined: May 09, 2011
Posts: 28
hello
I want some illustrative code samples to use Junit in struts code Or Spring Code.
Also i want to know how to write the test cases ,Test Data using JUnit
Please guide me.



Thanks
Umesh




Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Hello, umesh.

In this post I show how to use JUnit with Hibernate/JPA. JUnit with HSQLDB, JPA and Hibernate.

You would need to pass your "entityManager/datasource/session" using a constructor to it.

If you want to call your app with your server running, you would have to use JMeter.


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
 
Don't get me started about those stupid light bulbs.
 
subject: How to use the Junit with Struts and Springs
 
Similar Threads
About JUnit with GUI
Test cases
Use JUnit?
Struts with Junit/HttpUnit
Tools for testing struts applications...