Porting existing STAX files
To use existing Software Testing Automation Framework Execution Engine (STAX) task files with IBM® Engineering Test Management, they either must be modified to follow the format, or a facade task can be created.
About this task
Procedure
The facade task must be located in the staxPath directory, however the legacy STAX XML files (since they do not follow the Engineering Test Management format)
must be located outside of this directory. In this example, the facade task is located in staxPath
in D:\stax\myLegacyTask.xml and the legacy task file is located in
D:\legacy\myOldTask.xml.
-
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE stax SYSTEM "stax.dtd"> <stax> <defaultcall function="myLegacyTask"/> <function name="myLegacyTask" scope="local"> <function-prolog>Legacy STAX Task</function-prolog> <function-epilog> This is a description of My Legacy Task. </function-epilog> <function-list-args> <function-required-arg name="target">The target machine</function-required-arg> <function-optional-arg name="arg1" default="'default1'">The first arg description</function-optional-arg> <function-optional-arg name="arg2" default="'default2'">The second arg description</function-optional-arg> </function-list-args> <sequence> <!-- Import and invoke the legacy task --> <import machine="STAXJobXMLMachine" file="'%s/../../legacy/myOldTask.xml' % STAXJobXMLFile" import-include="myOldFunction"/> <call function="'myOldFunction'">[target,arg1,arg2]</call> <return>0</return> </sequence> </function> </stax>