<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.urbancode.com/PluginXMLSchema_v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <header>
    <identifier version="4" id="com.ibm.urbancode.air.plugin.rit" name="IBM Rational Integration Tester"/>
    <description>
    This plugin will invoke Tests using IBM Rational Integration Tester.
      </description>
    <tag>IBM Rational Test Workbench/IBM Rational Integration Tester</tag>
  </header>
   
   
  <!-- ============================================ -->
  <!--   Run IBM Rational Integration Tester Tests  -->
  <!-- ============================================ -->
  <step-type name="Run RIT Test">
    <description>Run test using IBM Rational Integration Tester</description>
    <properties>
      <property name="installDir" required="true">
        <property-ui type="textBox" label="IBM Rational Integration Tester Installation Directory" description="Fully qualified path to IBM Rational Integration Tester installation directory."/>
      </property>
      <property name="environment" required="true">
        <property-ui type="textBox" label="Environment" description="Environment name."/>
      </property>
      <property name="projectDir" required="true">
        <property-ui type="textBox" label="Project Directory" description="Fully qualified path to IBM Rational Integration Tester project directory."/>
      </property>
      <property name="ritProject" required="true">
        <property-ui type="textBox" label="Project" description="IBM Rational Integration Tester project name (.ghp), relative to project directory"/>
      </property>
      <property name="testResources" required="true">
        <property-ui type="textBox" label="Test Resources" description="Semi-colon separated list of IBM Rational Integration Tester test resources"/>
      </property>
      <property name="noResultsPublishers" required="false">
        <property-ui type="checkBox" label="Disable Results Publishers" description="Disable any results publishers that can be configured in the project."/>
      </property>
      <property name="resultsPublishers" required="false">
        <property-ui type="textBox" label="Results Publishers" description="Comma-separated list of results publishers."/>
      </property>
      <property name="resultsServerLogging" required="false">
        <property-ui type="selectBox" label="Results server logging" default-value="absolute" description="Specifies how the Results Server URL for executed items is written to the console."/>
         <value label="absolute">absolute</value>
 		 <value label="ignore">ignore</value>
         <value label="relative">relative</value>
      </property>
      <property name="inputPropertyFile" required="false">
        <property-ui type="textBox" label="Input Property File" description="Path to the input properties file."/>
      </property>
    </properties>
    <post-processing><![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp"/>
      <arg path="classes:lib/shell.jar:lib/CommonsUtil.jar:lib/log4j.jar:lib/NativeProcess.jar:lib/WinAPI.jar"/>
      <arg file="RITRunTest.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>
  
</plugin>
