Unable to add Property to Groovy TestStep
String rec = "Test1"
testRunner.testCase.getTestStepByName("Env_SetUp").setPropertyValue("TestCase",rec)
-------------------------------
Using the above code to add a Custom Property to a DataSource TestStep programatically. This Executes without any error or warning, but the Custom Property to a DataSource Test Step in SOAPUI Pro.
Is there a way we can programatically add the DataSource Custom Properties rather than importing them manually.
The above method setPropertyValue works when adding properties to a TestCase or TestSuite but not to a TestStep.
ReadyAPI Version 2.5.0.
Can you please help.
If you are trying to set up the properties for a Data Source, try using the below snippet. That will add the property. Depending on what sort of DataSource you are using you may have other stuff you need to work through first. What sort of Data Source do you want to use? Grid? XML? Groovy? More details will be helpful.
String rec = "Test1" testRunner.testCase.getTestStepByName("Env_SetUp").addProperty("TestCase");