OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-assembly message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [sca-assembly] [ASSEMBLY-194] Test classes do not correspond to Maven conventions - PROPOSAL


Comments inline...

Jim

On Mar 11, 2010, at 5:27 PM, Mike Edwards wrote:


Folks,

I propose that ASSEMBLY 194 is Closed with No Action.

The claim is made that the naming of the test classes does not match Maven conventions
and that:

a) Test classes should be renamed from "*Tests" to "*Test"

b) Test classes should be moved from /java to Maven /tests


First - the Maven build is only supplied as an example.  It is not normative and can be replaced by the user
by any other build tool.


Why bother including a Maven build script if the test suite does not correspond to what Maven prescribes? As it is currently laid out, the tests are not runnable from the Maven command line unless some sort of complex script that changes Maven's default behavior is provided.

Wasn't the layout of the tests changed a while back to accommodate inclusion of a Maven build script in the first place? Why change the layout to make the tests compilable using Maven but not change it so the tests are also runnable?  


Second, these testcases are named with the form:

ASM_nnnn_TestCase.java

This follows the JUnit convention - and the client classes are indeed using the JUnit conventions.
I believe that this is reasonable naming convention.


They do, but renaming them as proposed also follows JUnit conventions - and it will make them work with Maven. 

Third, the tests are the main deal in this layout - there is nothing in the "project" other than the tests.
This means to me that they should go into the /java directory and not the /tests directory.
They are tests of the SCA runtime - but the project here is the testcases themselves.


From a Maven perspective, they are still tests and should therefore go under /tests. Maven is not flexible in this respect since the main goal of Maven is to provide a standard build layout. If the issue here is with being able to create a testcase distribution is required, Maven can also create jars from test cases located under /tests.  


As for running the testcases from the command line, I have built an Ant-based command script which is
again a non-normative example way of running the testcases.  If anyone would like to add additional
ways of running the testcases, please feel free to add them to the SVN repository.


Given a Maven build is provided, it seems appropriate the tests should be runnable from Maven using standard Maven facilities (i.e. not require a custom plugin). It strikes me as inconsistent that a Maven build would be provided but the example provided to run the test cases is done using Ant. IMO, one tool should be used throughout.

Jim


Yours,  Mike.

Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014    Mobile: +44-7802-467431  
Email:  mike_edwards@uk.ibm.com





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU









[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]