httppostjmeterhttp-postblazemeter

JMeter - Parameterized request saved by BlazeMeter not behaving like request with POST body generated by cURL


Using Blazemeter's Chrome plugin, I saved a POST request to JMeter.

The request was saved as a parameterized POST request:

POST https://qa2s.xxxx.com/dcs/public/facade.aspx

POST data:
show_unclosed=1&search_transaction_id=&with_cashless_external=0&user_preset_id=3&
responseType=json&num_of_rows=200&with_cash=0&rs%3AClearSession=true&
action=Dynamic_Transactions_Monitor&model=operations%2FdynamicTransactionsMonitorMega&
is_Legend=1&actor_id=2001186292&show_sales=1&time_period=47

When I ran this request, I got a 200 response, but the response content was not correct, based on browser debugging. The response should be a JSON collection of entities.

However, when I saved this request as a cURL command and imported it into JMeter, it came in as a parameterized URL, and its response was as expected.

https://qa2s.xxxx.com/dcs/public/facade.aspx?responseType=json&
model=operations/dynamicTransactionsMonitorMega&
action=Dynamic_Transactions_Monitor&&num_of_rows=200&show_unclosed=1&
show_sales=1&with_cash=0&with_cashless_external=0&is_Legend=1&
rs:ClearSession=true&time_period=41&search_transaction_id=&user_preset_id=3

Why is this?

I want the former request to give a response like the latter one.

It is easier to read in JMeter. It really shouldn't be necessary to convert the POST-body requests to parameterized URLs.

Some additional information

The only way I could get the first request to return a JSON object was to append the model and action parameters to the URL, leaving everything else as parameters in the body.

It seems that the original URL just takes you to the Report page; you need to specify the model and action in the URL in order to actually retrieve the report data.

So I think it's a problem with the plugin (as @Dmitri T suggests may be the case).

Is what I am saying correct?


Solution

  • My expectation is that you're getting different responses because you're sending different requests.

    For example:

    I believe given you send the same requests you should get the same responses, so cross-check the request which is being sent from the browser with the one generated by JMeter, the requests must be absolutely identical (apart from dynamic parameters which need to be correlated), better using an external sniffer tool like Wireshark or Fiddler. Given you amend JMeter configuration so the requests would be the same you will get the same response.

    If you think that BlazeMeter Chrome Extension generates incorrect request definition it makes sense to inform BlazeMeter Support about it.