Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.swtbot.swt.finder.junit
Class SWTBotApplicationLauncherClassRunner

    java.lang.Object
      org.junit.runner.Runner
          org.junit.internal.runners.TestClassRunner
              org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner
                  org.eclipse.swtbot.swt.finder.junit.SWTBotApplicationLauncherClassRunner

All Implemented Interfaces:
  ApplicationRunner, Filterable, Sortable

    public abstract class SWTBotApplicationLauncherClassRunner

extends SWTBotJunit4ClassRunner
implements ApplicationRunner

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

Version:
  $Id$
Author:
  Hans Schwaebli (Bug 259787), Toby Weston (Bug 259787)
See Also:
  `SWTBotJunit4ClassRunner`

Field Summary

Fields inherited from class org.junit.internal.runners.TestClassRunner
`fEnclosedRunner`

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.internal.runners.TestClassRunner
`filter, getDescription, getTestClass, sort, validate`

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`

Constructor Detail

### SWTBotApplicationLauncherClassRunner

    public SWTBotApplicationLauncherClassRunner(Class<?> klass)
                                         throws Exception

  Creates a SWTBotRunner to run `klass`

  Throws:
    `Exception` - if the test class is malformed.

Method Detail

### isApplicationRunning

    public boolean isApplicationRunning()

  Description copied from interface: `ApplicationRunner`
  Returns `true` if the application is running, `false` otherwise. A typical implementation would be to wait until `SWTUtils.display()` returns something.

  Specified by:
    `isApplicationRunning` in interface `ApplicationRunner`
  Returns:
    `true` if the application is running, `false` otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD