Class GUITestRunner

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
org.fest.swing.junit.v4_5.runner.GUITestRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

public class GUITestRunner extends org.junit.runners.BlockJUnit4ClassRunner
Understands a JUnit 4.5 test runner that takes a screenshot of a failed GUI test.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.fest.swing.junit.runner.FailureScreenshotTaker
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    GUITestRunner(Class<?> testClass)
    Creates a new GUITestRunner.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.junit.runners.model.Statement
    methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test)
    Returns a Statement that invokes method on test.

    Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner

    collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation

    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
  • Field Details

    • screenshotTaker

      private final org.fest.swing.junit.runner.FailureScreenshotTaker screenshotTaker
  • Constructor Details

    • GUITestRunner

      public GUITestRunner(Class<?> testClass) throws org.junit.runners.model.InitializationError
      Creates a new GUITestRunner.
      Parameters:
      testClass - the class containing the tests to run.
      Throws:
      org.junit.runners.model.InitializationError - if something goes wrong when creating this runner.
  • Method Details

    • methodInvoker

      protected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test)
      Returns a Statement that invokes method on test. The created statement will take and save the screenshot of the desktop in case of a failure.
      Overrides:
      methodInvoker in class org.junit.runners.BlockJUnit4ClassRunner