Forum Discussion

livevox084's avatar
livevox084
Occasional Contributor
9 years ago
Solved

How to i clear the property values of a TestCase or TestSuite using groovy script?

Hi Support,

I am using Ready API 1.3.1

How to i clear the property values of a TestCase or TestSuite using groovy script?

 

Thanks,

Rajendra

  • Below can be used for test case

     

    context.testCase.properties.each {
    	context.testCase.properties[it.key].value = ''
    }

    for test suite 

    replace context.testCase with context.testCase.testSuite in the above code snippet.

6 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    Below can be used for test case

     

    context.testCase.properties.each {
    	context.testCase.properties[it.key].value = ''
    }

    for test suite 

    replace context.testCase with context.testCase.testSuite in the above code snippet.

    • JT7's avatar
      JT7
      Occasional Contributor

      Copied it into the Test Case TearDown Script section and it works great.

       

      Thanks!

    • serto's avatar
      serto
      New Contributor

      How i have to change the code for deleting values from TestStep Properties? 

       

      • nmrao's avatar
        nmrao
        Champion Level 3
        Create new topic with details, please. Original question is already marked answered.