|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
net.thucydides.junit.runners.ThucydidesRunner
public class ThucydidesRunner
A test runner for WebDriver-based web tests. This test runner initializes a WebDriver instance before running the tests in their order of appearance. At the end of the tests, it closes and quits the WebDriver instance.
The test runner will by default produce output in XML and HTML. This can extended by subscribing more reporter implementations to the test runner.
| Constructor Summary | |
|---|---|
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,
WebDriverFactory webDriverFactory)
|
|
ThucydidesRunner(Class<?> klass,
WebDriverFactory webDriverFactory,
Configuration configuration)
|
|
ThucydidesRunner(Class<?> klass,
WebdriverManager webDriverManager,
Configuration configuration,
BatchManager batchManager)
|
|
| Method Summary | |
|---|---|
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. |
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()
|
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)
|
void |
subscribeReporter(AcceptanceTestReporter reporter)
To generate reports, different AcceptanceTestReporter instances need to subscribe to the listener. |
void |
useQualifier(String qualifier)
|
| Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner |
|---|
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, methodBlock, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout |
| Methods inherited from class org.junit.runners.ParentRunner |
|---|
childrenInvoker, classBlock, classRules, filter, getDescription, getName, getRunnerAnnotations, getTestClass, runLeaf, 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 |
|---|
public ThucydidesRunner(Class<?> klass)
throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError - if some JUnit-related initialization problem occurred
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,
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| Method Detail |
|---|
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.BlockJUnit4ClassRunnerprotected boolean restartBrowserBeforeTest()
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||