I have a maven project with packaging set to ejb. I would like to test
this project outside an ejb container by simply calling POJO classes
inside it. I have written a very simple test using TestNG:

 

public class UserServiceTest {

 

    @Test

    public void testGetAllUsers() {

        ...

    }

}

 

However, when Maven runs it says running UserServiceTest, but does not
run the single test inside it. Here's the output:

 

Running org.andromda.timetracker.service.UserServiceTest

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.07 sec

 

1)       Why is Maven skipping my test?

2)       What is the test supposed to run on: classes in the "classes"
directory or the packaged jar. I suspect it is the former, because it
seems that the packaging is done after the tests are run. If this is
indeed true then, it should really not matter that I am trying to test a
project that will be packaged as an ejb. Correct?

 

Thanks.

 

Naresh

Reply via email to