public class SerenityRunner extends org.junit.runners.BlockJUnit4ClassRunner implements net.thucydides.core.tags.Taggable
| Constructor and Description |
|---|
SerenityRunner(Class<?> klass)
Creates a new test runner for WebDriver web tests.
|
SerenityRunner(Class<?> klass,
net.thucydides.core.batches.BatchManager batchManager) |
SerenityRunner(Class<?> klass,
com.google.inject.Injector injector) |
SerenityRunner(Class<?> klass,
com.google.inject.Module module)
Creates a new test runner for WebDriver web tests.
|
SerenityRunner(Class<?> klass,
WebDriverFactory webDriverFactory) |
SerenityRunner(Class<?> klass,
WebDriverFactory webDriverFactory,
DriverConfiguration configuration) |
SerenityRunner(Class<?> klass,
WebDriverFactory webDriverFactory,
DriverConfiguration configuration,
net.thucydides.core.batches.BatchManager batchManager) |
SerenityRunner(Class<?> klass,
WebdriverManager webDriverManager,
DriverConfiguration configuration,
net.thucydides.core.batches.BatchManager batchManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
additionalBrowserCleanup() |
protected org.openqa.selenium.WebDriver |
driverFor(org.junit.runners.model.FrameworkMethod method) |
protected void |
generateReports() |
protected net.thucydides.core.batches.BatchManager |
getBatchManager()
Batch Manager used for running tests in parallel batches
|
protected DriverConfiguration |
getConfiguration()
The Configuration class manages output directories and driver types.
|
protected Collection<net.thucydides.core.reports.AcceptanceTestReporter> |
getDefaultReporters() |
protected org.openqa.selenium.WebDriver |
getDriver() |
protected org.openqa.selenium.WebDriver |
getDriver(String driver,
String driverOptions) |
File |
getOutputDirectory() |
Pages |
getPages() |
protected JUnitStepListener |
getStepListener()
The Step Listener observes and records what happens during the execution of the test.
|
List<net.thucydides.core.model.TestOutcome> |
getTestOutcomes()
Find the current set of test outcomes produced by the test execution.
|
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)
Instantiate the @Managed-annotated WebDriver instance with current WebDriver.
|
protected void |
injectEnvironmentVariablesInto(Object testCase) |
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.
|
protected void |
prepareBrowserForTest() |
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(net.thucydides.core.reports.AcceptanceTestReporter reporter)
To generate reports, different AcceptanceTestReporter instances need to
subscribe to the listener.
|
void |
useQualifier(String qualifier) |
collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, possiblyExpectingExceptions, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutchildrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolationpublic SerenityRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
klass - the class under testorg.junit.runners.model.InitializationError - if some JUnit-related initialization problem occurredpublic SerenityRunner(Class<?> klass, com.google.inject.Module module) throws org.junit.runners.model.InitializationError
klass - the class under testmodule - used to inject a custom Guice moduleorg.junit.runners.model.InitializationError - if some JUnit-related initialization problem occurredpublic SerenityRunner(Class<?> klass, com.google.inject.Injector injector) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorpublic SerenityRunner(Class<?> klass, WebDriverFactory webDriverFactory) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorpublic SerenityRunner(Class<?> klass, WebDriverFactory webDriverFactory, DriverConfiguration configuration) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorpublic SerenityRunner(Class<?> klass, WebDriverFactory webDriverFactory, DriverConfiguration configuration, net.thucydides.core.batches.BatchManager batchManager) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorpublic SerenityRunner(Class<?> klass, net.thucydides.core.batches.BatchManager batchManager) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorpublic SerenityRunner(Class<?> klass, WebdriverManager webDriverManager, DriverConfiguration configuration, net.thucydides.core.batches.BatchManager batchManager) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorpublic Pages getPages()
protected DriverConfiguration getConfiguration()
protected net.thucydides.core.batches.BatchManager getBatchManager()
public File getOutputDirectory()
public void subscribeReporter(net.thucydides.core.reports.AcceptanceTestReporter reporter)
reporter - an implementation of the AcceptanceTestReporter interface.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 void runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier)
runChild in class org.junit.runners.BlockJUnit4ClassRunnerprotected void additionalBrowserCleanup()
protected void prepareBrowserForTest()
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)
testCase - A Serenity-annotated test classprotected org.openqa.selenium.WebDriver driverFor(org.junit.runners.model.FrameworkMethod method)
protected void injectScenarioStepsInto(Object testCase)
testCase - A Serenity-annotated test classprotected void injectAnnotatedPagesObjectInto(Object testCase)
testCase - A Serenity-annotated test classprotected void injectEnvironmentVariablesInto(Object testCase)
protected org.openqa.selenium.WebDriver getDriver()
public List<net.thucydides.core.model.TestOutcome> getTestOutcomes()
protected Collection<net.thucydides.core.reports.AcceptanceTestReporter> getDefaultReporters()
Copyright © 2023. All rights reserved.