Package org.ngrinder.model

Examples of org.ngrinder.model.PerfTest


  }

  @Test
  public void testUpdateStatus() {
    String testName = "test1";
    PerfTest test = createPerfTest(testName, Status.TESTING, new Date());
    String testName2 = "test1";
    PerfTest test2 = createPerfTest(testName2, Status.START_AGENTS, new Date());

    String ids = test.getId() + "," + test2.getId();
    HttpEntity<String> rtnJson = controller.getStatuses(getTestUser(), ids);
    assertThat(rtnJson.getBody(), notNullValue());
  }
View Full Code Here


    when(spiedConfig.isClustered()).thenReturn(true);
    ReflectionTestUtils.setField(perfTestConfig, "config", spiedConfig);

    PerfTestService clusteredPerfTest = perfTestConfig.perfTestService();

    PerfTest test = clusteredPerfTest.getNextRunnablePerfTestPerfTestCandidate();

    assertThat(test, nullValue());
  }
View Full Code Here

    tagRepository.deleteAll();
    tagRepository.flush();
  }

  public PerfTest newPerfTest(String testName, Status status, Date scheduledTime) {
    PerfTest test = new PerfTest();
    test.setTestName(testName);
    test.setThreshold("D");
    test.setDuration(4000L);
    test.setAgentCount(1);
    test.setVuserPerAgent(4);
    test.setScheduledTime(scheduledTime);
    test.setIgnoreSampleCount(0);
    test.setTargetHosts("127.0.0.1");
    test.setScriptName("test1.py");
    test.setProcesses(2);
    test.setThreads(2);
    test.setRampUpStep(1);
    test.setRampUpInitSleepTime(0);
    test.setRampUpIncrementInterval(1000);
    test.setStatus(status);
    test.setCreatedUser(getTestUser());
    test.setRegion(config.getRegion());
    test.setSamplingInterval(1);
    return test;
  }
View Full Code Here

    test.setSamplingInterval(1);
    return test;
  }

  public PerfTest createPerfTest(String testName, Status status, Date scheduledTime) {
    PerfTest perftest = newPerfTest(testName, status, scheduledTime);
    return createPerfTest(perftest);
  }
View Full Code Here

      List<PerfTest> currentlyRunningTests = perfTestService.getCurrentlyRunningTest();
      LOG.debug("Currently running test is {}. No more tests can not run.", currentlyRunningTests.size());
      return;
    }
    // Find out next ready perftest
    PerfTest runCandidate = getRunnablePerfTest();
    if (runCandidate == null) {
      return;
    }

    if (!isScheduledNow(runCandidate)) {
View Full Code Here

    tempReport.deleteOnExit();
  }

  @Test
  public void testAddMonitor() throws IOException {
    PerfTest perfTest = mock(PerfTest.class);
    when(perfTest.getTargetHostIP()).thenReturn(Lists.newArrayList("127.0.0.1"));
    when(perfTest.getSamplingInterval()).thenReturn(2);
    SingleConsole singleConsole = mock(SingleConsole.class);
    when(singleConsole.getReportPath()).thenReturn(tempReport);
    MonitorCollectorPlugin monitorCollectorPlugin = new MonitorCollectorPlugin(config, scheduledTaskService,
        perfTestService, 1L) {
      @Override
View Full Code Here

TOP

Related Classes of org.ngrinder.model.PerfTest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.