我有一个从命令行执行的 XML 文件 (STAX)
[root@local ~]# staf local STAX EXECUTE FILE "/root/test2.xml"
ARGS "{'command':'ls'}" WAIT RETURNRESULT
并获得以下输出..
Response
--------
{
Job ID : 57
Start Date-Time: 20130405-18:27:13
End Date-Time : 20130405-18:27:13
Status : Normal
Result : 0
Job Log Errors : []
Testcase Totals: {
Tests : 0
Passes: 0
Fails : 0
}
}
脚本内容..
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function="runCommand"/>
<function name="runCommand">
<function-list-args>
<function-required-arg name="command"/>
</function-list-args>
<try>
<sequence>
<script>print("This");</script>
<message>'%s %s: is a: %s' % (STAXCurrentTestcase, STAXCurrentFunction, command)</message>
<log>'test'</log>
<return>0</return>
</sequence>
<catch exception="'eTerminateFunction'" var="eInfo">
<sequence>
<log level="'fail'">'%s %s: Terminating function Error: %s' % (STAXCurrentTestcase, STAXCurrentFunction, eInfo)</log>
<tcstatus result="'fail'">eInfo</tcstatus>
<return>1</return>
</sequence>
</catch>
</try>
</function>
</stax>
为什么在执行期间或之后没有任何日志记录被转储到控制台?
for<log>
或<message>
python<script>print("This")</script>