Hi Kostas, As Wayne answered, this would rather be a Junit question than a maven question ;-)
With junit 3, you can override the "public void run(TestResult)" : inside this method, the getName() method will return the current "test name" which corresponds to the test method to execute for the current test case. Then, you could be able to check a property of your choice defining the FQN+method name to precisely execute (given to maven via -Dtest.class.toExecute=foo.bar.MyTest.myTest) => you'll call super.run(TestResult) if and only if : - your property is set and getClass().getName()+"."+getName() corresponds to your current system property value OR - your property is not set => That implies a refactoring of every of your test classes in order to be able to inherit from you super testcase class overriding the run(TestResult) method. Cheers, Frederic 2009/5/3 Wayne Fay <[email protected]> > > Do you know if surefire allows to explicitly test one method only? Is > there > > a way to achive that at all? > > Put each of your tests into different classes, with one method each. > > Or write an Ant script or something to do this, and just let Maven do > the compile etc, then you run the test manually. > > This really falls outside the scope of normal Maven usage which is why > its not supported. > > Wayne > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
