package example;
import junit.extensions.abbot.TestHelper;
import junit.framework.TestCase;
import abbot.script.*;
import abbot.finder.TestHierarchy;
/** Simple example of a stress test on an app. */
public class MyCodeStressTest extends TestCase {
/** Name is the name of a script filename. */
public MyCodeStressTest(String name) {
super(name);
}
public void testLoop() throws Throwable {
TestHierarchy h = new TestHierarchy();
StepRunner runner = new StepRunner(h);
Script script = new Script("src/example/StressMyCode.xml", h);
MyCode.main(new String[] { });
for (int i=0;i < 10;i++) {
runner.run(script);
}
}
public static void main(String[] args) {
TestHelper.runTests(args, MyCodeStressTest.class);
}
}