assertEquals("http://www.apache.org/subdir/index.html", newUrl);
}
public void testFailSimpleParse1() throws Exception
{
HTTPSampler config = makeUrlConfig(".*index.*?param2=.+1");
HTTPSampler context =
makeContext("http://www.apache.org/subdir/previous.html");
String responseText =
"<html><head><title>Test page</title></head><body>"
+ "<a href=\"/home/index.html?param1=value1\">"
+ "Goto index page</a></body></html>";
HTTPSampleResult result = new HTTPSampleResult();
String newUrl = config.getUrl().toString();
result.setResponseData(responseText.getBytes());
result.setSampleLabel(context.toString());
result.setURL(context.getUrl());
jmctx.setCurrentSampler(context);
jmctx.setCurrentSampler(config);
jmctx.setPreviousResult(result);
parser.process();
assertEquals(newUrl, config.getUrl().toString());