Search in sources :

Example 26 with SampleEvent

use of org.apache.jmeter.samplers.SampleEvent in project jmeter-plugins by undera.

the class MonitoringResultsCollectorTest method testSampleOccurred.

/**
 * Test of sampleOccurred method, of class MonitoringResultsCollector.
 */
@Test
public void testSampleOccurred() {
    System.out.println("sampleOccurred");
    SampleEvent event = null;
    MonitoringResultsCollector instance = new MonitoringResultsCollector();
    instance.sampleOccurred(event);
// TODO review the generated test code and remove the default call to fail.
}
Also used : SampleEvent(org.apache.jmeter.samplers.SampleEvent) Test(org.junit.Test)

Example 27 with SampleEvent

use of org.apache.jmeter.samplers.SampleEvent in project jmeter-plugins by undera.

the class AutoStopTest method testSampleStopped.

/**
 * Test of sampleStopped method, of class AutoStop.
 */
@Test
public void testSampleStopped() {
    System.out.println("sampleStopped");
    SampleEvent se = null;
    AutoStop instance = new AutoStop();
    instance.sampleStopped(se);
}
Also used : SampleEvent(org.apache.jmeter.samplers.SampleEvent) Test(org.junit.Test)

Example 28 with SampleEvent

use of org.apache.jmeter.samplers.SampleEvent in project jmeter-plugins by undera.

the class AutoStopTest method testSampleOccurred_error.

/**
 * Test of sampleOccurred method, of class AutoStop.
 */
@Test
public void testSampleOccurred_error() throws InterruptedException {
    System.out.println("sampleOccurred error");
    SampleResult res = new SampleResult();
    SampleEvent se = new SampleEvent(res, "");
    AutoStop instance = new AutoStop();
    instance.setResponseTime("0");
    instance.setErrorRate("60.6");
    instance.setErrorRateSecs("3");
    instance.sampleOccurred(se);
    for (int n = 0; n < 5; n++) {
        synchronized (this) {
            wait(1000);
        }
        instance.sampleOccurred(se);
    }
}
Also used : SampleResult(org.apache.jmeter.samplers.SampleResult) SampleEvent(org.apache.jmeter.samplers.SampleEvent) Test(org.junit.Test)

Example 29 with SampleEvent

use of org.apache.jmeter.samplers.SampleEvent in project jmeter-plugins by undera.

the class AutoStopTest method testSampleStarted.

/**
 * Test of sampleStarted method, of class AutoStop.
 */
@Test
public void testSampleStarted() {
    System.out.println("sampleStarted");
    SampleEvent se = null;
    AutoStop instance = new AutoStop();
    instance.sampleStarted(se);
}
Also used : SampleEvent(org.apache.jmeter.samplers.SampleEvent) Test(org.junit.Test)

Example 30 with SampleEvent

use of org.apache.jmeter.samplers.SampleEvent in project jmeter-plugins by undera.

the class SynthesisReportGuiTest method testAdd.

/**
 * Test of add method, of class SynthesisReportGui.
 */
@Test
public void testAdd() throws IOException {
    System.out.println("add");
    SynthesisReportGui instance = new SynthesisReportGui();
    SampleResult res = new SampleResult();
    instance.add(res);
    SampleResult res2 = new SampleResult();
    instance.add(res2);
    ResultCollector rc = new ResultCollector();
    rc.setListener(instance);
    rc.sampleOccurred(new SampleEvent(res, ""));
    rc.sampleOccurred(new SampleEvent(res2, ""));
    File f = File.createTempFile("test", ".csv");
    instance.getGraphPanelChart().saveGraphToCSV(f);
}
Also used : SampleResult(org.apache.jmeter.samplers.SampleResult) ResultCollector(org.apache.jmeter.reporters.ResultCollector) File(java.io.File) SampleEvent(org.apache.jmeter.samplers.SampleEvent) Test(org.junit.Test)

Aggregations

SampleEvent (org.apache.jmeter.samplers.SampleEvent)58 SampleResult (org.apache.jmeter.samplers.SampleResult)30 Test (org.junit.Test)17 CorrectedResultCollector (kg.apc.jmeter.vizualizers.CorrectedResultCollector)12 Test (org.junit.jupiter.api.Test)10 File (java.io.File)5 JMeterSerialTest (org.apache.jorphan.test.JMeterSerialTest)4 SampleSaveConfiguration (org.apache.jmeter.samplers.SampleSaveConfiguration)3 JMeterVariables (org.apache.jmeter.threads.JMeterVariables)3 IOException (java.io.IOException)2 ResultCollector (org.apache.jmeter.reporters.ResultCollector)2 StatisticalSampleResult (org.apache.jmeter.samplers.StatisticalSampleResult)2 ArrivalsThreadGroupTest (com.blazemeter.jmeter.threads.arrivals.ArrivalsThreadGroupTest)1 BufferedReader (java.io.BufferedReader)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 Reader (java.io.Reader)1 StringReader (java.io.StringReader)1