Forum Discussion

Jaroslaw's avatar
Jaroslaw
Contributor
13 years ago

Set property to a empty value using Property Transfer

Is it not possible to set a property to an empty or static value using the Property Transfer Step?

All I want is to set a property to empty without having to write a groovy script.
  • Hi!

    Well, it depends on what kind of property you are referring to. I assume you mean a project property for instance.

    If you want to do it manually, you could of course change the value in the Custom Properties tab in the bottom left corner. Else I belive you have to use a Groovy Script somehere, either in an event handler or in an explicit Groovy Script TestStep.

    The syntax for setting a property is fairly trivial though:
    testRunner.testCase.testSuite.project.setPropertyValue( "MyProp", someValue )
    This code could be put into a Groovy Test Step after the property has been defined.
    Reference: http://www.soapui.org/Scripting-Propert ... properties

    Regards

    SmartBear Support