Raju_Vusirikala
16 years agoContributor
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.
I can able to clear the property values of the Test Case by following code snippet
Map
Set
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.