mforgues
13 years agoOccasional Contributor
Accessing and modifying datagen properties
Hi,
I'm do some load testing using soapUI pro and use the datagen component a lot.
I would like to know if it's possible to access and change the datagen properties (start, end, step, pattern) using a groovy script?
I tried this but I'm not sure it's the right way to proceed :
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().getStartValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().getEndValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().getStepValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().getPattern();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().setStartValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().setEndValue("100");
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().setStepValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().setPattern();
Thanks,
Mathieu
I'm do some load testing using soapUI pro and use the datagen component a lot.
I would like to know if it's possible to access and change the datagen properties (start, end, step, pattern) using a groovy script?
I tried this but I'm not sure it's the right way to proceed :
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().getStartValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().getEndValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().getStepValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().getPattern();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().setStartValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().setEndValue("100");
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().setStepValue();
testRunner.testCase.getTestStepByName("DataGen").getPropertyAt(0).getProperty().setPattern();
Thanks,
Mathieu