This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Project Structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Project Structure" Watch "Project Structure" New topic
Author

Project Structure

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208
Hi,

I have a java project that consists of source code, resources, unit tests, and system tests,

What is the best approach to the project structure for these?

Thanks,

Niall
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
I just use the maven standard directory layout: http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208
Thanks,

but http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html doesn't include system tests?
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
What exactly are these system tests and why can't they do under src/test/java?
Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208
Hi,

Thanks for your reply,

I know that this topic may be a question where there is no answer like a question which is better the number 6 or half a dozen :)

the reason why system tests arent good to have in src/test/java is that this is for unit test coverage on the code itself where system tests are system integration tests that arent used in the code coverage but used for testing on the system, so its not good to mix the unit tests with the system tests,

is there any recommended way to have the project structure for this?

Thanks,

Niall
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
When and how are the system tests run?
Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208
Hi,

The system tests are ran manually,

They are system integration tests or applications that are used for manual applications,

Thanks,

Niall
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
Maven can distinguish between integration tests through the maven-failsafe-plugin plugin.
Here is one way to do it:http://java.dzone.com/articles/separating-integration-and
 
wood burning stoves
 
subject: Project Structure