harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@pobox.com>
Subject Re: [classlib][Instrument] Documents for non-unit-tests (was Re:[classlib] Plan on work on java.lang.instrument)
Date Mon, 07 Aug 2006 11:27:03 GMT


Jimmy, Jing Lv wrote:
> Geir Magnusson Jr wrote:
>>
>> Jimmy, Jing Lv wrote:
>>> Richard Liang wrote:
>>>>
>>>> Jimmy, Jing Lv wrote:
>>>>> Hi,
>>>>>
>>>>>     As it is hard to write unit test for package instrument, I now
>>>>> have an idea: write down some documents for details of non-unit test
>>>>> cases for instrument. The detail of such test cases contain:
>>>> Do you mean it's hard to *write* unit test or it's hard to integrate
>>>> the tests with Harmony build system?
>>>>
>>> Hard to write unit test, so record them in some document may be a better
>>> way :)
>>
>> Why is it hard to create unit tests?
>>
> 
> To test java.lang.instrument, mostly we need to start up a new VM to see
> its behavior. Its function(premain, etc) may be run before most classes
> loaded, and almost all exceptions will cause VM abort. And the result is
> hard to be checked automatic. What's more, extra java/c code is needed
> for the test.


So...?  It just means we need a different kind of testing framework,
right?  I never believed that a unit test framework like TestNG or JUnit
would satisfy all our testing needs.

We *better* have a repeatable, mechanical, automated way of testing this.

> One thought was that we can use exec("java commands") in junit(is that
> OK to run exec in tests?), but how to check its output is still a problem.

Luke!  Let go of your JUnit and let the testing force flow through you!

> 
> I'll put unit test if any, but I believe most necessary and important
> tests are non-unit tests.

Absolutely agreed.  That doesn't mean they are human run though.

geir


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message