I have created some list of properties under the TestCase. For example look at the following screenshot.
Manual solution: use "Save Properties" and "Load Properties" from SoapUI
customprop.txt
Then the existing properties will be cleared out and replaced with your customprop.txt
Finally I got the answers for removing Project, Testsuite and Testcase custom properties. Here are the scripts.
testRunner.testCase.testSuite.project.removeProperty( "Project_Level_Property" );
testRunner.testCase.testSuite.removeProperty( "Testsuite_Property" );
testRunner.testCase.removeProperty( "Testcase_Property" );
If any other way is there, please let me know friends.
you can also use the following:
data = context.testCase.getTestStepByName("Test Case Name");
String[] propToRemove = new String[data.getPropertyCount()];
propToRemove = data.getPropertyNames();
for ( int i = 0 ; i < propToRemove.size(); i++ ){
data.removeProperty( propToRemove[i] );
}
Hope this helps. Now you can remove more than one prop.
Just for completeness:
Another quick but dirty and dangerous way is to modify the soapui-project.xml
and remove the property nodes with a text editor.
Be aware that you can break your whole project if you do something wrong!
You should create a copy of your soapui-project.xml
and do the following steps:
deleteMe
deleteMe
in your soapui-project.xml
<con:property><con:name>name</con:name><con:value>deleteMe</con:value></con:property>