use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testIncludeExclude_include_only.
@Test
public void testIncludeExclude_include_only() {
CorrectedResultCollector instance = new CorrectedResultCollector();
instance.setProperty(CorrectedResultCollector.INCLUDE_SAMPLE_LABELS, "boom1,test,boom2");
instance.testStarted();
DebugVisualizer vis = new DebugVisualizer();
instance.setListener(vis);
vis.configure(instance);
SampleResult res = new SampleResult();
res.setSampleLabel("test");
instance.sampleOccurred(new SampleEvent(res, "tg"));
assertEquals("test", vis.lastLabel);
vis.lastLabel = null;
SampleResult res2 = new SampleResult();
res2.setSampleLabel("test1");
instance.sampleOccurred(new SampleEvent(res2, "tg"));
assertNull(vis.lastLabel);
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testIncludeExcludeRegex_none.
@Test
public void testIncludeExcludeRegex_none() {
CorrectedResultCollector instance = new CorrectedResultCollector();
instance.setProperty(CorrectedResultCollector.INCLUDE_SAMPLE_LABELS, "P[0-9].*");
instance.testStarted();
DebugVisualizer vis = new DebugVisualizer();
instance.setListener(vis);
vis.configure(instance);
vis.lastLabel = null;
SampleResult res2 = new SampleResult();
res2.setSampleLabel("P1_TEST");
instance.sampleOccurred(new SampleEvent(res2, "tg"));
assertNull(vis.lastLabel);
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testMinMax_min_only.
@Test
public void testMinMax_min_only() {
CorrectedResultCollector instance = new CorrectedResultCollector();
instance.setStartOffset("10");
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(19000, 20000);
res.setSampleLabel("test");
instance.sampleOccurred(new SampleEvent(res, "tg"));
assertNull(vis.lastLabel);
vis.lastLabel = null;
SampleResult res1 = SampleResult.createTestSample(21000, 22000);
res1.setSampleLabel("test1");
instance.sampleOccurred(new SampleEvent(res1, "tg"));
assertEquals("test1", vis.lastLabel);
instance.testEnded();
instance.setStartOffset("10a");
instance.testStarted();
vis.configure(instance);
instance.setListener(vis);
vis.lastLabel = null;
SampleResult res2 = SampleResult.createTestSample(19000, 20000);
res2.setSampleLabel("test2");
instance.sampleOccurred(new SampleEvent(res2, "tg"));
assertEquals("test2", vis.lastLabel);
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class MergeResultsServiceTest method testMergeSamples.
@Test
public void testMergeSamples() throws Exception {
String fname = "test-merge.csv";
CorrectedResultCollector crc = new CorrectedResultCollector();
crc.getSaveConfig().setAsXml(false);
crc.setFilename(fname);
MergeResultsService instance = new MergeResultsService();
instance.mergeSamples(crc, SAMPLES);
File f = new File(fname);
assertEquals(true, f.exists());
f.delete();
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class MergeResultsServiceTest method testMergeSamples_XML.
@Test
public void testMergeSamples_XML() throws Exception {
String fname = "test-merge.csv";
CorrectedResultCollector crc = new CorrectedResultCollector();
crc.getSaveConfig().setAsXml(true);
crc.setFilename(fname);
MergeResultsService instance = new MergeResultsService();
instance.mergeSamples(crc, SAMPLES);
File f = new File(fname);
assertEquals(true, f.exists());
f.delete();
}
Aggregations