Re: Maven2 and JUnit4

2007-03-21 Thread Marcos Silva Pereira

Hello, Tom, thanks for your answer.

Are you sure you are using the latest surefire ?


Well, it is the problem. Maven was using surefire 2.0, so when I run "mvn
clean test -U" everything works fine.

Again, thank you very much.

Kind Regards

--
Marcos Silva Pereira
recife - pe
[EMAIL PROTECTED]
skype: marcos.silva.pereira
http://blastemica.blogspot.com


Re: Maven2 and JUnit4

2007-03-20 Thread Tom Huybrechts

Are you sure you are using the latest surefire ?
Can you run with -X ?

Tom

On 3/20/07, Marcos Silva Pereira <[EMAIL PROTECTED]> wrote:

Ok, I now that this is a so much frequent question, but I can't find a neat
thread about this issue. I already have take a look at surefire plugin doc
and JIRA without success. In surefire how
toyou
can see this statement:

"Which providers are available is controlled simply by the inclusion of the
appropriate dependencies (ie, junit:junit for JUnit, org.testng:testng
4.7+for TestNG). Since this is required to compile the test classes
anyway, no
additional configuration is required."

JUnit 4 is configured in the following way:


junit
junit
4.2
test


But I catch some test failures when my tests except some exception:

@Test(expected = IllegalStateException.class)
public final void testSomethingBah() throws Exception {
...
}

So, how I can configure Maven/Surefire to correctly run JUnit 4 tests?

Kind Regards,

--
Marcos Silva Pereira
recife - pe
[EMAIL PROTECTED]
skype: marcos.silva.pereira
http://blastemica.blogspot.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Maven2 and JUnit4

2007-03-19 Thread Marcos Silva Pereira

Ok, I now that this is a so much frequent question, but I can't find a neat
thread about this issue. I already have take a look at surefire plugin doc
and JIRA without success. In surefire how
toyou
can see this statement:

"Which providers are available is controlled simply by the inclusion of the
appropriate dependencies (ie, junit:junit for JUnit, org.testng:testng
4.7+for TestNG). Since this is required to compile the test classes
anyway, no
additional configuration is required."

JUnit 4 is configured in the following way:


   junit
   junit
   4.2
   test


But I catch some test failures when my tests except some exception:

@Test(expected = IllegalStateException.class)
public final void testSomethingBah() throws Exception {
...
}

So, how I can configure Maven/Surefire to correctly run JUnit 4 tests?

Kind Regards,

--
Marcos Silva Pereira
recife - pe
[EMAIL PROTECTED]
skype: marcos.silva.pereira
http://blastemica.blogspot.com