mardi 30 décembre 2014

Run main method on server for testing

I am using eclipse IDE with Apache Tomcat server. I have written a class that fetches data from database. I want to do unit test of this class by running its main class. As The function relies on Connection pool of server, I have to run in my server environment.


In eclipse when i run this class using (Run As --> Run On server), it runs it as a html file giving 404 error. Clearly, its not running the main method. So is there a way, I can do unit testing of such function with ease, without using some html interface.


Aucun commentaire:

Enregistrer un commentaire