Skip to content
Advertisement

How to parse ISO-8859-1 encoded Form Data in Parameters in Jmeter?

I am using Jmeter for recording my Application. I used Recording Controller template in Jmeter. When I tried to execute my script, I am getting an error message as Response code:400 & Response message:Bad Request. Could someone please help me how to read ‘Form Data’ in Request body?

I have tried

  1. ‘Content-Type: as application/x-www-form-urlencoded’ but did not work.

Below are screenshots of my application

enter image description here

enter image description here

Advertisement

Answer

Your images quality is too bad therefore we cannot comment on “how to read” the data. If you want us to analyze your request payload you should add it as text in addition to the image.

Your Content-Type header will be ignored as you have Use multipart/form-data for HTTP POST so you’re sending multipart/form-data Content-Type

If you recorded your request and it fails on replay most probably it happens due to one of the following reasons:

  1. The request operation cannot be repeated due to test data has been used already, i.e. if the request creates a folder with name “test” first execution will succeed and second and subsequent will fail because the folder already exists. In this case you might want to parameterize your request and use random/unique data

  2. Missing or improperly working correlation, the most obvious option to proceed is:

    • Use a 3rd-party sniffer tool to capture the request from JMeter and from the real browser
    • Compare the requests – they must be absolutely the same (apart from dynamic values which need to be correlated)
    • Once JMeter will send the same request as

    if the request body is encoded and cannot be read most probably the encoding is done using client-side JavaScript, you need to locate this function, determine what it does and come up with the decryption code somewhere in JSR223 Test Elements enter link description here

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement