Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ooRexx unit tests - why display so short ?

22 views
Skip to first unread message

U.Zinngrebe

unread,
Apr 25, 2012, 7:02:37 PM4/25/12
to

dear all,

I'm looking into using the ooRexx framework for my own unit tests.
A detail I don't understand: why are failure messages so short ?

example:

[failure] [20080819 17:37:57.809000]
Test : TEST_MULTIPLE_INHERITANCE_WITH_MULTIPLE_METACLASSES
Class : Class.testGroup
File : E:\work.ooRexx\ooRexxUnit\3.2.0\ooRexx\base\class\Class.testGroup
Line : 576
Failed: assertEquals
Expect: [[’123.’], identityHash="495954478"]
Actual: [[’231.’], identityHash="421451928"]


This message does not list the unit method that was executed.
It does not give the values of instance variables.
So before I understand what went wrong there is manual work:
open the file to read the sources, edit for tracing, re-run the test.
And finally assemble copy-paste from the console log into a report.

Why isn't the failure message followed by a listing of the unit method,
like:

::method test_description_arg
parse source junk notUsed streamName
retString = stream(streamName, "Description")
p = pos(retSting, ":")
self~assertTrue(p > 0)

and some information (variable dump of the context, stack trace or trace
R/I) that gives values of variables ?

Would you know reasons (beyond the effort to change the framework) why it
wouldn't make sense to write out comprehensive failure messages ?

Maybe I don't understand how unit tests aer meant to be used, I have little
practical experience.

Cheers, Uli

Rony

unread,
May 3, 2012, 9:12:58 AM5/3/12
to
Uli,

it seems that Mark has gone to his trip already, hence stepping in: the unit test framework is
modelled after junit (cf. the numerous materials there). The tests just have the purpose to assess
that they succeed or fail and should only report, if the expectations of a test would not be met,
ie. that the program (suddenly?) does not behave as at the time when the tests got created.

The framework is not meant to give by default "deep information" like call stacks, source code and
the like. If you wanted, you could add such a functionality. However, usually it is more than
sufficient to see whether the tests pass in the intended way. If some do not pass the report givng
test and the file is usually more than sufficient to locate the test and study it.

HTH,

---rony
0 new messages