I want to increment the number by 1 for each request - WebAPI 2.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

I want to increment the number by 1 for each request - WebAPI 2.0

Mihir
I'm testing WebAPI 2.0 service which has path parameter.
/webapi2/attach/MjIwLjIyNS44OC4xNjV8U1FMVFJBQ0tTRVJWRVJ8MnxSRURDUk9TU1RFU1R8Q1JNfEFETUlOfDE3NzAyODgxMzg=/TICKET/*107379*/Lauren%20Thompson


I want to increment the number by 1 for each request. How to achieve this in
Jmeter? Till now i had been passing a fixed path param, therefor our test
result were on only one input parameter.


Please suggest and Let me know if any valuable solution





--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: I want to increment the number by 1 for each request - WebAPI 2.0

Ivan Rancati-3
You could try a counter

https://jmeter.apache.org/usermanual/component_reference.html#Counter

best regards,
Ivan

On Thu, May 17, 2018 at 10:18 AM, Mihir <[hidden email]> wrote:

> I'm testing WebAPI 2.0 service which has path parameter.
> /webapi2/attach/MjIwLjIyNS44OC4xNjV8U1FMVFJBQ0
> tTRVJWRVJ8MnxSRURDUk9TU1RFU1R8Q1JNfEFETUlOfDE3NzAyODgxMzg=/
> TICKET/*107379*/Lauren%20Thompson
>
>
> I want to increment the number by 1 for each request. How to achieve this
> in
> Jmeter? Till now i had been passing a fixed path param, therefor our test
> result were on only one input parameter.
>
>
> Please suggest and Let me know if any valuable solution
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: I want to increment the number by 1 for each request - WebAPI 2.0

sbos-61
Il 17/05/2018 18:29, Sergio Boso ha scritto:

> or, you could try a simple JSR223 preprocessor in any supported script (example in javascript):
>
>     counterString= vars.get('counter');
>
>     counter= parseInt( counterString);
>
>     vars.put( 'counter',  counter+1);
>
>
> regards
>
>
>
> Il 17/05/2018 18:10, Ivan Rancati ha scritto:
>> You could try a counter
>>
>> https://jmeter.apache.org/usermanual/component_reference.html#Counter
>>
>> best regards,
>> Ivan
>>
>> On Thu, May 17, 2018 at 10:18 AM, Mihir<[hidden email]>  wrote:
>>
>>> I'm testing WebAPI 2.0 service which has path parameter.
>>> /webapi2/attach/MjIwLjIyNS44OC4xNjV8U1FMVFJBQ0
>>> tTRVJWRVJ8MnxSRURDUk9TU1RFU1R8Q1JNfEFETUlOfDE3NzAyODgxMzg=/
>>> TICKET/*107379*/Lauren%20Thompson
>>>
>>>
>>> I want to increment the number by 1 for each request. How to achieve this
>>> in
>>> Jmeter? Till now i had been passing a fixed path param, therefor our test
>>> result were on only one input parameter.
>>>
>>>
>>> Please suggest and Let me know if any valuable solution
>>>
>>>
>>>
>
>

--

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

pmd
Reply | Threaded
Open this post in threaded view
|

Re: I want to increment the number by 1 for each request - WebAPI 2.0

pmd
Hello,
No javascript please , it kills perf.
Use groovy which is default

Regards

On Thursday, May 17, 2018, Sergio Boso <[hidden email]> wrote:

> Il 17/05/2018 18:29, Sergio Boso ha scritto:
>
>> or, you could try a simple JSR223 preprocessor in any supported script
>> (example in javascript):
>>
>>     counterString= vars.get('counter');
>>
>>     counter= parseInt( counterString);
>>
>>     vars.put( 'counter',  counter+1);
>>
>>
>> regards
>>
>>
>>
>> Il 17/05/2018 18:10, Ivan Rancati ha scritto:
>>
>>> You could try a counter
>>>
>>> https://jmeter.apache.org/usermanual/component_reference.html#Counter
>>>
>>> best regards,
>>> Ivan
>>>
>>> On Thu, May 17, 2018 at 10:18 AM, Mihir<[hidden email]>  wrote:
>>>
>>> I'm testing WebAPI 2.0 service which has path parameter.
>>>> /webapi2/attach/MjIwLjIyNS44OC4xNjV8U1FMVFJBQ0
>>>> tTRVJWRVJ8MnxSRURDUk9TU1RFU1R8Q1JNfEFETUlOfDE3NzAyODgxMzg=/
>>>> TICKET/*107379*/Lauren%20Thompson
>>>>
>>>>
>>>> I want to increment the number by 1 for each request. How to achieve
>>>> this
>>>> in
>>>> Jmeter? Till now i had been passing a fixed path param, therefor our
>>>> test
>>>> result were on only one input parameter.
>>>>
>>>>
>>>> Please suggest and Let me know if any valuable solution
>>>>
>>>>
>>>>
>>>>
>>
>>
> --
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Cordialement.
Philippe Mouawad.