Forum Discussion

szalejot's avatar
szalejot
New Contributor
12 years ago

Parametrize load test duration in SoapUI

I am currently using SoapUI for load testing my web service. Typical test case includes few load tests. These test are part of integration testing. I have managed how to call this tests from java class during integration-test phase in maven:

@Test
public void testExecute() throws Exception {
WsdlProject project = new WsdlProject("src/test/soapui-project.xml");
for (TestSuite testSuite : project.getTestSuiteList()) {
for (TestCase testCase : testSuite.getTestCaseList()) {
TestRunner runner = testCase.run(new PropertiesMap(), false);
Assert.assertEquals(Status.FINISHED, runner.getStatus());
for (LoadTest loadTest : testCase.getLoadTestList()) {
LoadTestRunner loadRunner = loadTest.run();
Assert.assertEquals(Status.FINISHED,
loadRunner.waitUntilFinished());
}
}
}
}


What I want to do is to parametrize load test duration, so I can run quite short tests (for integration test purposed only) when I am during typical development deploy and be able to do long extensive test during night test builds.
How can I achieve that? Can I do this in Setup Script of load test (if yes, please help with this, I have no experience with SoapUI scripting) or is there any other way to achieve this?
  • nmrao's avatar
    nmrao
    Champion Level 3
    "Parameterize the test" - Would you please clearify what are the things you would like to parameterize?
  • szalejot's avatar
    szalejot
    New Contributor
    nmrao wrote:
    "Parameterize the test" - Would you please clearify what are the things you would like to parameterize?


    I have wrote in my post: "What I want to do is to parametrize load test duration"
    Load test can have limit of seconds how long they should be performed. I want to parametrize this duration so I don't have to change project xml any time I want to perform shot or long tests.
    In other way: I want to be able to perform the same load tests from soapui project and define they duration just before calling them from mine java code.