Forum Discussion

rlong98's avatar
rlong98
Contributor
10 years ago

Can you transfer a result value from within a Script Assertion?

I tried every path possible and can't seem to send a result value from within a Scdript Assertion.  Is this possible?   Reason I'm doing this is my Script Assertion is performing a division equatio...
  • rlong98's avatar
    rlong98
    10 years ago

    No - what I was trying to do was after asserting an equation was correct - I wanted to pass the result of the script equation to a property to use later.  I didn't want to rely on transfer, or create another step to for transfer.

     

    So the funny thing was on SoapUI's site they had the solution:

     

    messageExchange.modelItem.testStep.testCase.testSuite.setPropertyValue( "propertyName" , result )

     

    Why It wasn't working for me - (as I shamefully admit) was I was testing this out in a Groovy testStep... (i know duh)...

    When putting it in the script assertion it worked like a charm.

     

    Thank you - I hope to adopt you as a Groovy Friend