Sorry I forgot to include this, you need to have a test method in your suite class that calls the suite and runs it. Like So.
@Test public void testMe() { System.out.println("Running Suite AllTests"); TestResult t = junit.textui.TestRunner.run(suite()); if (t.failureCount() > 0) { fail("All Test suit Failed with " + t.failureCount() + " failures, please investigate SureFireReports"); } if (t.errorCount() > 0) { fail("There were errors in the AllTests suite count:" + t.errorCount()); } } Personally i run my suites on a separate run in order to not get mixed with the rest of the tests and invoke the suite manually like so mvn test -Dtest=SomeNameTest On 9/12/07, Farhan Sarwar <[EMAIL PROTECTED]> wrote: > > but does maven invoke these suites for you during its build-cycle? as > thats what i want > > On 9/12/07, Sebastian Johnck <[EMAIL PROTECTED]> wrote: > > I had the this way working for a while using annotations like so: > > @Suite.SuiteClasses( { ServicesSystemTestSuite.class }) > > @RunWith(Suite.class) > > Using junit 4.2, but library conflicts and some transitive dependency on > > junit 3.8 started causing errors. > > > > So now I have reverted to the old way like so: > > > > > > public static junit.framework.Test suite() { > > > > TestSuite suite = new TestSuite(); > > suite.addTestSuite(ServicesSystemTestSuite.class); > > > > return suite; > > } > > > > > > On 9/12/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote: > > > > > > I looked at it at one point and came to the same conclusion that > there's > > > no > > > support for running suites. Wouldn't mind be proven wrong though. > > > > > > Kalle > > > > > > > > > On 9/12/07, mfs <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hello Folks, > > > > > > > > Am looking into how having a suite in junit4 (or even earlier > versions) > > > > can > > > > integrate with the way maven2 runs the junit test-cases, i mean if > we > > > are > > > > using maven to run the test-cases, can having a suite make any > > > > difference?...because maven eventually will be running all methods > which > > > > have @Test as a prefix (for Junit 4) or otherwise run methods with > test > > > as > > > > prefix (for junit3 and earlier). Does sure-fire plugin has any > support > > > for > > > > it ? doesnt seem so ? > > > > > > > > Thanks and Regards, > > > > > > > > Farhan. > > > > -- > > > > View this message in context: > > > > > > > > http://www.nabble.com/suite-in-junit-and-maven-2---do-they-work-together-tf4430242s177.html#a12638433 > > > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > -- > > Sebastian Johnck > > (415) 425 - 8361 > > > > ~~~~~~~~~~~~~~~~~~~ > > MotionBased Technologies > > 180 Harbor Dr. > > Sausalito, CA 94965 > > www.motionbased.com > > Coordinates: > > N 37° 51' 33" > > W 122° 29' 08" > > ~~~~~~~~~~~~~~~~~~~ > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Sebastian Johnck (415) 425 - 8361 ~~~~~~~~~~~~~~~~~~~ MotionBased Technologies 180 Harbor Dr. Sausalito, CA 94965 www.motionbased.com Coordinates: N 37° 51' 33" W 122° 29' 08" ~~~~~~~~~~~~~~~~~~~