Test suite naming convention and package hierarchy. Need suggestion....

"Oleskandr" <[email protected]>
Newsgroups gmane.comp.java.junit.user
Message-ID <[email protected]>
I ask my question at:

  http://stackoverflow.com/questions/14894067/path-or-naming-shema-for-files-with-classes-that-marked-by-suiteclasses-junit4

and don't receive any answer. So I read JUnit FAQ and post here...

I involved into project where:

 * Test files with classes which marked as @SuiteClasses placed
   in same packages as regular tests.

This cause problem that test eexecuted twice or more times on "mvn test":

  includes tags for surefire plug-in look like
  <include>com/company/project/core/**/*Test.java</include> in our pom.xml

  we have naming schema for suites like: <PREFIX>SuiteTest.java

 * Recently I integrate DbUnit to project. Running DbUnit test
   from IDE or test-suite which refer for DbUnit tests from IDE
   are ok.

   But from command line it stuck on DbUnit test forever if any
   test-suite refer to any DbUnit tests.

This cause CI Jenkins to stop building and delivering project
build to manual-test team...

================================================================

To resolve issue I think to rename our test-guites to

  <PREFIX>TestSuite.java

to distinct from <PREFIX>Test.java pattern. Also I think that it
is good practice to move all test-suites to separate package:

  com/company/project/testsuite/<PREFIX>Suite.java

Some points to naming schema I fount in FAQ:

  http://junit.sourceforge.net/doc/faq/faq.htm#organize

but FAQ is silent about test-suites...

Any suggection for best practice for naming suites are welcome!




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/junit/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/junit/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.