net.thucydides.core.bootstrap
Class ThucydidesAgent

Package class diagram package ThucydidesAgent
java.lang.Object
  extended by net.thucydides.core.bootstrap.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 Summary
ThucydidesAgent(com.google.common.base.Optional<String> driver, StepListener... additionalListeners)
          Create a new Thucydides agent instance.
 
Method Summary
 void enrich(Object testCase)
          Initialize a class for use with Thucydides.
 void testFinished()
          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 testSuiteFinished()
           
 void testSuiteStarted(String name)
          Tells Thucydides that a new test suite (test case, specification,...) has started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThucydidesAgent

public ThucydidesAgent(com.google.common.base.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()


Copyright © 2011-2013 Wakaleo Consulting. All Rights Reserved.