org.fest.swing.junit.v4_5.runner
Class GUITestRunner

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

public class GUITestRunner
extends BlockJUnit4ClassRunner

Understands a JUnit 4.5 test runner that takes a screenshot of a failed GUI test.

Author:
Alex Ruiz, Yvonne Wang

Constructor Summary
GUITestRunner(Class<?> testClass)
          Creates a new GUITestRunner.
 
Method Summary
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, describeChild, getChildren, methodBlock, possiblyExpectingExceptions, runChild, testName, validateInstanceMethods, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, filter, getDescription, getName, getTestClass, run, 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.junit.runner.manipulation.Filterable
filter
 
Methods inherited from interface org.junit.runner.manipulation.Sortable
sort
 

Constructor Detail

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 Detail

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 BlockJUnit4ClassRunner


Copyright © 2009-2010 FEST (Fixtures for Easy Software Testing). All Rights Reserved.