gharel
gharel

Reputation: 573

JMeter CSV datasource tilde character becomes null

I am reading variables from a CSV datasource. My typical line is:

1234567890;~

Problem is the tilde is making the second variable null in JMeter. If I replace with this it works:

1234567890;123

I Need the tiled to work because its part of our MVC URL design. Is there an escape or something?

Thanks

enter image description here

Upvotes: 0

Views: 404

Answers (2)

Dmitri T
Dmitri T

Reputation: 168082

I see some French in your JMeter GUI so it might be something connected with file encoding, the universal one is UTF-8

  1. To verify the encoding:

    • Add Debug Sampler to your Test Plan and configure it to display System Properties

      Debug Sampler System Properties

    • Add View Results Tree listener and look for file.encoding property value

      file.encoding property

  2. To set the encoding use one of the following approaches

    • add the next line to system.properties file (located in JMeter's "bin" folder)

      file.encoding=UTF-8
      
    • you can also do the same via -D command-line argument (see Apache JMeter Properties Customization Guide for details)

      jmeter -Dfile.encoding=UTF-8 -n -t ....
      

If above steps don't help it might be a problem with your CSV file (some invisible control character, missing line break, etc)

Upvotes: 0

Naveen Kumar R B
Naveen Kumar R B

Reputation: 6398

For the following data it worked for me:

1234567890;~
1234567890;123

view results tree:

enter image description here

CSV Config: enter image description here

Usage in HTTP sampler: enter image description here

Upvotes: 0

Related Questions