jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toni Menendez Lopez <tonime...@gmail.com>
Subject Re: Executing request with JSON
Date Wed, 13 Apr 2011 09:04:58 GMT
Deepack,

My json rquest is so easy, I have to send this reques for example,

POST /Mytest/beta?

Accept: application/json
user-agent: automationDM
x-odp-version: 1.0
x-locale: en
Content-Length: 322
Content-Type: application/json;charset=utf-8
Content-Encoding: gzip
Host: 1.1.1.1
Connection: Keep-Alive
Expect: 100-Continue
Accept-Encoding: gzip

{
   "id": 1,
   "jsonrpc": "2.0",
   "method": "startSession",
   "params": {
      "deviceId": {
         "iccid": "12345678",
         "value": "12332111"
      },
      "hash": "JtcJvlRe13rNSAfzTynp9Ibve3Q=",
      "subscriberId": {
         "type": "mobile",
         "value": "666777888"
      }
   }
}

And of course values inside the json, can be variables ?

Waht do you think is the best solution ?

Toni.

2011/4/11 Deepak Shetty <shettyd@gmail.com>

> Depends on how it is being passed - If you passing it as the value of a
> parameter , then its just a string , no different from anything else.
>
>  if you are just posting the value , then you have to ensure that in JMeter
> you dont give a name (in send parameters with request), just the value (its
> still a string , no different from any other).
> JSON as response is also a string , no different from any other response.
> perhaps if you tell us what problem you are facing , it might help.
>
> regards
> deepak
>
>
> On Mon, Apr 11, 2011 at 7:45 AM, Toni Menendez Lopez <tonimenen@gmail.com>wrote:
>
>> Hello everybody,
>>
>> As anyone of you created any scenarios with JSON in the requests ? I need
>> to
>> create one, and no idea how to do it !
>>
>> Toni.
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message