Forum Discussion

Raju_Vusirikala's avatar
Raju_Vusirikala
Contributor
16 years ago

Remove Properties of TestCase from Groovy.

Hi

I can able to clear the property values of the Test Case by following code snippet

Map testCasePropertiesMap = testRunner.getTestCase().getProperties();
Set testCasePropertiesKeySet = testCasePropertiesMap.keySet();
Iterator iter = testCasePropertiesKeySet.iterator();
while(iter.hasNext()){
String testCasePropertyKey = (String)iter.next();

TestProperty testProperty = (TestProperty)testCasePropertiesMap.get(testCasePropertyKey);
testProperty.setValue("");

}

But I couldn't able to figure out the process for deleting, how can we delete properties of Test Case.

Could you help me by providing code snippets for removing the property at TestCase Level.

Thanks
Raju.

6 Replies