Forum Discussion

Razis's avatar
Razis
Occasional Contributor
12 years ago

Property Transfer TestStep and add value transfer from gs

Can I access "Property Transfer" test step and add there new Property Transfer / value transfer from groovy script?
  • Razis's avatar
    Razis
    Occasional Contributor
    Thank you for you reply. Unfortunately first link does not help a lot cause there is no info about setting Property Transfer step. Second link covers totally different topic.
  • Razis's avatar
    Razis
    Occasional Contributor
    OK, I found it on http://www.soapui.org/apidocs/com/eviwa ... nsfer.html

    def transfer = testRunner.testCase.addTestStep('transfer',  'My Transfer between flows')
    def valueTransfer = transfer.addTransfer('valueTransferName')

    valueTransfer.setSourceStepName(otherTestStep.getName())
    valueTransfer.setSourcePropertyName('Response')
    valueTransfer.setSourcePath('/sourcepath/something')
    valueTransfer.setTargetPath('/destination/@ID')
    valueTransfer.setTargetPropertyName('Request')
    valueTransfer.setTransferToAll(true)


    Thanks a lot to everyone! :-)
  • nmrao's avatar
    nmrao
    Champion Level 3
    Glad to know you got it working and sharing the solution.