Forum Discussion

Satyadip28's avatar
Satyadip28
New Contributor
6 years ago

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 DataS...
  • groovyguy's avatar
    6 years ago

    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");