Reputation: 11
I am facing an issue while recording with Jmeter using HTTP(s) Test Script Recorder. On this single page form, I click find/click scope icon to open a list of fields for selection. Once the selection frame is open, I can select a value or close it with or without selection. The issue is that when I start the recorder and open this single-page form for the first selection, the frame opens just fine no matter what selection field I choose on the form. During the same recording session, When I open the same or another field for selection I get a 404 from the server and the items in the frame do not display for selection. In case, I stop the recording and start again, I can open one frame with items for selection, second time again the same issue is observed. I have tried redirect options on the recorder, Java, and HTTPclient4 but the issue is not resolved.
When I look at the recorded requests for the first selection (successful selection) I see the following requests.
First-time same frame - Get request
First-time same frame - Get request
First-time same frame - POST Request
When I see the second request which failed with 404, I see the second time, URL encoding was selected on the get request and based on that second request have URL encoding like %2F characters. Also, the post request now has most of the parameters in the URL rather than as parameters.
Second-time same frame - First Get Request
Second-time same frame - Second Get Request
Second-time same frame - POST Request
If you observe the url here
/xxxx/html/en/default/common/%2Fxxx-xxx%2Fhtml%2Fen%2Fdefault%2FreportTemplate%2FviewPageReport.jsp%3FpropertyId%3D208133&projectId=1&reportTemplId=151523&associatedId=206434273&selectType=single&smartField=1&manager=1&parentSOSubCategoryId=1&olv=1&tempSpecId=754388166098775919&bookmarkable=false
/default/common/%2Fxxx-xxx%2Fhtml
on conversion becomes /default/common//xxx-xxx/html
so here we add an additional backslash as well. So this request is different that first frame POST request on the same recording and it creates a URL encoded request with an additional / thus causing a 404.
I am using Jmeter 5.1.1 and have tried older Jmeter versions as well but observe the same issue. I do not see the same issue with Loadrunner, Silk performer, fiddler or any other tool. I want to be able to record the second frame just like it records the first frame so that I do not do URL encoding for the following frames on a single form.
Upvotes: 1
Views: 179
Reputation: 168147
In case of GET request all the parameters are being added to the URL, and according to the RFC 1738 not all characters can be used in the URL, you can use only alphanumeric and $-_.+!*'(),
others need to be URL-encoded
If you do believe that JMeter builds the URL incorrectly you can raise an issue in JMeter Bugzilla, however be ready to provide a reproducible test script (it would be better for questions asked here as well).
In the meantime you can consider alternative ways of recording a JMeter test like JMeter Chrome Extension
Upvotes: 1