Child pages
  • Model Extensions

This is the documentation of the release 2.1 of automaIT. The documentation of the latest stable release can be found at AUTOMAIT.

Skip to end of metadata
Go to start of metadata

Model extensions support the re-use of sequences of frequently used statements. These model extensions are called by the defined name and shorten the code of plans and components. By default automaIT is delivered without any predefined model extensions.

Definition of Model Extensions

An XML file containing the statements has to be created. Its root element is extensions. To define statements the element command must be used.

Model extensions are validated and loaded on server start, i.e. changes to the configuration file will only take effect on a server restart.

These command elements contain:

  • required and optional parameters
  • block element that contains the content to be executed
It is not possible to use component specific placeholders (e.g. component substitutions or targeters) in model extensions.
<?xml version="1.0" encoding="UTF-8"?>
<extensions xmlns=""
    <command name="assertEquals" description="Assert that two values are equal."> 
            <required name="expected" description="The expected value." /> 
            <required name="actual" description="The actual value to check against 'expected'." /> 
            <optional name="message" default="The values are not equal." description="Message to show if values are not equal." /> 
                        <equals value1=":[expected]" value2=":[actual]" /> 
                    <raise message=":[message] - Expected ':[expected]' but was ':[actual]'." /> 

The file has to be located in the file system of the server. Its location has to be referenced by the server property extensions.custom.xml .

Model extensions are unversioned, i.e. take caution when removing or changing a command.

Use of Model Extensions

Using the predefined model extensions requires::

The server property extensions.protocol.prefix defines the namespace prefix used in the execution protocol of model extensions.

<?xml version="1.0" encoding="UTF-8"?>
<plan xmlns=""
      name="Plan" path="/examples">
  <ext:assertEquals expected="2" actual=":[returnValue]" />

The schema file of the custom extensions (custom-extensions.xsd) can be downloaded in the automaIT web UI (Menu element: extensions) to support code validation and completion in the XML Editor. custom-extensions.xsd must be registered in the xml catalog analog to model.xsd as described in Development Environment.

  • No labels