|
||||||||||
| 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. |
|
| Method Summary | |
|---|---|
List<AcceptanceTestRun> |
getAcceptanceTestRuns()
|
protected Configuration |
getConfiguration()
The configuration manages output directories and driver types. |
protected org.openqa.selenium.WebDriver |
getDriver()
|
File |
getOutputDirectory()
|
ScenarioStepListener |
getStepListener()
The Field Reporter observes and records what happens during the execution of the test. |
List<AcceptanceTestReporter> |
getSubscribedReporters()
What reports is this test runner configured to generate? |
protected void |
injectAnnotatedPagesObjectInto(Object testCase)
Instantiates the @ManagedPages-annotated Pages instance using current WebDriver. |
protected void |
injectDriverInto(Object testCase)
Instantiate the @Managed-annotated WebDriver instance with current WebDriver. |
protected void |
injectScenarioStepsInto(Object testCase)
Instantiates the @ManagedPages-annotated Pages instance using current WebDriver. |
protected org.junit.runners.model.Statement |
methodInvoker(org.junit.runners.model.FrameworkMethod method,
Object test)
Running a unit test, which represents a test scenario. |
void |
run(org.junit.runner.notification.RunNotifier notifier)
Runs the tests in the acceptance test case. |
void |
setConfiguration(Configuration configuration)
Set the configuration for a test runner. |
void |
setWebDriverFactory(WebDriverFactory webDriverFactory)
Override the default web driver factory. |
void |
subscribeReporter(AcceptanceTestReporter reporter)
To generate reports, different AcceptanceTestReporter instances need to subscribe to the listener. |
| Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner |
|---|
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, methodBlock, possiblyExpectingExceptions, runChild, testName, validateConstructor, validateInstanceMethods, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout |
| Methods inherited from class org.junit.runners.ParentRunner |
|---|
childrenInvoker, classBlock, 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 |
|---|
public ThucydidesRunner(Class<?> klass)
throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError - if some JUnit-related initialization problem occurred
UnsupportedDriverException - if the requested driver type is not supported| Method Detail |
|---|
public ScenarioStepListener getStepListener()
protected Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
configuration - public void setWebDriverFactory(WebDriverFactory webDriverFactory)
public File getOutputDirectory()
public void subscribeReporter(AcceptanceTestReporter reporter)
public void run(org.junit.runner.notification.RunNotifier notifier)
run in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>public List<AcceptanceTestReporter> getSubscribedReporters()
protected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method,
Object test)
methodInvoker in class org.junit.runners.BlockJUnit4ClassRunnerprotected void injectDriverInto(Object testCase)
protected void injectScenarioStepsInto(Object testCase)
protected void injectAnnotatedPagesObjectInto(Object testCase)
protected org.openqa.selenium.WebDriver getDriver()
public List<AcceptanceTestRun> getAcceptanceTestRuns()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||