Home » Archived » Buckminster » JUnit command runs but reports no tests and no errors
| |
Re: JUnit command runs but reports no tests and no errors [message #637774 is a reply to message #637656] |
Mon, 08 November 2010 19:18 |
Daniel Ford Messages: 148 Registered: July 2009 Location: New York |
Senior Member |
|
|
Thanks, I gave it try, but got the same result. I then thought that
maybe it was an undocumented difference between JUnit3 and JUnit4 test
case handling, so I used the Junit4TestAdapter to see if adapting my
JUnit4 test case would get it recognized. That didn't work either, same
result, no failures, no errors, no output, no error messages, and no
ignored tests reported.
Anybody have any other ideas?
Dan
On 11/8/2010 4:07 AM, Philipp Nanz wrote:
> Hi Dan, maybe this will help:
> http://www.eclipse.org/forums/index.php?t=msg&th=171582& amp;start=0&S=1f0bfc3c80e6f0b5d67d63ed48fe5cba
>
|
|
|
Re: JUnit command runs but reports no tests and no errors [message #637790 is a reply to message #637774] |
Mon, 08 November 2010 20:25 |
Daniel Ford Messages: 148 Registered: July 2009 Location: New York |
Senior Member |
|
|
I got everything to work finally, but I'm not sure exactly what was
going wrong. However, Buckminster is still reporting that no tests were
run and that none were ignored. This is confusing to say the least. I
was having trouble getting Hudson to find the test output at the same
time, so I'm wondering if things weren't actually working to begin with,
but that I didn't examine the output file because Buckminster was
reporting that no tests were found, passed, failed, or ignored (the
output file is buried on a different build machine). Perhaps the test
case accounting is only correct for JUnit3? That would explain why my
JUnit4 test "didn't count."
One thing I did differently was in the launch configuration, I changed
from executing all of the tests in the package, to just a specific test.
Can't see why this made a difference given that there was only one
test in the package.
Dan
On 11/8/2010 2:18 PM, Daniel Ford wrote:
> Thanks, I gave it try, but got the same result. I then thought that
> maybe it was an undocumented difference between JUnit3 and JUnit4 test
> case handling, so I used the Junit4TestAdapter to see if adapting my
> JUnit4 test case would get it recognized. That didn't work either, same
> result, no failures, no errors, no output, no error messages, and no
> ignored tests reported.
>
> Anybody have any other ideas?
>
> Dan
>
>
> On 11/8/2010 4:07 AM, Philipp Nanz wrote:
>> Hi Dan, maybe this will help:
>> http://www.eclipse.org/forums/index.php?t=msg&th=171582& amp;start=0&S=1f0bfc3c80e6f0b5d67d63ed48fe5cba
>>
>>
>
|
|
|
Re: JUnit command runs but reports no tests and no errors [message #638110 is a reply to message #637790] |
Tue, 09 November 2010 23:10 |
Daniel Ford Messages: 148 Registered: July 2009 Location: New York |
Senior Member |
|
|
I finally figured out the problem.
My JUnit4 test case was failing (correctly) in a method annotated with
@BeforeClass. This method is run before the actual test methods
(annotated with @Test) are run. A failure at this point of the test
process seems to be ignored by Buckminster. This would explain why
Buckminster reported no tests passing, failing or being ignored as none
of the methods annotated with @Test were actually entered. The entire
test process failed in the initialization code before it got to those
methods.
This problem compounds itself when running in Hudson as it seems that
Hudson ignores this type of failure as well, even though the JUnit test
report output clearly contains the failure. The problem is that the
failure is associated not with the individual tests, but with the suite
of tests; the individual tests are listed in the report with no failures
associated with them specifically. The net result is that Hudson shows
all tests as having passed, when, in fact, they ALL FAILED!
Dan
On 11/8/2010 3:25 PM, Daniel Ford wrote:
> I got everything to work finally, but I'm not sure exactly what was
> going wrong. However, Buckminster is still reporting that no tests were
> run and that none were ignored. This is confusing to say the least. I
> was having trouble getting Hudson to find the test output at the same
> time, so I'm wondering if things weren't actually working to begin with,
> but that I didn't examine the output file because Buckminster was
> reporting that no tests were found, passed, failed, or ignored (the
> output file is buried on a different build machine). Perhaps the test
> case accounting is only correct for JUnit3? That would explain why my
> JUnit4 test "didn't count."
>
> One thing I did differently was in the launch configuration, I changed
> from executing all of the tests in the package, to just a specific test.
> Can't see why this made a difference given that there was only one test
> in the package.
>
> Dan
>
>
> On 11/8/2010 2:18 PM, Daniel Ford wrote:
>> Thanks, I gave it try, but got the same result. I then thought that
>> maybe it was an undocumented difference between JUnit3 and JUnit4 test
>> case handling, so I used the Junit4TestAdapter to see if adapting my
>> JUnit4 test case would get it recognized. That didn't work either, same
>> result, no failures, no errors, no output, no error messages, and no
>> ignored tests reported.
>>
>> Anybody have any other ideas?
>>
>> Dan
>>
>>
>> On 11/8/2010 4:07 AM, Philipp Nanz wrote:
>>> Hi Dan, maybe this will help:
>>> http://www.eclipse.org/forums/index.php?t=msg&th=171582& amp;start=0&S=1f0bfc3c80e6f0b5d67d63ed48fe5cba
>>>
>>>
>>>
>>
>
|
|
| | |
Goto Forum:
Current Time: Thu Sep 26 13:56:18 GMT 2024
Powered by FUDForum. Page generated in 0.02808 seconds
|