You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Quazi Nasir Ahmed <qu...@gmail.com> on 2010/06/09 01:24:56 UTC

Using double-quoted string to a variable

I am trying to get CSVDataSetConfig to read a file and store each line to a
variable. It works fine when the file doesn't have any quotes in the text.
It works with single quotes as well. But when I have double quotes in the
text, I get the following exception in JMeter log. Is there a work around
for this? Thanks for your help.

2010/06/08 18:59:41 INFO  - jmeter.services.FileServer: Stored: msgs.txt
2010/06/08 18:59:41 ERROR - jmeter.config.CSVDataSet: java.io.IOException:
Cannot have quote-char in plain field:[<?xml version
="]

Re: Using double-quoted string to a variable

Posted by Deepak Shetty <sh...@gmail.com>.
FYI
This setting is in case your data in the CSV file itself has a comma so If
you have a CSV file like
value 1, value 2 which has a , in the sentence

then JMeter would parse this as 3 values , to avoid this you would have your
CSV as
value 1,"value 2 which has a , in the sentence " and set the Allow Quoted
Data as True in which case Jmeter would use the Quotes to delimit the data
along with commas

On Wed, Jun 9, 2010 at 4:18 AM, Quazi Nasir Ahmed <qu...@gmail.com>wrote:

> Thanks Deepak. That was my problem. I had the flag set to true thinking it
> would allow quoted strings to go through, but it was working the other way
> around.
> Quazi
>
> On Tue, Jun 8, 2010 at 10:42 PM, Deepak Shetty <sh...@gmail.com> wrote:
>
> > What have you set for allow quoted data? I tested with AllowQuotedData as
> > false and it works just fine
> >
> > regards
> > deepak
> >
> > On Tue, Jun 8, 2010 at 4:24 PM, Quazi Nasir Ahmed <quazinahmed@gmail.com
> > >wrote:
> >
> > > I am trying to get CSVDataSetConfig to read a file and store each line
> to
> > a
> > > variable. It works fine when the file doesn't have any quotes in the
> > text.
> > > It works with single quotes as well. But when I have double quotes in
> the
> > > text, I get the following exception in JMeter log. Is there a work
> around
> > > for this? Thanks for your help.
> > >
> > > 2010/06/08 18:59:41 INFO  - jmeter.services.FileServer: Stored:
> msgs.txt
> > > 2010/06/08 18:59:41 ERROR - jmeter.config.CSVDataSet:
> > java.io.IOException:
> > > Cannot have quote-char in plain field:[<?xml version
> > > ="]
> > >
> >
>

Re: Using double-quoted string to a variable

Posted by Quazi Nasir Ahmed <qu...@gmail.com>.
Thanks Deepak. That was my problem. I had the flag set to true thinking it
would allow quoted strings to go through, but it was working the other way
around.
Quazi

On Tue, Jun 8, 2010 at 10:42 PM, Deepak Shetty <sh...@gmail.com> wrote:

> What have you set for allow quoted data? I tested with AllowQuotedData as
> false and it works just fine
>
> regards
> deepak
>
> On Tue, Jun 8, 2010 at 4:24 PM, Quazi Nasir Ahmed <quazinahmed@gmail.com
> >wrote:
>
> > I am trying to get CSVDataSetConfig to read a file and store each line to
> a
> > variable. It works fine when the file doesn't have any quotes in the
> text.
> > It works with single quotes as well. But when I have double quotes in the
> > text, I get the following exception in JMeter log. Is there a work around
> > for this? Thanks for your help.
> >
> > 2010/06/08 18:59:41 INFO  - jmeter.services.FileServer: Stored: msgs.txt
> > 2010/06/08 18:59:41 ERROR - jmeter.config.CSVDataSet:
> java.io.IOException:
> > Cannot have quote-char in plain field:[<?xml version
> > ="]
> >
>

Re: Using double-quoted string to a variable

Posted by Deepak Shetty <sh...@gmail.com>.
What have you set for allow quoted data? I tested with AllowQuotedData as
false and it works just fine

regards
deepak

On Tue, Jun 8, 2010 at 4:24 PM, Quazi Nasir Ahmed <qu...@gmail.com>wrote:

> I am trying to get CSVDataSetConfig to read a file and store each line to a
> variable. It works fine when the file doesn't have any quotes in the text.
> It works with single quotes as well. But when I have double quotes in the
> text, I get the following exception in JMeter log. Is there a work around
> for this? Thanks for your help.
>
> 2010/06/08 18:59:41 INFO  - jmeter.services.FileServer: Stored: msgs.txt
> 2010/06/08 18:59:41 ERROR - jmeter.config.CSVDataSet: java.io.IOException:
> Cannot have quote-char in plain field:[<?xml version
> ="]
>