commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [ognl] Testcases confusion
Date Mon, 03 Oct 2011 22:35:04 GMT
On 3 October 2011 22:09, Christian Grobmeier <grobmeier@gmail.com> wrote:
> Hi,
>
> I just runned the test cases of ognl (first time I am afraid :-().
> They all end up green, but throw console exceptions. Is this ok?

Informational console messages should generally be avoided in test cases.
If not, they obscure the actual test results.

Errors should not be reported as console messages, but as assertion
failures, otherwise automated testing is pointless.

I just ran a test. The output is very confusing.

A short example is:

>>>
Running org.apache.commons.ognl.test.ObjectIndexedPropertyTest
Caught exception org.apache.commons.ognl.OgnlException:
DynamicSubscript '[$]' not allowed for object indexed property
'attribute'
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
<<<

It's not clear whether the exception is expected, in which case the
output should be suppressed, or an error, in which case the test
should just be allowed to fail with the exception.

> I was looking into the test cases but they are, well, pretty different from
> what I am used so I thought I better ask. From what I understood I
> would say everything fine, just a few potential errors tested.
>
> Right?

I think it's impossible to say without careful study of the test cases.

> Cheers
> Christian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message