use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testIncludeExcludeRegex_exclude_include.
@Test
public void testIncludeExcludeRegex_exclude_include() {
CorrectedResultCollector instance = new CorrectedResultCollector();
instance.setExcludeLabels("[T-Z][0-9].*");
instance.setIncludeLabels("[P-T][0-9].*");
instance.setProperty(CorrectedResultCollector.EXCLUDE_REGEX_CHECKBOX_STATE, true);
instance.setProperty(CorrectedResultCollector.INCLUDE_REGEX_CHECKBOX_STATE, true);
instance.testStarted();
DebugVisualizer vis = new DebugVisualizer();
vis.configure(instance);
instance.setListener(vis);
vis.lastLabel = null;
SampleResult res = new SampleResult();
res.setSampleLabel("Z1_TEST");
instance.sampleOccurred(new SampleEvent(res, "tg"));
assertNull(vis.lastLabel);
vis.lastLabel = null;
SampleResult res2 = new SampleResult();
res2.setSampleLabel("P1_TEST");
instance.sampleOccurred(new SampleEvent(res2, "tg"));
assertEquals("P1_TEST", vis.lastLabel);
vis.lastLabel = null;
SampleResult res3 = new SampleResult();
res3.setSampleLabel("T1_TEST");
instance.sampleOccurred(new SampleEvent(res3, "tg"));
assertNull(vis.lastLabel);
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testMinMax_max_only.
@Test
public void testMinMax_max_only() {
CorrectedResultCollector instance = new CorrectedResultCollector();
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);
instance.testEnded();
instance.setEndOffset("20a");
instance.testStarted();
vis.configure(instance);
instance.setListener(vis);
vis.lastLabel = null;
SampleResult res2 = SampleResult.createTestSample(31000, 32000);
res2.setSampleLabel("test2");
instance.sampleOccurred(new SampleEvent(res2, "tg"));
assertEquals("test2", vis.lastLabel);
}
Aggregations