FeaturesPluginsDocs & SupportCommunityPartners

Description of Master config

Author: Libor.Martinek (libor.martinek@sun.com )
Date: January 24, 2002
Version: 1.0


What is this document for?

This document is either for test developer and also for someone who just want to execute tests. Test developer has to know how to add his new tests into master-config and anyone who execute tests has to know how to work with master-config.

What is master config for

Each xtest instance (see XTest instance description ) has to have master config. Master config is xml file which defines which tests should be executed

Parts of master config

Master config consist of one or more configs and may contain setup elements. For more information about "setup" element and attribute or "property" element, see site-specific setup .

Master config has to conform to this DTD.

Setup

Attributes of element setup:

  • name (mandatory)
Nested elements of element setup:
  • start (optional)
  • stop (optional)
Attributes of element start or stop:
  • antfile (optiopnal, default is "build.xml")
  • dir (optional, default is current directory)
  • target (optional, default is default target)
  • onBackground (optional, default value is "true") - whether this target should be executed on background
  • delay (optional, default value is 0) - used only when onBackground=true . Time in miliseconds to delay after executing target on background. Useful when you start some service which can take long time to be in full operation.

Config

When executing tests from one instance you can select which config should be used. So you can define more config, each for special use, e.g. validation, regression, performance etc.

Attributes of element config:

  • name (mandatory) - name of the config
  • defaultTesttypes (optional) - default testtypes which will be used in case where no testtype is defined
  • defaultAttributes (optional) - default attributes which will be used in case where no attribute is defined
  • setup (optional) - which setup should be used when executing this config

Nested elements of element config:

  • module (mandatory) - contains definition of tests for one module
  • testtype (optional) - contains definition of tests of one testtype across more modules
  • property (optional) - properties used for all tests in this config

Module

Attributes of element module:
  • name (mandatory) - name of tested module
  • testtype (optional, value of attribute defaultTesttypes of element config will be used)
  • attributes (optional, value of attribute defaultAttributes of element config will be used) - what attributes should tests have
  • setup (optional) - which setup should be used when executing tests of this module
Nested elements of element module:
  • property (optional) - properties used for tests in this module

Testtype

Attributes of element module:
  • name (mandatory) - name of testtype
  • modules (mandatory) - name of modules whose tests of type testtype should be executed
  • attributes (optional, value of attribute defaultAttributes of element config will be used) - what attributes should tests have
  • setup (optional) - which setup should be used when executing tests of this testtype
Nested elements of element module:
  • property (optional) - properties used for tests in for testtype

Example

Example without site-specific setup:
<testconfig>

<config name="config-1">
<module name="core" testtypes="unit" attributes="stable"/>
<module name="openide" testtypes="unit" attributes="stable"/>
<module name="java" testtypes="unit" attributes="stable"/>
<module name="openidex" testtypes="unit" attributes="stable"/>
</config>

<config name="config-2" defaultTesttypes="unit" defaultAttributes="stable">
<module name="core"/>
<module name="openide"/>
<module name="java"/>
<module name="openidex"/>
</config>

<config name="config-3">
<testtype name="unit" modules="core,openide,java,openidex" attributes="stable"/>
</config>

</testconfig>

To see example with site-specific setup, see description of  site-specific setup.

Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Open ESB - The Open Enterprise Service Bus Powered by