views:

43

answers:

2

Hi,

I'm using GWT RPC to connect to server side. On server side I've to connect to MySQL database, from which I get data I need. My question is which is best practice when I want to test my application, because I haven't deployed it yet on Tomcat app server, and it seems I cant test it, if it is not deployed. When I test it in development mode, I can't connect to database. Do I have to deploy it on Tomcat to test my application, or is there any other way.

P.S. I included JDBC driver, so that is not a problem.

A: 

You don't need to deploy to Tomcat or any other webserver to be able to test your application. Separate you test in several layers (JDBC or JPA layer, Service layer), use JUnit and Spring test and you'll be fine.

Take a look at this documentation: http://static.springsource.org/spring/docs/2.5.x/reference/testing.html

Frederic Conrotte
A: 
Vladimir