use of org.apache.jmeter.samplers.SampleResult in project jmeter-plugins by undera.
the class HitsPerSecondGuiTest method testAdd.
/**
* Test of add method, of class HitsPerSecondGui.
*/
@Test
public void testAdd() {
System.out.println("add");
SampleResult res = new SampleResult();
res.setAllThreads(1);
res.setThreadName("test 1-2");
HitsPerSecondGui instance = new HitsPerSecondGui();
instance.add(res);
res.sampleStart();
try {
Thread.sleep(10);
} catch (InterruptedException ex) {
}
res.sampleEnd();
instance.add(res);
}
use of org.apache.jmeter.samplers.SampleResult in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testMinMax_min_max.
@Test
public void testMinMax_min_max() {
CorrectedResultCollector instance = new CorrectedResultCollector();
instance.setStartOffset("10");
instance.setEndOffset("20");
instance.testStarted();
DebugVisualizer vis = new DebugVisualizer();
vis.configure(instance);
instance.setListener(vis);
vis.startTimeRef = 10300;
vis.startTimeInf = 10000;
vis.startTimeSup = 11000;
vis.lastLabel = null;
SampleResult res = SampleResult.createTestSample(31500, 32000);
res.setSampleLabel("test");
instance.sampleOccurred(new SampleEvent(res, "tg"));
assertNull(vis.lastLabel);
vis.lastLabel = null;
SampleResult res1 = SampleResult.createTestSample(29000, 30000);
res1.setSampleLabel("test1");
instance.sampleOccurred(new SampleEvent(res1, "tg"));
assertEquals("test1", vis.lastLabel);
vis.lastLabel = null;
SampleResult res2 = SampleResult.createTestSample(19000, 20000);
res2.setSampleLabel("test2");
instance.sampleOccurred(new SampleEvent(res2, "tg"));
assertNull(vis.lastLabel);
}
use of org.apache.jmeter.samplers.SampleResult in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testMinMax_none.
@Test
public void testMinMax_none() {
CorrectedResultCollector instance = new CorrectedResultCollector();
instance.testStarted();
DebugVisualizer vis = new DebugVisualizer();
vis.configure(instance);
instance.setListener(vis);
SampleResult res = SampleResult.createTestSample(21000, 30000);
res.setSampleLabel("test");
instance.sampleOccurred(new SampleEvent(res, "tg"));
assertEquals("test", vis.lastLabel);
}
use of org.apache.jmeter.samplers.SampleResult in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testIncludeExclude_exclude_only.
@Test
public void testIncludeExclude_exclude_only() {
CorrectedResultCollector instance = new CorrectedResultCollector();
instance.setProperty(CorrectedResultCollector.EXCLUDE_SAMPLE_LABELS, "boom1,test,boom2");
instance.testStarted();
DebugVisualizer vis = new DebugVisualizer();
vis.configure(instance);
instance.setListener(vis);
vis.lastLabel = null;
SampleResult res = new SampleResult();
res.setSampleLabel("test");
instance.sampleOccurred(new SampleEvent(res, "tg"));
assertNull(vis.lastLabel);
vis.lastLabel = null;
SampleResult res2 = new SampleResult();
res2.setSampleLabel("test1");
instance.sampleOccurred(new SampleEvent(res2, "tg"));
assertEquals("test1", vis.lastLabel);
}
use of org.apache.jmeter.samplers.SampleResult in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testIsFromTransactionControler.
/**
* Test of isFromTransactionControler method, of class
* AbstractGraphPanelVisualizer.
*/
@Test
public void testIsFromTransactionControler() {
System.out.println("isFromTransactionControler");
SampleResult res = new SampleResult();
AbstractGraphPanelVisualizer instance = new AbstractGraphPanelVisualizerImpl();
boolean expResult = false;
boolean result = instance.isFromTransactionControler(res);
assertEquals(expResult, result);
}
Aggregations