Package example

Source Code of example.MyCodeStressTest

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);
    }
}
TOP

Related Classes of example.MyCodeStressTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.