Forum Discussion

krogold's avatar
krogold
Regular Contributor
8 years ago

Problems deleting custom properties from a test case

Hello, I'm trying to remove properties from a test case. I found the following code to do so and customized it but it doesn't work: data = context.testCase.getTestStepByName("Test Case Name"); Str...
  • StevenColon's avatar
    8 years ago

    Thank you for posting to our Community Forum.

     

    Here is a script (created in ReadyAPI 2.1) that deletes all testcase properties.

     

    propertyNames = context.getTestCase().getPropertyNames()
    
    for(propertyName in propertyNames){
    	context.getTestCase().removeProperty(propertyName)
    }

    Let me know if you have any questions/concerns.