How to i clear the property values of a TestCase or TestSuite using groovy script?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Copied it into the Test Case TearDown Script section and it works great.
Thanks!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How i have to change the code for deleting values from TestStep Properties?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
to remove propety value from teststep properties.
testRunner.testCase.getTestStepByName("Properties").properties.each {
testRunner.testCase.getTestStepByName("Properties").properties[it.key].value = ""
}
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do we clear just one property from project.
I don't want to remove the property.
I see how to clear all properties but how to clear just one property by its name?
using groovy.
