com.googlecode.refit.spring
Class SpringFitSuite

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.runners.ParentRunner<org.junit.runner.Runner>
          extended by org.junit.runners.Suite
              extended by com.googlecode.refit.junit.FitSuite
                  extended by com.googlecode.refit.spring.SpringFitSuite
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class SpringFitSuite
extends FitSuite

Use this class to run a suite of FIT tests under JUnit. To do so, create a class with the following annotations:

 @RunWith(SpringFitSuite.class)
 @FitConfiguration(
     inputDir = "src/test/fit", 
     outputDir = "target/fit", 
     includes = "**/*.fit.html")
 public class MyFitSuite {
 }
 
The suite first builds a list of input files to be run as FIT tests. The input files are located under the inputDir root. The file patterns to be included or excluded are specified by the includes and excludes properties. The default include pattern is **&#47;*.html, the exclude pattern list is empty by default. Each of these properties can be a list of Strings interpreted as Ant file patterns.

The suite then runs all files matching at least one of the include patterns and none of the exclude patterns.

Each test file will be a direct child of the suite, named by its relative path.

Each fixture class referenced from the FIT test files needs to be annotated with ContextConfiguration to specify the Spring context configuration. Spring dependency injection will be performed automatically after fixture instantiation.

Author:
hwellmann

Nested Class Summary
 
Nested classes/interfaces inherited from class org.junit.runners.Suite
org.junit.runners.Suite.SuiteClasses
 
Constructor Summary
SpringFitSuite(Class<?> klass)
           
 
Method Summary
 
Methods inherited from class com.googlecode.refit.junit.FitSuite
getChildren, run
 
Methods inherited from class org.junit.runners.Suite
describeChild, emptySuite, runChild
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, collectInitializationErrors, filter, getDescription, getName, getTestClass, setScheduler, 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
 

Constructor Detail

SpringFitSuite

public SpringFitSuite(Class<?> klass)
               throws org.junit.runners.model.InitializationError
Throws:
org.junit.runners.model.InitializationError


Copyright © 2011. All Rights Reserved.