Forum Discussion

hamo60's avatar
14 years ago

Incrementing a property in a property transfer

Hi All,
I'm new to SoapUI, so please forgive me this is in the forum somewhere. I just haven't been able to find it...

I have a property set in a Test Case which I would like to increment every execution via a Property Transfer. It's being used to test the creation of an account and the property will be appended to the account name to generate a unique account name.

At the moment, I have the below setup.

Test Case - SeqNum
Step
Properties (SEQ = 1)
PropertyTransfer
SOURCE(TestCase-SeqNum)
${=${Properties#SEQ}+1}
TARGET(Properties, SEQ)


Any help would be greatly appreciated.

hamo.

2 Replies

  • ramato's avatar
    ramato
    New Contributor
    I am also interested in this answer and posting to get notification of any replies.
  • ramato's avatar
    ramato
    New Contributor
    not sure if this is the best way but I got it to work.

    I incremented the property in a groovy script step then transfered the result into it into the property

    groovy script
    Integer.parseInt(context.expand( '${#Project#projIndex}' ) ) + 1


    Then Transfer Property
    Source groovy script result
    Target project property projIndex