Class SerenityParameterizedRunner

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runner.Runner>
org.junit.runners.Suite
net.serenitybdd.junit.runners.SerenityParameterizedRunner
All Implemented Interfaces:
net.thucydides.core.tags.Taggable, org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable
Direct Known Subclasses:
ThucydidesParameterizedRunner

public class SerenityParameterizedRunner
extends org.junit.runners.Suite
implements net.thucydides.core.tags.Taggable
Run a Serenity test suite using a set of data. Similar to the JUnit parameterized tests, but better ;-).
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.junit.runners.Suite

    org.junit.runners.Suite.SuiteClasses
  • Constructor Summary

    Constructors 
    Constructor Description
    SerenityParameterizedRunner​(java.lang.Class<?> klass)
    Only called reflectively.
    SerenityParameterizedRunner​(java.lang.Class<?> klass, DriverConfiguration configuration, WebDriverFactory webDriverFactory, net.thucydides.core.batches.BatchManager batchManager)
    Test runner used for testing purposes.
  • Method Summary

    Modifier and Type Method Description
    void generateReports()  
    protected java.util.List<org.junit.runner.Runner> getChildren()  
    java.util.List<org.junit.runner.Runner> getRunners()  
    int getThreadCountFor​(java.lang.Class<?> klass)  
    void run​(org.junit.runner.notification.RunNotifier notifier)  
    boolean runTestsInParallelFor​(java.lang.Class<?> klass)  
    void subscribeReporter​(net.thucydides.core.reports.AcceptanceTestReporter reporter)  

    Methods inherited from class org.junit.runners.Suite

    describeChild, emptySuite, runChild

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, order, 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
  • Constructor Details

    • SerenityParameterizedRunner

      public SerenityParameterizedRunner​(java.lang.Class<?> klass, DriverConfiguration configuration, WebDriverFactory webDriverFactory, net.thucydides.core.batches.BatchManager batchManager) throws java.lang.Throwable
      Test runner used for testing purposes.
      Parameters:
      klass - The test class to run
      configuration - current system configuration (usually mocked)
      webDriverFactory - a webdriver factory (can be mocked)
      batchManager - a batch manager to process batched testing
      Throws:
      java.lang.Throwable - - cause anything can happen!
    • SerenityParameterizedRunner

      public SerenityParameterizedRunner​(java.lang.Class<?> klass) throws java.lang.Throwable
      Only called reflectively. Do not use programmatically.
      Parameters:
      klass - The test class to run
      Throws:
      java.lang.Throwable - Cause shit happens
  • Method Details

    • runTestsInParallelFor

      public boolean runTestsInParallelFor​(java.lang.Class<?> klass)
    • getThreadCountFor

      public int getThreadCountFor​(java.lang.Class<?> klass)
    • getChildren

      protected java.util.List<org.junit.runner.Runner> getChildren()
      Overrides:
      getChildren in class org.junit.runners.Suite
    • run

      public void run​(org.junit.runner.notification.RunNotifier notifier)
      Overrides:
      run in class org.junit.runners.ParentRunner<org.junit.runner.Runner>
    • generateReports

      public void generateReports()
    • subscribeReporter

      public void subscribeReporter​(net.thucydides.core.reports.AcceptanceTestReporter reporter)
    • getRunners

      public java.util.List<org.junit.runner.Runner> getRunners()