Jmeter string functions through user defined variable

367 Views Asked by At

I am putting some jmeter string functions in a user defined variable like below:

testdata = ${__char(165)}${__char(165)}My${__unescape(\r\n)}Deepak${__unescape(\r\n)}Play${__changeCase(Deepak\, change case,UPPER,)}

But when I am passing this value in request Body Data as ${testdata}, jmeter string functions are not resolving and I see below request in view result tree listener Request Body tab:

${__char(165)}${__char(165)}My${__unescape(\r\n)}Deepak${__unescape(\r\n)}Kumar${__changeCase(Deepak\, change case,UPPER,)}

However, when I pass above same data directly in request Body Data instead of ${testdata}, it works perfectly fine with all string functions resolving in view result tree listener request body data.

I am using Jmeter 5.3 on Windows 10 with OpenJDK 14.0.1. One of my colleagues is not facing the same issue.

1

There are 1 best solutions below

1
On BEST ANSWER

I cannot reproduce your issue using latest stable JMeter 5.3:

enter image description here

In the vast majority of cases if JMeter doesn't do what it is supposed to be doing you can figure out the reason from jmeter.log file so it worth checking it for any suspicious entries