0

Running some tests successfully in jmeter and am now parameterising them and have come across the following problem.

I am using a csv file which contains a number of variables I am using in the tests. Within my test I have defined the CSV variables in the following format:

Title,ResponseCode,CheckForTest,ExpectedData

This works fine when that is defined in the CSV config processor.

However, when I try to put that into a properties file in the form:

TESTVARS=Title,ResponseCode,CheckForTest,ExpectedData

I get this error:

Could not split CSV header line jav.io.IOException: Missing trailing quote-char in quoted field:["]

Any idea what this means, and how I fix it?

Not that I am using v2.13 of jmeter and cannot use an upgraded version at the moment so I need a solution for v2.13

Many thanks

6
  • If you are defining properties (jmeter.properties or user.properties), you must use key=value. which one did you update? Please share the screenshot of the properties file highlighting the entries. Note: You MUST restart JMeter if you update the properties. Commented Feb 28, 2017 at 15:38
  • I'm amending a local properties file. Can't provide a screenshot as it is on a separate system. I am getting similarly bad behaviour when I try and change Port Number and Path with my http request. Commented Feb 28, 2017 at 15:58
  • Is there a limit on the field length for any of the parameters? My list of csv variables is quite long. Commented Feb 28, 2017 at 16:00
  • I'm not aware of any limitations on field length. May I know properties file name? As I said, you must define properties using 'key=value' syntax. Commented Feb 28, 2017 at 16:11
  • Properties file is called 'Address_jmeter.properties' and is in the same directory as my jmx file. I've been trying to get the Port number into a http request from it, using variable PORTNUM=12345 and this is erroring. I'm using ${PORTNUM} within the http request. As far as I understand it, that is the correct format. Commented Feb 28, 2017 at 16:28

2 Answers 2

1

When looking at JMeter source code:

    String i$ = server.reserveFile(threadVars, this.getFileEncoding(), this.alias, true);
    try {
      this.vars = CSVSaveService.csvSplitString(i$, delim.charAt(0));
      this.firstLineIsNames = true;
    } catch (IOException var11) {
      throw new IllegalArgumentException("Could not split CSV header line from file:" + threadVars, var11);
    }

Apparently, it cannot read the header of your CSV file, and split it to variable names.

Sign up to request clarification or add additional context in comments.

2 Comments

That's what I thought too. The problem I had was that when I added a header line the tests failed badly, but this seems to have resolved itself now and the header is working fine. Thanks for your help.
Be kind to mark the answer as correct if it solved your issue. :)
1

Properties are different beasts, you need to remember few things:

  1. JMeter needs to be restarted to pick the properties up
  2. You need to use __P() or __property() function in order to access property values so if you used ${TESTVARS} somewhere in your script you need to convert it to ${__property(TESTVARS)}
  3. Always look into jmeter.log file - it's the primary source of the troubleshooting information

If above hints don't help - kindly update your question with your properties file (first few lines), the command line, you're using to run JMeter and how you are trying to access the property value.

References:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.