EmanueleAmbretti
EmanueleAmbretti

Reputation: 1

jMeter - How to escape quotes?

I need help to escape quotes in jMeter! I've to put into a var some words with quotes, for example "dummy", so I've tried with:

vars.put("example", '"dummy"')
vars.put("example", "\"dummy\"")
vars.put("example", "&quotdummy&quot")

in order to create a variable called example with a value "dummy", but nothing of those attempts are working. Can anyone helps me? Thanks!

Upvotes: 0

Views: 76

Answers (1)

Ivan G
Ivan G

Reputation: 2847

Your first 2 options are fine, you can see it yourself if you use different variable names and add a Debug Sampler and View Results Tree listener after your JSR223 Test Element:

enter image description here

More information: Groovy - Strings

Upvotes: 0

Related Questions