You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by "Boulatian, Misak" <mi...@vantra.com> on 2003/02/12 00:02:44 UTC
failures and errors are reversed in cactus compared with junit
Hi all,
I am a newbe in cactus but I know junit very well. One thing I've noticed
that cactus reverses failures with errors. If I test my ejbs outside
container and one of my assertEquals fails then junit reports 1 failure, 0
error. If I test the same condition within cactus, I get 1 error, 0 failure.
I wonder why cactus is switching it because assertEquals failure is failure
and not an error!!! If someone can respond I would really appreciate it.
I am using cactus 1.4.1 and junit 3.8.1.
Thanks,<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" />
Misak M. Boulatian
Re: failures and errors are reversed in cactus compared with junit
Posted by Paul Christmann <pa...@priorartisans.com>.
> even likely?) that your cactus testing is using junit 3.7. That version
> of junit did not support assertEquals. So in that case, you will get an
Sorry, but I just realized that the above statement is not true. I
double checked the JUnit 3.7 javadocs and "assertEquals" was included.
I did encounter the issue that I described, but it was with
"assertFalse", not "assertEquals".
PC
Re: failures and errors are reversed in cactus compared with junit
Posted by Paul Christmann <pa...@priorartisans.com>.
Cactus 1.4.1 was distributed with junit 3.7. So its quite possible (or
even likely?) that your cactus testing is using junit 3.7. That version
of junit did not support assertEquals. So in that case, you will get an
error -- its not that the assertEquals condition failed, its that the
method "assertEquals" is not found.
I encountered something similar, and had to replace the junit.jar from
the cactus 1.4.1 distribution with the newer junit.jar. And I do see
that failed error conditions are properly reported as Failures, not Errors.
I'm not doing ejb testing, though, so if there is something specific
about ejb in-container vs. out-container testing, feel free to ignore
this...
Paul Christmann
Boulatian, Misak wrote:
> Hi all,
>
> I am a newbe in cactus but I know junit very well. One thing I've noticed
> that cactus reverses failures with errors. If I test my ejbs outside
> container and one of my assertEquals fails then junit reports 1 failure, 0
> error. If I test the same condition within cactus, I get 1 error, 0 failure.
> I wonder why cactus is switching it because assertEquals failure is failure
> and not an error!!! If someone can respond I would really appreciate it.
> I am using cactus 1.4.1 and junit 3.8.1.
>
>
> Thanks,<?xml:namespace prefix = o ns =
> "urn:schemas-microsoft-com:office:office" />
>
> Misak M. Boulatian
>
>
>