harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Avtamonov" <anton.avtamo...@gmail.com>
Subject Re: Long,long testcase name...
Date Wed, 12 Apr 2006 13:44:38 GMT
On 4/12/06, Leo Simons <mail@leosimons.com> wrote:
> On Wed, Apr 12, 2006 at 08:09:41PM +0700, Mikhail Loenko wrote:
> > 2006/4/12, Andrew Zhang <zhanghuangzhu@gmail.com>:
> > > Hello, geir,
> > > Let's consider the case you mentioned.
> > > I totally agree that "testRequestPasswordAuthentication1" is a BAD name,
> >
> > Why?
> So you end up with names such as
>  testRequestPasswordAuthenticationThrowsAnExceptionOnNullArguments
> or
>  testRequestPasswordAuthenticationAcceptsSimpleJohnDoeParameters
> they are painful to type, but less painful than typing javadocs, and more
> likely to get read than javadocs, and likely to get read a lot more than
> written. Furthermore, if you have camel case searching, you can search for
> tRPA and get all the relevant bits.

Hi Leo,

What are you talking about is excellent when you have one method to
test, but need to cover several scenarios. You don't want to have them
together in one test to keep all scenarios clear, right?
I also do in the similar way with minor deviation: I would prefer
testRequestPasswordAuthentication_ThrowsAnExceptionOnNullArguments -
underscore between method name and test intention.
However such approach doesn't work when you really have several
same-named methods with different params. You have to test similar
scenarios, but with different methods...

Please correct me if I got it wrong.

Anton Avtamonov,
Intel Middleware Products Division

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

View raw message