Re: Maven-Surefire: Unable to run the Junit

2010-05-12 Thread 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Maven-Surefire%3A-Unable-to-run-the-Junits-tp28535615p28539454.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Maven-Surefire: Unable to run the Junit

2010-05-12 Thread Christoph Kutzinski
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



Re: Maven-Surefire: Unable to run the Junit

2010-05-12 Thread Peter Niederwieser

Right, that's another likely cause I've battled with in the past. Now my bet
is on this one. :-)


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

-- 
View this message in context: 
http://old.nabble.com/Maven-Surefire%3A-Unable-to-run-the-Junits-tp28535615p28542411.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Maven-Surefire: Unable to run the Junit

2010-05-12 Thread sauravs

Thanks again Peter and Christoph for the replies.

Nope i dont have any helper classes.
I had looked at the surefire bug earlier but of to no avail.
I do have helper methods with no test annotations but i dont think that has
this ability
to create this havoc :).


Peter Niederwieser wrote:
 
 Right, that's another likely cause I've battled with in the past. Now my
 bet is on this one. :-)
 
 
 Christoph Kutzinski wrote:
 
 Do you have classes with 'Test' in the name, but without any @Test 
 annotations - e.g..test helper classes
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Maven-Surefire%3A-Unable-to-run-the-Junits-tp28535615p28543499.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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