staftestcase.java

来自「Software Testing Automation Framework (S」· Java 代码 · 共 35 行

JAVA
35
字号
import com.ibm.staf.*;public class STAFTestcase{    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));                try            {                Thread.sleep(1000); // 1 second            }            catch(InterruptedException e)            {                e.printStackTrace();            }                            }        System.exit(0);    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?