views:

553

answers:

1

I'm just getting started with a project that combines GWT, Google App Engine and the Google Eclipse plugin. Where is the best place to store my tests? I normally keep my code organized Maven-style, with src/main/java, and tests in src/test/java. The default setup I get from the plugin dumped my source directly into src, which I'm not too fond of, but I'd prefer not to fight against the tools. What's the "standard" place to put unit tests in such a project?

Solution:

  • create src/main/java, move the existing code under there
  • create src/test/java, add your tests here
  • go to Project -> Properties -> Java Build Path, add the new locations as Source Folders.
+3  A: 

Put it where it pains you least.

GWT on Google App Engine is pretty new at this point; you are optimistic to expect there is a "standard" place, especially since you've already found an inconsistency in what the tools do.

Since you've already accepted the source starting at "src/", why not put the test source in "test/"? This is certainly standard in many contexts.

Glenn