Re: JUnit4 test cases using @Before, @After fail test?

2007-05-24 Thread berndq
Alexander Sack wrote: Dennis, thanks for the tip. Kinda obvious too...damn... Okay, so can someone tell me what I need to do to FORCE it to use junit4? I specific junit-4.0 in my dependencies (scope is test). My parent dom of the whole project has surefire plugin version set to 2.3. I

Re: JUnit4 test cases using @Before, @After fail test?

2007-05-24 Thread Alexander Sack
Bernd, thanks. That did it, I switched to 4.3.1 and now it all works. Weirdness. AFAIK I thought Junit4 begin with @Before but I could be wrong since 4.x is new to me (I just went to the FAQ and trieed out the test case just to make sure surefire was working properly and chaos ensued). Thanks

JUnit4 test cases using @Before, @After fail test?

2007-05-23 Thread Alexander Sack
Hey folks, is this a known issue that if I use @Before it will fail my test? I searched some of the archives and saw some threads go by about this. Is this still an issue? Thanks! -aps -- What lies behind us and what lies in front of us is of little concern to what lies within us. -Ralph

Re: JUnit4 test cases using @Before, @After fail test?

2007-05-23 Thread Tom Huybrechts
would you mind sharing some more information ? POMs, exceptions, test source, -X output ? As a general remark: make sure you have the latest surefire plugin... Tom On 5/23/07, Alexander Sack [EMAIL PROTECTED] wrote: Hey folks, is this a known issue that if I use @Before it will fail my test?

Re: JUnit4 test cases using @Before, @After fail test?

2007-05-23 Thread Alexander Sack
Tom, Thanks sorry. Yes I have specified in my root POM surefire-plugin 2.3 but not in my submodule one (I will try that right now). The test ource is the one straight out of the FAQ regarding the colleciton, very simple test, passes on 3.8.1 but fails when I move up to 4.0 using the surefire

Re: JUnit4 test cases using @Before, @After fail test?

2007-05-23 Thread Alexander Sack
Btw, considering that @Test works, I'm pretty positive I'm using 2.3 at this point. The only issue is the @Before seems to never get called. Anyone run into this before? -aps On 5/23/07, Alexander Sack [EMAIL PROTECTED] wrote: Tom, Thanks sorry. Yes I have specified in my root POM

Re: JUnit4 test cases using @Before, @After fail test?

2007-05-23 Thread Dennis Cook
It looks like junit 3.8 is still being used. The reason the method name prefix with 'test' will be called by the older version. The annotation is probably ignored. Change the name of the test method to another prefix, and I bet it will not be executed. Alexander Sack [EMAIL PROTECTED]

Re: JUnit4 test cases using @Before, @After fail test?

2007-05-23 Thread Alexander Sack
Dennis, thanks for the tip. Kinda obvious too...damn... Okay, so can someone tell me what I need to do to FORCE it to use junit4? I specific junit-4.0 in my dependencies (scope is test). My parent dom of the whole project has surefire plugin version set to 2.3. I mean what else do I have to