Forum Stats

  • 3,853,828 Users
  • 2,264,280 Discussions
  • 7,905,459 Comments

Discussions

Java EE: Tips to speed up development wanted!

856371
856371 Member Posts: 15
edited Oct 31, 2011 5:08AM in Java Servlet
I'm programming Java EE. Our web server is Jetty. I build my .wars using Maven. I run Jetty locally on my development PC and I've learned to use hot deploy to speed up the process somewhat. But it still takes 24 seconds to recompile and re-initialize the Spring Webroot Context. Is it possible to use TestNG or JUnit to just run a small test without re-initializing the Spring Webroot Context in order to speed up the build-test-re-build-cycle?

Answers

  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    Well since in a unit test you test something small, you shouldn't need the entire Spring context to be able to run tests. Perhaps you'll need to manually inject some required objects which would normally be initialized by Spring. But in the end it depends greatly on your application design, so there is no clear yes or no answer. Start small and pick one piece of business logic in your application, then see if you can create some tests around it without too much effort.
This discussion has been closed.