Forum Discussion

alfonsolft's avatar
alfonsolft
Occasional Contributor
7 years ago
Solved

Input parameters to call Rest Services

I have a REST service with an input parameter "uid "with initial zero value.

The call to the following REST services has as input parameter uid +1 and so on.

How should it be implemented? Thank you very much

  • alfonsolft's avatar
    alfonsolft
    7 years ago

    Paul is ok.

     

    I change this line


    def NewID = UID +1

     

    Thank you very much!!!

6 Replies

      • nmrao's avatar
        nmrao
        Champion Level 3

        alfonsolft,

         

         

        Here is how (sudo steps below)this can achieved. Use groovy script test step.

        You can use test case properties to hold the current value of uid.

        In the next cycle, get the value, parse it to integer and increment it. And save this updated value to test case properties again as String. Use this value in the following steps as property expansion.