Class ThucydidesAgent


  • public final class ThucydidesAgent
    extends Object
    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 Detail

      • ThucydidesAgent

        public ThucydidesAgent​(Optional<String> driver,
                               StepListener... additionalListeners)
        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 Detail

      • enrich

        public void enrich​(Object testCase)
        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

        public void testSuiteStarted​(String name)
        Tells Thucydides that a new test suite (test case, specification,...) has started.
        Parameters:
        name -
      • testStarted

        public void testStarted​(String name)
        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()