Search code examples
replacejmeterbeanshell

Replace ";" to "&" during recording in jmeter


I point main informations:

  1. I record with HTTP Proxy server with Recording Controller
  2. In url address I get for example: https://server/stuff?Action=oneAction;Subaction=secondAction
  3. This site give me an error
  4. All I have to change in adress is replace ";" with "&"
  5. Site https://server/stuff?Action=oneAction&Subaction=secondAction works great

Is it possible to have a function, that will automatically replace ";" with "&"? I can't record without it I found something like: https://wiki.apache.org/jmeter/EscapedURLs but, it doesn't work automatically when I record it.

Is it possible to avoid a semicolon?

EDIT: I found where the problem is: with the proxy - it gets semicolon and changes it to HEX %3b in the url, but the server doesn't recognise https://server/stuff?Action=oneAction%3bSubaction=secondActionand makes error. So I think the problem is with encoding of proxy


Solution

  • JMeter .jmx files are basically XML so you can do it after the recording via your favourite text editor. In the meantime there are some alternative ways of recording a JMeter test:

    1. Fiddler proxy can export recorded traffic in form of JMeter .jmx file
    2. JMeter Chrome extension allows recording a JMeter test right from Chrome browser without having to set up any proxies