net.thucydides.junit.steps
Class ScenarioStepListener

Package class diagram package ScenarioStepListener
java.lang.Object
  extended by org.junit.runner.notification.RunListener
      extended by net.thucydides.junit.steps.ScenarioStepListener

public class ScenarioStepListener
extends org.junit.runner.notification.RunListener

Observes the test run and stores test run details for later reporting. Observations are recorded in an AcceptanceTestRun object. This includes recording the names and results of each test, and taking and storing screenshots at strategic points during the tests.

Author:
johnsmart

Constructor Summary
ScenarioStepListener(org.openqa.selenium.TakesScreenshot driver, Configuration configuration)
           
 
Method Summary
protected  String aTestCalled(org.junit.runner.Description description)
           
protected  AcceptanceTestRun getCurrentAcceptanceTestRun()
           
protected  AcceptanceTestRun getNewCurrentAcceptanceTestRun()
           
 Photographer getPhotographer()
           
 List<AcceptanceTestRun> getTestRunResults()
           
 void testFailure(org.junit.runner.notification.Failure failure)
           
 void testFinished(org.junit.runner.Description description)
           
 void testGroupStarted(AnnotatedDescription testDescription)
           
 void testIgnored(org.junit.runner.Description description)
           
 void testRunStarted(org.junit.runner.Description description)
           
 void testStarted(org.junit.runner.Description description)
           
 
Methods inherited from class org.junit.runner.notification.RunListener
testAssumptionFailure, testRunFinished
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScenarioStepListener

public ScenarioStepListener(org.openqa.selenium.TakesScreenshot driver,
                            Configuration configuration)
Method Detail

getTestRunResults

public List<AcceptanceTestRun> getTestRunResults()

getPhotographer

public Photographer getPhotographer()

getCurrentAcceptanceTestRun

protected AcceptanceTestRun getCurrentAcceptanceTestRun()

getNewCurrentAcceptanceTestRun

protected AcceptanceTestRun getNewCurrentAcceptanceTestRun()

testRunStarted

public void testRunStarted(org.junit.runner.Description description)
                    throws Exception
Overrides:
testRunStarted in class org.junit.runner.notification.RunListener
Throws:
Exception

testStarted

public void testStarted(org.junit.runner.Description description)
                 throws Exception
Overrides:
testStarted in class org.junit.runner.notification.RunListener
Throws:
Exception

testGroupStarted

public void testGroupStarted(AnnotatedDescription testDescription)

testIgnored

public void testIgnored(org.junit.runner.Description description)
                 throws Exception
Overrides:
testIgnored in class org.junit.runner.notification.RunListener
Throws:
Exception

testFailure

public void testFailure(org.junit.runner.notification.Failure failure)
                 throws Exception
Overrides:
testFailure in class org.junit.runner.notification.RunListener
Throws:
Exception

testFinished

public void testFinished(org.junit.runner.Description description)
                  throws Exception
Overrides:
testFinished in class org.junit.runner.notification.RunListener
Throws:
Exception

aTestCalled

protected String aTestCalled(org.junit.runner.Description description)


Copyright © 2011 Wakaleo Consulting. All Rights Reserved.