|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner
org.eclipse.swtbot.swt.finder.junit.SWTBotApplicationLauncherClassRunner
public abstract class SWTBotApplicationLauncherClassRunner
A runner that launches your application and captures screenshots on test failures. If you wish to control the
lifecycle of your application, use SWTBotJunit4ClassRunner. Clients are supposed to subclass this. Typical
usage is:
@RunWith(FooApplicationTestClassRunner.class)
public class FooTest {
@Test
public void canSendEmail() {
}
}
The implementation of the FooApplicationTestClassRunner is:
public class FooApplicationTestClassRunner extends SWTBotApplicationLauncherClassRunner {
public void runApplication() {
FooApplication.main(new String[] { "arguments", "to", "your application" });
}
}
SWTBotJunit4ClassRunner| Constructor Summary | |
|---|---|
SWTBotApplicationLauncherClassRunner(Class<?> klass)
Creates a SWTBotRunner to run klass |
|
| Method Summary | |
|---|---|
boolean |
isApplicationRunning()
Returns true if the application is running, false otherwise. |
| Methods inherited from class org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner |
|---|
run |
| Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner |
|---|
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, methodBlock, methodInvoker, possiblyExpectingExceptions, runChild, testName, validateInstanceMethods, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout |
| Methods inherited from class org.junit.runners.ParentRunner |
|---|
childrenInvoker, classBlock, filter, getDescription, getName, getTestClass, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses |
| Methods inherited from class org.junit.runner.Runner |
|---|
testCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.swtbot.swt.finder.ApplicationRunner |
|---|
startApplication |
| Methods inherited from interface org.junit.runner.manipulation.Filterable |
|---|
filter |
| Methods inherited from interface org.junit.runner.manipulation.Sortable |
|---|
sort |
| Constructor Detail |
|---|
public SWTBotApplicationLauncherClassRunner(Class<?> klass)
throws Exception
klass
Exception - if the test class is malformed.| Method Detail |
|---|
public boolean isApplicationRunning()
ApplicationRunnertrue if the application is running, false otherwise. A typical implementation
would be to wait until SWTUtils.display() returns something.
isApplicationRunning in interface ApplicationRunnertrue if the application is running, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||