use of org.apache.jmeter.protocol.http.sampler.HTTPNullSampler in project jmeter by apache.
the class TestAnchorModifier method makeUrlConfig.
private HTTPSamplerBase makeUrlConfig(String path) {
HTTPSamplerBase config = new HTTPNullSampler();
config.setDomain("www.apache.org");
config.setMethod(HTTPConstants.GET);
config.setPath(path);
config.setPort(HTTPConstants.DEFAULT_HTTP_PORT);
config.setProtocol(HTTPConstants.PROTOCOL_HTTP);
return config;
}
use of org.apache.jmeter.protocol.http.sampler.HTTPNullSampler in project jmeter by apache.
the class TestAnchorModifier method makeContext.
private HTTPSamplerBase makeContext(String url) throws MalformedURLException {
URL u = new URL(url);
HTTPSamplerBase context = new HTTPNullSampler();
context.setDomain(u.getHost());
context.setPath(u.getPath());
context.setPort(u.getPort());
context.setProtocol(u.getProtocol());
context.parseArguments(u.getQuery());
return context;
}
use of org.apache.jmeter.protocol.http.sampler.HTTPNullSampler in project jmeter by apache.
the class TestHC4CookieManager method testSendCookie2.
@Test
public void testSendCookie2() throws Exception {
man.add(new Cookie("id", "value", ".apache.org", "/", false, 9999999999L));
HTTPSamplerBase sampler = new HTTPNullSampler();
sampler.setDomain("jakarta.apache.org");
sampler.setPath("/index.html");
sampler.setMethod(HTTPConstants.GET);
assertNotNull(man.getCookieHeaderForURL(sampler.getUrl()));
}
Aggregations