Search in sources :

Example 6 with CorrectedResultCollector

use of kg.apc.jmeter.vizualizers.CorrectedResultCollector 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);
}
Also used : SampleResult(org.apache.jmeter.samplers.SampleResult) CorrectedResultCollector(kg.apc.jmeter.vizualizers.CorrectedResultCollector) SampleEvent(org.apache.jmeter.samplers.SampleEvent)

Example 7 with CorrectedResultCollector

use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.

the class AbstractGraphPanelVisualizerTest method testIncludeExclude_none.

@Test
public void testIncludeExclude_none() {
    CorrectedResultCollector instance = new CorrectedResultCollector();
    instance.testStarted();
    DebugVisualizer vis = new DebugVisualizer();
    vis.configure(instance);
    instance.setListener(vis);
    SampleResult res = new SampleResult();
    res.setSampleLabel("test");
    instance.sampleOccurred(new SampleEvent(res, "tg"));
    assertEquals("test", vis.lastLabel);
}
Also used : SampleResult(org.apache.jmeter.samplers.SampleResult) CorrectedResultCollector(kg.apc.jmeter.vizualizers.CorrectedResultCollector) SampleEvent(org.apache.jmeter.samplers.SampleEvent)

Example 8 with CorrectedResultCollector

use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.

the class AbstractGraphPanelVisualizerTest method testIncludeExcludeRegex_include_only.

@Test
public void testIncludeExcludeRegex_include_only() {
    CorrectedResultCollector instance = new CorrectedResultCollector();
    instance.setProperty(CorrectedResultCollector.INCLUDE_SAMPLE_LABELS, "P[0-9].*");
    instance.setProperty(CorrectedResultCollector.INCLUDE_REGEX_CHECKBOX_STATE, true);
    instance.testStarted();
    DebugVisualizer vis = new DebugVisualizer();
    instance.setListener(vis);
    vis.configure(instance);
    vis.lastLabel = null;
    SampleResult res = new SampleResult();
    res.setSampleLabel("P1_TEST");
    instance.sampleOccurred(new SampleEvent(res, "tg"));
    assertEquals("P1_TEST", vis.lastLabel);
    vis.lastLabel = null;
    SampleResult res1 = new SampleResult();
    res1.setSampleLabel("T1_TEST");
    instance.sampleOccurred(new SampleEvent(res1, "tg"));
    assertNull(vis.lastLabel);
}
Also used : SampleResult(org.apache.jmeter.samplers.SampleResult) CorrectedResultCollector(kg.apc.jmeter.vizualizers.CorrectedResultCollector) SampleEvent(org.apache.jmeter.samplers.SampleEvent)

Example 9 with CorrectedResultCollector

use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.

the class AbstractGraphPanelVisualizerTest method testIncludeExclude_exclude_include.

@Test
public void testIncludeExclude_exclude_include() {
    CorrectedResultCollector instance = new CorrectedResultCollector();
    instance.setExcludeLabels("boom1,test,boom2");
    instance.setIncludeLabels("boom1,test1,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);
    vis.lastLabel = null;
    SampleResult res3 = new SampleResult();
    res3.setSampleLabel("boom1");
    instance.sampleOccurred(new SampleEvent(res3, "tg"));
    assertNull(vis.lastLabel);
}
Also used : SampleResult(org.apache.jmeter.samplers.SampleResult) CorrectedResultCollector(kg.apc.jmeter.vizualizers.CorrectedResultCollector) SampleEvent(org.apache.jmeter.samplers.SampleEvent)

Example 10 with CorrectedResultCollector

use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.

the class AbstractGraphPanelVisualizerTest method testSetUpFiltering.

/**
 * Test of setUpFiltering method, of class AbstractGraphPanelVisualizer.
 */
@Test
public void testSetUpFiltering() {
    System.out.println("setUpFiltering");
    CorrectedResultCollector rc = new CorrectedResultCollector();
    AbstractGraphPanelVisualizer instance = new AbstractGraphPanelVisualizerImpl();
    instance.setUpFiltering(rc);
}
Also used : CorrectedResultCollector(kg.apc.jmeter.vizualizers.CorrectedResultCollector)

Aggregations

CorrectedResultCollector (kg.apc.jmeter.vizualizers.CorrectedResultCollector)22 SampleEvent (org.apache.jmeter.samplers.SampleEvent)12 SampleResult (org.apache.jmeter.samplers.SampleResult)12 File (java.io.File)4 IOException (java.io.IOException)1 AbstractGraphPanelVisualizer (kg.apc.jmeter.graphs.AbstractGraphPanelVisualizer)1 SampleSaveConfiguration (org.apache.jmeter.samplers.SampleSaveConfiguration)1 CollectionProperty (org.apache.jmeter.testelement.property.CollectionProperty)1 JMeterProperty (org.apache.jmeter.testelement.property.JMeterProperty)1 NullProperty (org.apache.jmeter.testelement.property.NullProperty)1