Rafael,

I am using Junit 4.5

My test class is as follows

import org.junit.Test;
import junit.framework.Assert;

public class TestContract {

    @Test
    public void testCom() throws Exception
    {                        
                        Assert.assertEquals(true, true);                        
    }
}
    
When
I issue "mvn test" from command prompt it works fine. It even works
fine if I right click on component/module in eclipse and choose mvn
test menu. But when I right click on test class in package explorer and
ask it to run as junit test then  it says "No JUnit Tests Found". Any
idea what is going on ?

Thanks,

Petr

--- On Wed, 11/5/08, Rafael Trestini <[EMAIL PROTECTED]> wrote:
From: Rafael Trestini <[EMAIL PROTECTED]>
Subject: Re: Can I run individual test in maven
To: "Maven Users List" <users@maven.apache.org>, [EMAIL PROTECTED]
Date: Wednesday, November 5, 2008, 12:06 AM

Petr,

Please, let me know: are you using junit to code your test cases? If
yes, eclipse has a "native" plugin to deal with junit - no maven or
m2eclipse is needed. Is just to open your test case, Run As, JUnit
Test Case.

When 'mvn test' is running, it means that all test cases will be
executed, to ensure that the package is not "broken" due to logical
errors.

Rafael Trestini

On Tue, Nov 4, 2008 at 4:49 PM, Petr V. <[EMAIL PROTECTED]> wrote:
> When I issue "mvn test" command, all my tests in test directory
are executed, what if I need to run some particular test(assuming we have
different test classes instead of one big test class). And is it possible in
eclipse to run one particular test with m2eclipse ?
>
> Thanks,
>
> Petr
>
>
>
>



-- 
Responsibility is the price of freedom



      

Reply via email to