public class

TransformingParentRunner

extends ParentRunner<T>
java.lang.Object
   ↳ org.junit.runner.Runner
     ↳ org.junit.runners.ParentRunner<T>
       ↳ com.atlassian.jira.functest.framework.suite.TransformingParentRunner<T>

Class Overview

A parent runner implementation that wraps another parent runner and applies an ordered list of transforms over the wrapped runner children, such that only the resulting list of children will be run.

The transforms operate on input list of descriptions and return a new copy of this list with any necessary modifications. Only corresponding children of the descriptions will be executed by this runner. The transforms get applied recursively over the whole runner tree.

See Also

Summary

Public Constructors
TransformingParentRunner(String name, ParentRunner<T> original, Iterable<SuiteTransform> transforms)
TransformingParentRunner(ParentRunner<T> original, Iterable<SuiteTransform> transforms)
Public Methods
static List<Description> applyTransforms(Iterable<Description> input, Iterable<SuiteTransform> transforms)
Description getDescription()
Protected Methods
Description describeChild(T child)
List<T> getChildren()
String getName()
void runChild(T child, RunNotifier notifier)
ParentRunner<?> wrap(ParentRunner<?> original, List<SuiteTransform> transforms)

Wrap child of this runner that itself is parent runner in an instance that will provide transformations over its children (if necessary).

[Expand]
Inherited Methods
From class org.junit.runners.ParentRunner
From class org.junit.runner.Runner
From class java.lang.Object
From interface org.junit.runner.Describable
From interface org.junit.runner.manipulation.Filterable
From interface org.junit.runner.manipulation.Sortable

Public Constructors

public TransformingParentRunner (String name, ParentRunner<T> original, Iterable<SuiteTransform> transforms)

Throws
InitializationError

public TransformingParentRunner (ParentRunner<T> original, Iterable<SuiteTransform> transforms)

Throws
InitializationError

Public Methods

public static List<Description> applyTransforms (Iterable<Description> input, Iterable<SuiteTransform> transforms)

public Description getDescription ()

Protected Methods

protected Description describeChild (T child)

protected List<T> getChildren ()

protected String getName ()

protected void runChild (T child, RunNotifier notifier)

protected ParentRunner<?> wrap (ParentRunner<?> original, List<SuiteTransform> transforms)

Wrap child of this runner that itself is parent runner in an instance that will provide transformations over its children (if necessary).

Override this method to handle specific parent runner subclasses that override its protected or public methods, linke e.g. run(org.junit.runner.notification.RunNotifier). Otherwise this class will break those runners.

Parameters
original original runner instance
transforms list of transforms
Returns
  • wrapping instance that will provide transforms over that particular instance
Throws
InitializationError runner initialization error