On 7/04/2010, at 5:33 PM, Bob Morley wrote:

> 
> Would anyone object if I renamed the junit tests if the Ofbiz project (and
> related testdef)?  I believe the standard for a test fixture in JUnit is to
> name the class <ClassName>Test (as opposed to Tests) and each test method in
> that class would be named testXYZ.
> 
> Ofbiz follows the method naming convention, but it appears we have named a
> number of junit tests with the plural "Tests" at the end.
> 
> Why is this important?  Some tools rely on these naming conventions to
> determine which are tests and which are not.  I am doing some work in this
> area and what I wanted to be able to do is execute JUnit tests from with-in
> Eclipse getting all of the IDE candy associated with that.  From the
> command-line we generate great code coverage metrics with Cobertura but
> being pretty heavy into the Atlassian tool suite, I tend to use Clover when
> running inside Eclipse.  By using the standard naming conventions, these
> tools pickup the unit tests properly and make developing Ofbiz in Eclipse
> even nicer (without any impact to the project).
> 
> Anyone have any Cons to doing this?

OFBiz follows the textXXX method names because it has to for JUnit to work (at 
least for the version we have).  Renaming the Class just seems like a pain 
especially when a plural makes more sense.  Are you sure Clover isn't 
configurable in this regard?

That said, I don't really care what they're called so long as they pass.

Regards
Scott

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to