Create an inner class that implements Runnable and is called from a new thread in com.util.SeleneseTestCase run (). Something like that:
class YourTestCase extends SeleneseTestCase {
public class MyRunnable implements Runnable {
public void run() {
}
}
public void testMethodToExecuteInThread() {
MyRunnable r = new MyRunnable();
Thread t = new Thread(r);
t.start();
}
}
Update for use outside of YourTestCase class
To start the inner class from another class, you need to make it public, and then from the outer class, do this:
YourTestCase testCase = new YourTestCase();
YourTestCase.MyRunnable r = testCase.new MyRunnable();
, , MyRunnable , YourTestCase.
, .