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: Long,long testcase name...
Date Tue, 11 Apr 2006 10:08:52 GMT


LvJimmy,Jing wrote:
> 2006/4/11, Geir Magnusson Jr <geir@pobox.com>:
>> testRequestPasswordAuthentication1()
>>
>> I mean, why do we want to embed all that crap in the testcase name?  Who
>> cares?  The only person that will care is someone fixing when a testcase
>> breaks, and they'll read the code...
> 
> 
> To make our code easy and clear to read, a good naming convention is
> necessary as I think, that's why I dare say
> testRequestPasswordAuthentication1() is not so good for people to tell which
> method is tested here. The current naming convention is not bad but take too
> mang characters.
> Your opinion?:)

I think you are tugging my chain.

You are suggesting that :

test_requestPasswordAuthentication_java_lang_String_java_net_InetAddress_int_java_lang_String_java_lang_String_java_lang_String_java_net_URL_java_net_Authenticator_RequestorType()

makes the code easy and clear to read, better than

testRequestPasswordAuthentication1()

(for example) especially since when you go look at the code you will see
all package and argument information?

Is there any situation you can imagine where knowing all of that
information when reviewing a test run report is more useful than knowing
that method X in class Y in package Z failed, where X, Y and Z are
canconical forms of each?

geir

> 
> geir
>>
>> LvJimmy,Jing wrote:
>>> Hi all:
>>>
>>>     Following our testcase naming convention, I've find a name as: (hope
>> it
>>> won't break your screen :))
>>> public void
>>>
>> test_requestPasswordAuthentication_java_lang_String_java_net_InetAddress_int_java_lang_String_java_lang_String_java_lang_String_java_net_URL_java_net_Authenticator_RequestorType()
>>>     which is the testcase for
>>> java.net.Authenticator.requestPasswordAuthentication(
>>>             String rHost, InetAddress rAddr, int rPort, String
>> rProtocol,
>>>             String rPrompt, String rScheme, URL rURL,
>>>             Authenticator.RequestorType reqType);
>>> and the class has another two method named
>> requestPasswordAuthentication,
>>> and only this method take URL and RequestorType as its parameters.
>>>     The name is somehow too long to see and read, and I guess we can
>> find a
>>> shorter one for it,
>>> e.g.test_requestPasswordAuthentication_URL_RequestorType. As URL and
>>> RequestorType can identify the exactly
>>> method to test. Or a adjusted naming convention shall be take. Any
>> opinions?
>>> --
>>>
>>> Best Regards!
>>>
>>> Jimmy, Jing Lv
>>> China Software Development Lab, IBM
>>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
> 
> 
> --
> 
> Best Regards!
> 
> Jimmy, Jing Lv
> China Software Development Lab, IBM

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