Java Code Examples for org.apache.jmeter.samplers.SampleResult#setAllThreads()

The following examples show how to use org.apache.jmeter.samplers.SampleResult#setAllThreads() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BytesThroughputOverTimeGuiTest.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
/**
 * Test of add method, of class BytesThroughputOverTimeGui.
 */
@Test
public void testAdd()
{
    System.out.println("add");
    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    res.setBytes(1234);
    BytesThroughputOverTimeGui instance = new BytesThroughputOverTimeGui();
    instance.add(res);
    res.sampleStart();
    try
    {
        Thread.sleep(10);
    } catch (InterruptedException ex)
    {
    }
    res.sampleEnd();
    instance.add(res);
}
 
Example 2
Source File: ResponseCodesPerSecondGuiTest.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
/**
 * Test of add method, of class ResponseCodesPerSecondGui.
 */
@Test
public void testAdd()
{
    System.out.println("add");
    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    res.setResponseCode("200");
    ResponseCodesPerSecondGui instance = new ResponseCodesPerSecondGui();
    instance.add(res);
    res.sampleStart();
    try
    {
        Thread.sleep(10);
    } catch (InterruptedException ex)
    {
    }
    res.sampleEnd();
    instance.add(res);
}
 
Example 3
Source File: HitsPerSecondGuiTest.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
/**
 * 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);
}
 
Example 4
Source File: HitsPerSecondGuiTest.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
@Test
public void testAdd_issue48() {
    System.out.println("add48");
    SampleResult res = new SampleResult();
    res.setAllThreads(0);
    res.setThreadName("test 1-2");
    res.setResponseMessage(null);

    SampleResult subres = new SampleResult();
    subres.sampleStart();
    subres.sampleEnd();
    res.sampleStart();
    res.addSubResult(subres);

    try {
        Thread.sleep(10);
    } catch (InterruptedException ex) {
    }
    HitsPerSecondGui instance = new HitsPerSecondGui();
    instance.add(res);
}
 
Example 5
Source File: TransactionsPerSecondGuiTest.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
/**
 * Test of add method, of class TransactionsPerSecondGui.
 */
@Test
public void testAdd()
{
    System.out.println("add");

    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    TransactionsPerSecondGui instance = new TransactionsPerSecondGui();
    instance.add(res);
    res.sampleStart();
    try
    {
        Thread.sleep(10);
    } catch (InterruptedException ex)
    {
    }
    res.sampleEnd();
    instance.add(res);
}
 
Example 6
Source File: ThreadsStateOverTimeGuiTest.java    From jmeter-plugins with Apache License 2.0 6 votes vote down vote up
/**
 * Test of add method, of class ThreadsStateOverTimeGui.
 */
@Test
public void testAdd()
{
   System.out.println("add");
   SampleResult res = new SampleResult();
   res.sampleStart();
   res.setAllThreads(1);
   res.setThreadName("test 1-2");
   res.sampleEnd();
   instance.add(res);
   
   try
   {
      Thread.sleep(2000);
   }
   catch (InterruptedException ex)
   {
      Logger.getLogger(ThreadsStateOverTimeGuiTest.class.getName()).log(Level.SEVERE, null, ex);
   }
   
   SampleResult res2 = new SampleResult(res);
   res2.setAllThreads(1);
   res2.setThreadName("test 1-2");
   instance.add(res);
}
 
Example 7
Source File: LatenciesOverTimeGuiTest.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
/**
 * Test of add method, of class LatenciesOverTimeGui.
 */
@Test
public void testAdd() {
    System.out.println("add");
    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    LatenciesOverTimeGui instance = new LatenciesOverTimeGui();
    instance.add(res);
}
 
Example 8
Source File: ResponseTimesOverTimeGuiTest.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
/**
 *
 */
@Test
public void testAdd() {
    System.out.println("add");
    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    ResponseTimesOverTimeGui instance = new ResponseTimesOverTimeGui();
    instance.add(res);
}
 
Example 9
Source File: ResponseTimesPercentilesGuiTest.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
/**
 * Test of add method, of class ResponseTimesPercentilesGUI.
 */
@Test
public void testAdd()
{
    System.out.println("add");
    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    ResponseTimesPercentilesGui instance = new ResponseTimesPercentilesGui();
    instance.add(res);
}
 
Example 10
Source File: ResponseTimesDistributionGuiTest.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testAdd() {
    System.out.println("add");
    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    res.setStampAndTime(System.currentTimeMillis(), 1000);
    ResponseTimesDistributionGui instance = new ResponseTimesDistributionGui();
    instance.add(res);
}
 
Example 11
Source File: MergeResultsGuiTest.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testAdd() {
    System.out.println("add");
    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    MergeResultsGui instance = new MergeResultsGui();
    instance.add(res);
}
 
Example 12
Source File: PageDataExtractorOverTimeGuiTest.java    From jmeter-plugins with Apache License 2.0 5 votes vote down vote up
/**
 * Test of add method, of class PageDataExtractorOverTimeGui.
 */
@Test
public void testAdd() {
    System.out.println("add");
    SampleResult res = new SampleResult();
    res.setAllThreads(1);
    res.setThreadName("test 1-2");
    res.setResponseData("aa=10\nbb=20");
    PageDataExtractorOverTimeGui instance = new PageDataExtractorOverTimeGui();
    instance.add(res);
}