db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Re: JDO TCK TestRunner ideas
Date Wed, 25 May 2005 20:23:27 GMT
That's the information I needed.  Thanks very much, Michael.

-- Michelle

Michael Bouschen wrote:

> Hi Michelle,
>
>> Hi, Michael,
>>
>> I am reviewing the ideas we discussed for controlling test execution 
>> for multiple configurations.  One goal we have is that all allowed 
>> combinations of tests, mapping files, test data, identity settings, 
>> ... can be run with a single maven command.  If I understand 
>> correctly, you pictured that the user would select a configuration 
>> file by setting it in project.properties and only that one 
>> configuration (which might include many tests, mappings, etc.) would 
>> be run by maven.  Is this correct?  Or do you see a way for maven to 
>> run a set of configuration files on one invocation?
>
>
> Today the goal runtck run the configuration specified with the 
> property jdo.tck.configuration. If you want to run a different 
> configuration you either change the setting of jdo.tck.configuration 
> in project.properties or set using the -D option it when calling maven 
> (e.g. maven -Djdo.tck.configuration=conf/my.conf runtck).
> maven allows to set properties inside a goal and then call another 
> goal. The following should run the tck with the configuration from 
> conf/my.conf:
>  <j:set var="jdo.tck.configuration" value="conf/my.conf"/>
>  <attainGoal name="runtck"/>
> So maybe we can have a new property that just lists all the 
> configuration files you want to run and then run the above in a loop 
> iterating the configuration list.
>
> I did not try this, I'm just thinking loud here ...
>
> Regards Michael
>
>>
>> -- Michelle
>>
>> Michael Bouschen wrote:
>>
>>> Hi,
>>>
>>> I had an action item to investigate how to extend the JDO TCK 
>>> TestRunner  such that the same test class can be run in multiple 
>>> configurations. These are possible configuration parameters:
>>> - identity setting (application or datastore identity)
>>> - security on/off
>>> - mapping files
>>> - test data
>>> - list of test classes to be executed
>>>
>>> We started with the idea the test runner reads parameters from a 
>>> configuration file, e.g. an xml description. Some of the 
>>> configuration parameters are important for the build process and I 
>>> see issues with maven getting the info from the configuration file.
>>>
>>> I would like to propose to use properties files for the 
>>> configuration parameters such that maven can directly read and use 
>>> these configuration  properties.
>>>
>>> I propose to create a subdirectory called conf in the tck 
>>> subproject. It contains configuration files, one test configuration 
>>> per file. The file  has the standard properties format similar to 
>>> the project.properties file. The file defines a set of standard jdo 
>>> tck properties (the property names are just a proposal and subject 
>>> to change):
>>> jdo.tck.identitytype = application/datastore
>>> jdo.tck.security  = on/off
>>> jdo.tck.secutity.policyfile = <policyfilename>
>>> jdo.tck.mapping = <one or more .orm files>
>>> jdo.tck.testdata = <xml file with test data>
>>> jdo.tck.testclasses = <list of classnames>
>>>
>>> The project.properties file of the tck subproject defines a property 
>>> called jdo.tck.configuration pointing to one of the configuration 
>>> files:
>>> jdo.tck.configuration = ${basedir}/conf/alltests.properties
>>> The user can specify the configuration to use by editing the file 
>>> project.properties or by setting a system property:
>>>   maven -Djdo.tck.configuration=conf/test.properties runtck
>>>
>>> The maven goal to run the tck for a specific configuration reads the 
>>> configuration properties from the file as specified by the property 
>>> jdo.tck.configuration:
>>>   <ant:property file="${jdo.tck.configuration}"/>
>>> This allows to adapt the classpath to include the enhanced pc 
>>> classes based on the identitytype.  Any configuration setting needed 
>>> by the TestRunner is passed as system property (e.g. the security 
>>> policy file) or as argument of the main method (e.g. the list of 
>>> test classes to be executed).
>>>
>>> Does this sound reasonable? Any feedback is appreciated.
>>>
>>> Regards Michael
>>
>>
>>
>
>


Mime
View raw message