Can't run Maven tests [message #22104] |
Wed, 25 February 2009 16:42  |
Eclipse User |
|
|
|
Originally posted by: sadsdfd.asds.com
I have made a Maven project, where I have made a test file in a package
in/src/test/java:
package mytestpackage
import static org.junit.Assert.*;
import org.junit.Test;
public class TableTest{
@Test
public void myFirstTest() throws Exception {
assertEquals("asd","asd");
}
@Test
public void mySecondTest() throws Exception {
assertEquals("asd2","asd2");
}
}
But when I right click on the Maven project (parent) and choose:
Run As -> Maven test
The test in not run, and I just get:
....
....
[INFO] ------------------------------------------------------------ ------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------ ------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Feb 25 22:38:21 CET 2009
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------ ------------
What do I need to do to enable the maven tests?
|
|
|
|
|
Re: Can't run Maven tests [message #22236 is a reply to message #22193] |
Thu, 26 February 2009 13:25  |
Eclipse User |
|
|
|
Originally posted by: sadsdfd.asds.com
Problem solved. Child modules should use 'jar' packaging and NOT 'pom'
packaging.
"JS" <sadsdfd@asds.com> wrote in message
news:go4ert$201$1@build.eclipse.org...
> Extending Test Case does not help.
>
> I have access to another Maven project that uses something called
> surefire:
>
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> C:\Users\js\workspace2\parent\model\target\surefire-reports
>
> I think that might be needed to run a maven test, but cannot make it work
> on my new clean project.
>
>
>
>
> "Jesse McConnell" <jesse.mcconnell@gmail.com> wrote in message
> news:go4egt$qhb$1@build.eclipse.org...
>> try having the test case extend TestCase
>>
>> then it should be picked up
>>
>> jesse
>>
>> JS wrote:
>>> I have made a Maven project, where I have made a test file in a package
>>> in/src/test/java:
>>>
>>> package mytestpackage
>>>
>>> import static org.junit.Assert.*;
>>>
>>> import org.junit.Test;
>>>
>>> public class TableTest{
>>>
>>> @Test
>>> public void myFirstTest() throws Exception {
>>> assertEquals("asd","asd");
>>> }
>>>
>>> @Test
>>> public void mySecondTest() throws Exception {
>>> assertEquals("asd2","asd2");
>>> }
>>>
>>>
>>> }
>>>
>>>
>>> But when I right click on the Maven project (parent) and choose:
>>>
>>> Run As -> Maven test
>>>
>>> The test in not run, and I just get:
>>>
>>> ...
>>> ...
>>> [INFO] ------------------------------------------------------------ ------------
>>> [INFO] BUILD SUCCESSFUL
>>> [INFO] ------------------------------------------------------------ ------------
>>> [INFO] Total time: < 1 second
>>> [INFO] Finished at: Wed Feb 25 22:38:21 CET 2009
>>> [INFO] Final Memory: 1M/4M
>>> [INFO] ------------------------------------------------------------ ------------
>>>
>>>
>>>
>>> What do I need to do to enable the maven tests?
>>>
>>>
>>>
>>>
>>>
|
|
|
Powered by
FUDForum. Page generated in 0.02961 seconds