mforgues
13 years agoOccasional Contributor
Changing Datagen properties from groovy script
Hi,
I'm trying to modify the properties of a datagen from a groovy script but it seems like the settings are not applied when I look at them in the GUI :
String start = testRunner.testCase.getPropertyValue("start");
String end = testRunner.testCase.getPropertyValue("end");
String step = testRunner.testCase.getPropertyValue("step");
String pattern = testRunner.testCase.getPropertyValue("pattern");
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setStartValue(start);
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setEndValue(end);
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setStepValue(step);
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setPattern(pattern);
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setPersist(true);
Do I need to do something more to save or commit the changes?
Thanks,
Mathieu
I'm trying to modify the properties of a datagen from a groovy script but it seems like the settings are not applied when I look at them in the GUI :
String start = testRunner.testCase.getPropertyValue("start");
String end = testRunner.testCase.getPropertyValue("end");
String step = testRunner.testCase.getPropertyValue("step");
String pattern = testRunner.testCase.getPropertyValue("pattern");
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setStartValue(start);
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setEndValue(end);
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setStepValue(step);
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setPattern(pattern);
testRunner.testCase.testSteps["DataGen_Accounts"].getProperty("test2").getProperty().setPersist(true);
Do I need to do something more to save or commit the changes?
Thanks,
Mathieu