@Test public void testSample() throws MalformedURLException, IOException { System.out.println("sample"); String req = "GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"; String resp = "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\nTEST"; instance.setRequestData(req); instance.setParseResult(true); instance.sockEmul.setBytesToRead(ByteBuffer.wrap(resp.getBytes())); SampleResult result = instance.sample(null); assertEquals(ByteBuffer.wrap(req.getBytes()), instance.sockEmul.getWrittenBytes()); assertTrue(result.isSuccessful()); assertEquals("200", result.getResponseCode()); assertEquals("TEST", result.getResponseDataAsString()); assertTrue(!instance.sockEmul.isOpen()); }
@Override public SampleResult sample(Entry entry) { SampleResult res = super.sample(entry); if (isParseResult()) { parseResponse(res); } return res; }
HTTPRawSampler extends AbstractIPSampler { @Override public SampleResult sample(Entry entry) { SampleResult res = super.sample(entry); if (isParseResult()) { parseResponse(res); } return res; } }
HTTPRawSampler extends AbstractIPSampler { @Override public SampleResult sample(Entry entry) { SampleResult res = super.sample(entry); if (isParseResult()) { parseResponse(res); } return res; } HTTPRawSampler(); }
HTTPRawSampler extends AbstractIPSampler { @Override public SampleResult sample(Entry entry) { SampleResult res = super.sample(entry); if (isParseResult()) { parseResponse(res); } return res; } HTTPRawSampler(); @Override SampleResult sample(Entry entry); boolean isUseKeepAlive(); void setUseKeepAlive(boolean selected); boolean isParseResult(); void setParseResult(boolean selected); String getFileToSend(); void setFileToSend(String text); @Override boolean interrupt(); }
HTTPRawSampler extends AbstractIPSampler { @Override public SampleResult sample(Entry entry) { SampleResult res = super.sample(entry); if (isParseResult()) { parseResponse(res); } return res; } HTTPRawSampler(); @Override SampleResult sample(Entry entry); boolean isUseKeepAlive(); void setUseKeepAlive(boolean selected); boolean isParseResult(); void setParseResult(boolean selected); String getFileToSend(); void setFileToSend(String text); @Override boolean interrupt();  }