Integrated Test Client 的样本

您可以在 Integrated Test Client 中保存制作的脚本以在日后使用。您还可以导入包含事件的现有 XML 文件。

限制: IBM® Business Monitor V8.5.5 中,仅支持将基于 CEI 的监控模型用于 Integrated Test Client。

样本测试脚本

下列代码是测试脚本的示例:
Emit ClaimEventStartedSample1  
Sleep 100 ms 
Import c:\mytest\myevents.xml
Pause
Emit ClaimEventStartedSample2

包含三个事件的样本测试脚本文件

下列代码是包含三个事件的测试脚本文件的示例:要将此文件作为测试脚本装入,应将其另存为 XML 文件,然后单击打开现有测试脚本 补充信息
<actions>
<event id="sample" model="Sample" monitorContext="Sample_MC_1" scriptname="inBoundCreation" version="20080306140501">
<PredefinedDataElement name="version" type="string" value="1.0.1"/>
<PredefinedDataElement name="severity" type="int" value=""/>
<PredefinedDataElement name="elapsedTime" type="string" value=""/>
<PredefinedDataElement name="creationTime" type="dateTime" value=""/>
<PredefinedDataElement name="extensionName" type="string" value="null"/>
<PredefinedDataElement name="globalInstanceId" type="string" value=""/>
<PredefinedDataElement name="localInstanceId" type="string" value="ITC176023750710294727501896680341112431020"/>
<PredefinedDataElement name="sequenceNumber" type="int" value=""/>
<PredefinedDataElement name="repeatCount" type="string" value=""/>
<PredefinedDataElement name="msg" type="string" value=""/>
<PredefinedDataElement name="priority" type="string" value=""/>
<EventParts id="correlate_Part" name="correlate Part" path="cbe:CommonBaseEvent/tns:Correlate" type="tns:Correlate">
<EventPartPath name="correlate_Part" path="cbe:CommonBaseEvent/tns:Correlate" type="string" value="firstInstance">
<namespaceMapping namespace="http://www.ibm.com/AC/commonbaseevent1_0_1" prefix="cbe"/>
<namespaceMapping namespace="http:///Sample/BO.xsd" prefix="tns"/>
</EventPartPath>
</EventParts>
<EventParts id="model_Part" name="model Part" path="cbe:CommonBaseEvent/tns:Model" type="tns:Model">
<EventPartPath name="model_Part" path="cbe:CommonBaseEvent/tns:Model" type="string" value="creation Event">
<namespaceMapping namespace="http://www.ibm.com/AC/commonbaseevent1_0_1" prefix="cbe"/>
<namespaceMapping namespace="http:///Sample/BO.xsd" prefix="tns"/>
</EventPartPath>
</EventParts>
</event>
<event id="sample" model="Sample" monitorContext="Sample_MC_1" scriptname="inBoundData_Increment_Start" version="20080306140501">
<PredefinedDataElement name="version" type="string" value="1.0.1"/>
<PredefinedDataElement name="severity" type="int" value=""/>
<PredefinedDataElement name="elapsedTime" type="string" value=""/>
<PredefinedDataElement name="creationTime" type="dateTime" value=""/>
<PredefinedDataElement name="extensionName" type="string" value="null"/>
<PredefinedDataElement name="globalInstanceId" type="string" value=""/>
<PredefinedDataElement name="localInstanceId" type="string" value="ITC1293196988190147642751716394834681806"/>
<PredefinedDataElement name="sequenceNumber" type="int" value=""/>
<PredefinedDataElement name="repeatCount" type="string" value=""/>
<PredefinedDataElement name="msg" type="string" value=""/>
<PredefinedDataElement name="priority" type="string" value=""/>
<EventParts id="correlate_Part" name="correlate Part" path="cbe:CommonBaseEvent/tns:Correlate" type="tns:Correlate">
<EventPartPath name="correlate_Part" path="cbe:CommonBaseEvent/tns:Correlate" type="string" value="firstInstance">
<namespaceMapping namespace="http://www.ibm.com/AC/commonbaseevent1_0_1" prefix="cbe"/>
<namespaceMapping namespace="http:///Sample/BO.xsd" prefix="tns"/>
</EventPartPath>
</EventParts>
<EventParts id="model_Part" name="model Part" path="cbe:CommonBaseEvent/tns:Model" type="tns:Model">
<EventPartPath name="model_Part" path="cbe:CommonBaseEvent/tns:Model" type="string" value="increment Data Event">
<namespaceMapping namespace="http://www.ibm.com/AC/commonbaseevent1_0_1" prefix="cbe"/>
<namespaceMapping namespace="http:///Sample/BO.xsd" prefix="tns"/>
</EventPartPath>
</EventParts>
<EventParts id="monitorTypes_Part" name="monitorTypes Part" path="cbe:CommonBaseEvent/tns:monitorTypes" type="tns:monitorTypes">
<EventPartPath name="tns:itemDuration" path="cbe:CommonBaseEvent/tns:monitorTypes/tns:itemDuration" type="duration"
 value="P3DT5S">
<namespaceMapping namespace="http://www.ibm.com/AC/commonbaseevent1_0_1" prefix="cbe"/>
<namespaceMapping namespace="http:///Sample/BO.xsd" prefix="tns"/>
</EventPartPath>
</EventParts>
</event>
<event id="sample" model="Sample" monitorContext="Sample_MC_1" scriptname="inBoundTerminate" version="20080306140501">
<PredefinedDataElement name="version" type="string" value="1.0.1"/>
<PredefinedDataElement name="severity" type="int" value=""/>
<PredefinedDataElement name="elapsedTime" type="string" value=""/>
<PredefinedDataElement name="creationTime" type="dateTime" value=""/>
<PredefinedDataElement name="extensionName" type="string" value="null"/>
<PredefinedDataElement name="globalInstanceId" type="string" value=""/>
<PredefinedDataElement name="localInstanceId" type="string" value="ITC170484905847574372017809527172092764811"/>
<PredefinedDataElement name="sequenceNumber" type="int" value=""/>
<PredefinedDataElement name="repeatCount" type="string" value=""/>
<PredefinedDataElement name="msg" type="string" value=""/>
<PredefinedDataElement name="priority" type="string" value=""/>
<EventParts id="correlate_Part" name="correlate Part" path="cbe:CommonBaseEvent/tns:Correlate" type="tns:Correlate">
<EventPartPath name="correlate_Part" path="cbe:CommonBaseEvent/tns:Correlate" type="string" value="firstInstance">
<namespaceMapping namespace="http://www.ibm.com/AC/commonbaseevent1_0_1" prefix="cbe"/>
<namespaceMapping namespace="http:///Sample/BO.xsd" prefix="tns"/>
</EventPartPath>
</EventParts>
<EventParts id="model_Part" name="model Part" path="cbe:CommonBaseEvent/tns:Model" type="tns:Model">
<EventPartPath name="model_Part" path="cbe:CommonBaseEvent/tns:Model" type="string" value="termination Event">
<namespaceMapping namespace="http://www.ibm.com/AC/commonbaseevent1_0_1" prefix="cbe"/>
<namespaceMapping namespace="http:///Sample/BO.xsd" prefix="tns"/>
</EventPartPath>
</EventParts>
</event>
<pause/>
</actions>