dsidler
dsidler

Reputation: 499

How do I escape commas with Jmeter reading from a CSV data set?

I am testing a chat bot with inputs, and one of the rows reads, for example

entityInput, Just in case, where is the nearest doctor's office

The input is sending only "Just in case". I have tried Just in case\, where is the nearest doctor's office

Upvotes: 0

Views: 2361

Answers (2)

MarkLockettAU
MarkLockettAU

Reputation: 25

In JMeter there is an extra change needed.

You should have a CSV Data Set Set Config in you test plan. In which case you should look for a setting called "Allow quoted data?" and change it to true.

Then

entityInput, "Just in case, where is the nearest doctor's office"

will work.

From https://stackoverflow.com/a/40273206

Upvotes: 2

Antoniossss
Antoniossss

Reputation: 32537

Did you read the CSV specification (RFC 4180) or the Wikipedia page? It says exactly that you don't escape , but rather wrap whole text into "" so

entityInput, "Just in case, where is the nearest doctor's office"

should work as long as implementation is compliant.

Upvotes: 2

Related Questions