Hi,
i'm interested to see your solution for cleaning dynamic and static properties.
the link seems not to refer to your solution or i made a mistake.
Can you send again the link please.
nmrao's solution looks good too.
i want to try both solutions.
For now i just have a regular groovy script with a list of properties to clean
Thank you
Awesome stuff, thank you @nmrao . A lot of people will benefit from this.
Hi,
i found nmrao's solution fine.
Arthur's solution is nice too.
For now i prefer to use this simple solution in 'setup script' for example to clear testcase properties:
context.testCase.properties.each { context.testCase.properties[it.key].value = '' }
But Arthur's solution looks nice because we can delete all properties ending with a certain suffix.
I need to work on these two solutions to avoid the repetition of my two lines in each testcase for example.
But when we execute several times the same test, we overwrite properties right?
It's not clearing but changes the same properties each time we execute.
Thank you
please give my kudo to Arthur.
thank you
int proptyCounts = testRunner.testCase.propertyCount
String [] tcexe_ToRemove = new String[proptyCounts]
for(int i=0;i<proptyCounts;i++)
{
propertyName = testRunner.testCase.propertyNames[i]
tcexe_ToRemove [i]=propertyName.toString().trim()
}
for(int j=0;j<tcexe_ToRemove.size();j++)
{
testRunner.getTestCase().removeProperty(tcexe_ToRemove[j] );
}
Thanks a lot