final ErrorReporterImpl errorReporter = new ErrorReporterImpl(httpCommandProcessor, testContext);
ErrorReportingCommandProcessor commandProcessor = new ErrorReportingCommandProcessor(httpCommandProcessor,
errorReporter);
final Selenium selenium = new DefaultSelenium(commandProcessor);
selenium.start();
testContext.setAttribute(TapestryTestConstants.BASE_URL_ATTRIBUTE, baseURL);
testContext.setAttribute(TapestryTestConstants.SELENIUM_ATTRIBUTE, selenium);
testContext.setAttribute(TapestryTestConstants.ERROR_REPORTER_ATTRIBUTE, errorReporter);
testContext.setAttribute(TapestryTestConstants.COMMAND_PROCESSOR_ATTRIBUTE, commandProcessor);
testContext.setAttribute(TapestryTestConstants.SHUTDOWN_ATTRIBUTE, new Runnable()
{
public void run()
{
try
{
selenium.stop();
seleniumServer.stop();
stopWebServer.run();
// Output, at the end of the Test, any html capture or screen shots (this makes it much easier
// to locate them at the end of the run; there's such a variance on where they end up based