you should ask in the mailing list of the eclipse plugin you are using
On 9/18/07, siegfried <[EMAIL PROTECTED]> wrote:
>
> Thanks, Carlos
>
> I'm running Eclipse SDK 3.3.0.
> I have created a new empty project. I use maven to download junit4.0.jar
> into the Maven2 Dependences.
>
> I've tried adding a unit test as described at
> http://m2eclipse.codehaus.org/Maven_2.0_Plugin_for_Eclipse.html
>
> I'm using junit4 instead of 3.8. The problem is that neither maven nor
> eclipse can find and run my tests.
> Below are more details.
> Thanks,
> Siegfried
>
> I right click on the project -> new -> Junit Test and it creates a package
> for me that is in the top level directory for that project? Should it not be
>
> under main/test?
>
> Well here is my test:
>
> package m2Test;
> import static org.junit.Assert.*;
> import org.junit.Assert;
> public class simple2 {
> @Test
> public void simple(){
> Assert.assertNotNull(new String());
> }
> }
>
> Well I right click on the project again and select Run As -> JUnit Test and
> it says 'No tests found with test runner 'JUnit 4'. Why not?
>
> So then I move the test into the main/test and I still get the same result.
> So then I try a JUnit 3 test and that does not work either (scroll way down
> to see my JUnit3 test). So then I try to get maven to execute the tests (I
> right click on pom.xml, select run as -> maven 2 buld ) and it cannot find
> any tests to run either. Maven does run a C++ project in the same workspace!
>
> Is this an eclipse problem or a maven plugin problem.
>
> Here is the log from right clicking on pom.xml and run the "test" goal:
>
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Building Unnamed - demo:Maven_Hibernate_Spring_Demo:jar:0.0.1
>
> [INFO] task-segment: [test]
>
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] resources:resources
>
> [INFO] Using default encoding to copy filtered resources.
>
> [INFO] compiler:compile
>
> [INFO] No sources to compile
>
> [INFO] resources:testResources
>
> [INFO] Using default encoding to copy filtered resources.
>
> [INFO] compiler:testCompile
>
> [INFO] No sources to compile
>
> [INFO] surefire:test
>
> [INFO] No tests to run.
>
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] BUILD SUCCESSFUL
>
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Total time: 0 second
>
> [INFO] Finished at: Mon Sep 17 23:01:40 MDT 2007
>
> [INFO] Memory 2M/6M
>
> [INFO]
> ----------------------------------------------------------------------------
>
> // JUnit 3 test:
>
> /**
> *
> */
> package m2Test;
>
> import junit.framework.TestCase;
>
> /**
> * @author Siegfried Heintze
> *
> */
> public class SimpleJUnit3 extends TestCase {
>
> /**
> * @param name
> */
> public SimpleJUnit3(String name) {
> super(name);
> }
>
> /* (non-Javadoc)
> * @see junit.framework.TestCase#setUp()
> */
> protected void setUp() throws Exception {
> super.setUp();
> }
>
> /* (non-Javadoc)
> * @see junit.framework.TestCase#tearDown()
> */
> protected void tearDown() throws Exception {
> super.tearDown();
> }
> public testSimple(){
> SimpleJUnit3 s = new SimpleJUnit3("demo");
> assertNotNull(s);
> }
>
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]