private HttpURLConnection runWebTest(Test theDelegatedTest,
Test theWrappedTest, WebRequest theRequest) throws Throwable
{
// Add the class name, the method name, to the request to simulate and
// automatic session creation flag to the request
RequestDirectives directives = new RequestDirectives(theRequest);
directives.setClassName(theDelegatedTest.getClass().getName());
directives.setMethodName(getCurrentTestName(theDelegatedTest));
directives.setAutoSession(
theRequest.getAutomaticSession() ? "true" : "false");
// Add the wrapped test if it is not equal to our current instance
if (theWrappedTest != null)
{
directives.setWrappedTestName(theWrappedTest.getClass().getName());
}
// Add the simulated URL (if one has been defined)
if (theRequest.getURL() != null)
{