Do you have classes with 'Test' in the name, but without any @Test annotations - e.g..test helper classes

Surefire has the (stupid) habit of treating all classes with 'Test' in the name as test classes.
See
http://jira.codehaus.org/browse/SUREFIRE-482

Christoph

Am 12.05.2010 20:23, schrieb sauravs:

Hi Peter,

Thanks for the reply.
(a) Code for the test suite for the eclipse

<code>
@RunWith(Suite.class)
@SuiteClasses( {ExtensionTest.class,EditorTest.class} )
public class BaseFrameworkTestSuite {
        

        
}
</code>

(b) The suite runs successfully from the Eclipse.

I think the tests are being run as Junit-4.Where exactly do you want me to
look in for that?.
Becuase other Junit 4 tests which are in other plug-ins are running fine.

Best Regards,
Saurav

Peter Niederwieser wrote:

You should provide more information:

- Source code of your test suite
- Can you run the suite from Eclipse?
- etc.

If you asked me to guess, I'd say that for some reason, your tests are run
as JUnit3 tests, but there aren't any methods whose name starts with
"test" (because you've used JUnit4-style @Test annotations).

Cheers,
Peter


sauravs wrote:

Hi All,

I am using Surefire to run my Junit tests for Eclipse based plug-ins.

I keep getting the following error while running the tests.

java.lang.exception no runnable methods

Where in a have a TestSuite and the TestSuite has a test class.
The test class ends with test and all the methods have @test annotations
associated with it.

I am using JUnit 4 and Eclipse 3.5.

Please help me to resolve the problem.

Thanks and Regards,
Saurav






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to