public class ThucydidesRunner
extends org.junit.runners.BlockJUnit4ClassRunner
Constructor and Description |
---|
ThucydidesRunner(Class<?> klass)
Creates a new test runner for WebDriver web tests.
|
ThucydidesRunner(Class<?> klass,
BatchManager batchManager) |
ThucydidesRunner(Class<?> klass,
com.google.inject.Injector injector) |
ThucydidesRunner(Class<?> klass,
com.google.inject.Module module) |
ThucydidesRunner(Class<?> klass,
WebDriverFactory webDriverFactory) |
ThucydidesRunner(Class<?> klass,
WebDriverFactory webDriverFactory,
Configuration configuration) |
ThucydidesRunner(Class<?> klass,
WebDriverFactory webDriverFactory,
Configuration configuration,
BatchManager batchManager) |
ThucydidesRunner(Class<?> klass,
WebdriverManager webDriverManager,
Configuration configuration,
BatchManager batchManager) |
Modifier and Type | Method and Description |
---|---|
protected void |
additionalBrowserCleanup() |
protected int |
currentTestNumber() |
protected org.openqa.selenium.WebDriver |
driverFor(org.junit.runners.model.FrameworkMethod method) |
protected void |
generateReports() |
protected BatchManager |
getBatchManager()
Batch Manager used for running tests in parallel batches
|
protected Configuration |
getConfiguration()
The getConfiguration().manages output directories and driver types.
|
protected Collection<AcceptanceTestReporter> |
getDefaultReporters()
The default reporters applicable for standard test runs.
|
protected org.openqa.selenium.WebDriver |
getDriver() |
protected org.openqa.selenium.WebDriver |
getDriver(String driver) |
File |
getOutputDirectory() |
Pages |
getPages() |
protected JUnitStepListener |
getStepListener()
The Step Listener observes and records what happens during the execution of the test.
|
List<TestOutcome> |
getTestOutcomes() |
protected WebdriverManager |
getWebdriverManager() |
protected JUnitStepListener |
initListeners() |
protected JUnitStepListener |
initListenersUsing(Pages pageFactory) |
protected void |
initStepEventBus() |
protected void |
injectAnnotatedPagesObjectInto(Object testCase)
Instantiates the @ManagedPages-annotated Pages instance using current WebDriver.
|
protected void |
injectDriverInto(Object testCase,
org.junit.runners.model.FrameworkMethod method)
Instantiate the @Managed-annotated WebDriver instance with current WebDriver.
|
protected void |
injectScenarioStepsInto(Object testCase)
Instantiates the @ManagedPages-annotated Pages instance using current WebDriver.
|
boolean |
isAWebTest() |
protected boolean |
isUniqueSession() |
protected org.junit.runners.model.Statement |
methodInvoker(org.junit.runners.model.FrameworkMethod method,
Object test)
Running a unit test, which represents a test scenario.
|
protected void |
resetBroswerFromTimeToTime() |
protected boolean |
restartBrowserBeforeTest() |
protected int |
restartFrequency() |
void |
run(org.junit.runner.notification.RunNotifier notifier)
Runs the tests in the acceptance test case.
|
protected void |
runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier) |
protected void |
setStepListener(JUnitStepListener stepListener) |
protected boolean |
shouldRestartEveryNthTest() |
void |
subscribeReporter(AcceptanceTestReporter reporter)
To generate reports, different AcceptanceTestReporter instances need to
subscribe to the listener.
|
void |
useQualifier(String qualifier) |
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, methodBlock, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
public ThucydidesRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
- if some JUnit-related initialization problem occurredpublic ThucydidesRunner(Class<?> klass, com.google.inject.Module module) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public ThucydidesRunner(Class<?> klass, com.google.inject.Injector injector) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public ThucydidesRunner(Class<?> klass, WebDriverFactory webDriverFactory) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public ThucydidesRunner(Class<?> klass, WebDriverFactory webDriverFactory, Configuration configuration) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public ThucydidesRunner(Class<?> klass, WebDriverFactory webDriverFactory, Configuration configuration, BatchManager batchManager) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public ThucydidesRunner(Class<?> klass, BatchManager batchManager) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public ThucydidesRunner(Class<?> klass, WebdriverManager webDriverManager, Configuration configuration, BatchManager batchManager) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
public Pages getPages()
protected Configuration getConfiguration()
protected BatchManager getBatchManager()
public File getOutputDirectory()
public void subscribeReporter(AcceptanceTestReporter reporter)
public void useQualifier(String qualifier)
public void run(org.junit.runner.notification.RunNotifier notifier)
run
in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
protected void generateReports()
protected JUnitStepListener getStepListener()
protected void setStepListener(JUnitStepListener stepListener)
protected void initStepEventBus()
protected JUnitStepListener initListenersUsing(Pages pageFactory)
protected JUnitStepListener initListeners()
protected WebdriverManager getWebdriverManager()
protected void runChild(org.junit.runners.model.FrameworkMethod method, org.junit.runner.notification.RunNotifier notifier)
runChild
in class org.junit.runners.BlockJUnit4ClassRunner
protected void additionalBrowserCleanup()
protected boolean restartBrowserBeforeTest()
protected int restartFrequency()
protected int currentTestNumber()
protected boolean shouldRestartEveryNthTest()
protected boolean isUniqueSession()
protected void resetBroswerFromTimeToTime()
protected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test)
methodInvoker
in class org.junit.runners.BlockJUnit4ClassRunner
protected void injectDriverInto(Object testCase, org.junit.runners.model.FrameworkMethod method)
protected org.openqa.selenium.WebDriver driverFor(org.junit.runners.model.FrameworkMethod method)
protected void injectScenarioStepsInto(Object testCase)
protected void injectAnnotatedPagesObjectInto(Object testCase)
protected org.openqa.selenium.WebDriver getDriver()
protected org.openqa.selenium.WebDriver getDriver(String driver)
public List<TestOutcome> getTestOutcomes()
protected Collection<AcceptanceTestReporter> getDefaultReporters()
public boolean isAWebTest()
Copyright © 2011–2014 Wakaleo Consulting. All rights reserved.