Package net.thucydides.core.bootstrap
Class ThucydidesAgent
java.lang.Object
net.thucydides.core.bootstrap.ThucydidesAgent
A utility class that provides services to initialize web testing and reporting-related fields in arbitrary objects.
Designed to replace the unfinished Thucydides class.
-
Constructor Summary
ConstructorsConstructorDescriptionThucydidesAgent
(Optional<String> driver, StepListener... additionalListeners) Create a new Thucydides agent instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Initialize a class for use with Thucydides.void
Tell Thucydides that a test is finished, and to generate the test reports for that test.void
testStarted
(String name) Tell Thucydides to start recording test outcomes and step events for a new test.void
void
testSuiteStarted
(String name) Tells Thucydides that a new test suite (test case, specification,...) has started.
-
Constructor Details
-
ThucydidesAgent
Create a new Thucydides agent instance. There is always a BaseStepListener configured in the context, but you can also specify other listeners, such as for logging (Listeners.getLoggingListener()) and to enable statistics (Listeners.getStatisticsListener())- Parameters:
driver
-additionalListeners
-
-
-
Method Details
-
enrich
Initialize a class for use with Thucydides. This involves instrumenting any @Step-annotated classes and setting up the Thucydides listeners.- Parameters:
testCase
- a Java object containing test methods.
-
testSuiteStarted
Tells Thucydides that a new test suite (test case, specification,...) has started.- Parameters:
name
-
-
testStarted
Tell Thucydides to start recording test outcomes and step events for a new test.- Parameters:
name
- A human-readable name that will identify this test in the test reports.
-
testFinished
public void testFinished()Tell Thucydides that a test is finished, and to generate the test reports for that test. -
testSuiteFinished
public void testSuiteFinished()
-