You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Christian Grobmeier <gr...@gmail.com> on 2011/10/03 23:09:01 UTC

[ognl] Testcases confusion

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? 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?

Cheers
Christian

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


Re: [ognl] Testcases confusion

Posted by Christian Grobmeier <gr...@gmail.com>.
> 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.

I agree. I have opened a Jira issue, we need to improve that.
https://issues.apache.org/jira/browse/OGNL-26

Cheers and thanks for your feedback.

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


Re: [ognl] Testcases confusion

Posted by sebb <se...@gmail.com>.
On 3 October 2011 22:09, Christian Grobmeier <gr...@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