staftestcase3.java
来自「Software Testing Automation Framework (S」· Java 代码 · 共 38 行
JAVA
38 行
import com.ibm.staf.*;public class STAFTestcase3{ public static void main(String[] args) { int counter = 10; STAFHandle handle = null; try { handle = new STAFHandle("STAFTestcase"); } catch(STAFException e) { e.printStackTrace(); System.exit(1); } if (args.length > 0) counter = (new Integer(args[0])).intValue(); for (int i=0; i < counter; i++) { System.out.println("Loop #" + i); STAFResult result = handle.submit2("local", "monitor", "log message " + STAFUtil.wrapData("Loop #" + i)); STAFResult logResult = handle.submit2("local", "log", "log machine logname STAFTestcase1.log level info message " + STAFUtil.wrapData("Loop #" + i)); STAFResult delayResult = handle.submit2("local", "delay", "delay 1000"); STAFResult varResult = handle.submit2("local", "var", "resolve {HandsOn/Variables/MyVar}"); if ((varResult.rc == 0) && (varResult.result.equals("STAFTestcase3/Terminate"))) { System.exit(0); } } System.exit(0); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?