Additional double quotes after csvread?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Additional double quotes after csvread?

stevens_sander

Hi all,
 
I have a problem with my data driven test. My testdata is in an external csv file. I got one cell with the content tag="to be or not to be". Notice the double quotes around the string! Now I do a csvread and fill a variable with the content of that specific cell. In this process, additional quotes are added to my string. It looks like this: query="tag=""to be or not to be""". So around tag= are additional quotes and around the string are additional quotes. Why? I can't post this request looking like this.
 
Hope somebody has seen this before and got a solution for me.
 
Thanks!
Sander
_________________________________________________________________
Nieuw: nu ook chatten op je mobiel!
http://www.overaljevriendenbijje.nl/#superdeal
Reply | Threaded
Open this post in threaded view
|

Re: Additional double quotes after csvread?

Noel O'Brien
Have you tried it with single quotes?

tag='to be or not to be'

On Friday 06 February 2009 11:46:12 [hidden email] wrote:

> Hi all,
>
> I have a problem with my data driven test. My testdata is in an external
> csv file. I got one cell with the content tag="to be or not to be". Notice
> the double quotes around the string! Now I do a csvread and fill a variable
> with the content of that specific cell. In this process, additional quotes
> are added to my string. It looks like this: query="tag=""to be or not to
> be""". So around tag= are additional quotes and around the string are
> additional quotes. Why? I can't post this request looking like this.
>
> Hope somebody has seen this before and got a solution for me.
>
> Thanks!
> Sander
> _________________________________________________________________
> Nieuw: nu ook chatten op je mobiel!
> http://www.overaljevriendenbijje.nl/#superdeal



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Additional double quotes after csvread?

stevens_sander

Hi, thanks fro the prompt reply.
Yes, tried that. That works fine (the parsing part at least), but I need the double quotes in my post request. My http request with single quotes doesn't work.
> From: [hidden email]> To: [hidden email]> Subject: Re: Additional double quotes after csvread?> Date: Fri, 6 Feb 2009 11:50:08 +0000> CC: [hidden email]> > Have you tried it with single quotes?> > tag='to be or not to be'> > On Friday 06 February 2009 11:46:12 [hidden email] wrote:> > Hi all,> >> > I have a problem with my data driven test. My testdata is in an external> > csv file. I got one cell with the content tag="to be or not to be". Notice> > the double quotes around the string! Now I do a csvread and fill a variable> > with the content of that specific cell. In this process, additional quotes> > are added to my string. It looks like this: query="tag=""to be or not to> > be""". So around tag= are additional quotes and around the string are> > additional quotes. Why? I can't post this request looking like this.> >> > Hope somebody has seen this before and got a solution for me.> >> > Thanks!> > Sander> > _________________________________________________________________> > Nieuw: nu ook chatten op je mobiel!> > http://www.overaljevriendenbijje.nl/#superdeal> > > > ---------------------------------------------------------------------> To unsubscribe, e-mail: [hidden email]> For additional commands, e-mail: [hidden email]>
_________________________________________________________________
Nieuw: nu ook chatten op je mobiel!
http://www.overaljevriendenbijje.nl/#superdeal
Reply | Threaded
Open this post in threaded view
|

Re: Additional double quotes after csvread?

Noel O'Brien
One way to do it would be to have a beanshell pre-processor to substitute the
single quotes for double quotes.

Regards,
Noel

On Friday 06 February 2009 12:04:42 [hidden email] wrote:

> Hi, thanks fro the prompt reply.
> Yes, tried that. That works fine (the parsing part at least), but I need
> the double quotes in my post request. My http request with single quotes
> doesn't work.
>
> > From: [hidden email]> To: [hidden email]> Subject:
> > Re: Additional double quotes after csvread?> Date: Fri, 6 Feb 2009
> > 11:50:08 +0000> CC: [hidden email]> > Have you tried it with
> > single quotes?> > tag='to be or not to be'> > On Friday 06 February 2009
> > 11:46:12 [hidden email] wrote:> > Hi all,> >> > I have a
> > problem with my data driven test. My testdata is in an external> > csv
> > file. I got one cell with the content tag="to be or not to be". Notice> >
> > the double quotes around the string! Now I do a csvread and fill a
> > variable> > with the content of that specific cell. In this process,
> > additional quotes> > are added to my string. It looks like this:
> > query="tag=""to be or not to> > be""". So around tag= are additional
> > quotes and around the string are> > additional quotes. Why? I can't post
> > this request looking like this.> >> > Hope somebody has seen this before
> > and got a solution for me.> >> > Thanks!> > Sander> >
> > _________________________________________________________________> >
> > Nieuw: nu ook chatten op je mobiel!> >
> > http://www.overaljevriendenbijje.nl/#superdeal> > > >
> > ---------------------------------------------------------------------> To
> > unsubscribe, e-mail: [hidden email]> For
> > additional commands, e-mail: [hidden email]>
>
> _________________________________________________________________
> Nieuw: nu ook chatten op je mobiel!
> http://www.overaljevriendenbijje.nl/#superdeal



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Additional double quotes after csvread?

stevens_sander

hmmm, looked at the beanshell pre-processor, but I am not that technical.
can't figure out how to make it work. Isn't there a simple way of putting something in front of the double quote in my csv, in order to make sure that jmeter will handle the quotes as text during the parse?> From: [hidden email]> To: [hidden email]> Subject: Re: Additional double quotes after csvread?> Date: Fri, 6 Feb 2009 12:10:52 +0000> CC: [hidden email]> > One way to do it would be to have a beanshell pre-processor to substitute the > single quotes for double quotes. > > Regards,> Noel> > On Friday 06 February 2009 12:04:42 [hidden email] wrote:> > Hi, thanks fro the prompt reply.> > Yes, tried that. That works fine (the parsing part at least), but I need> > the double quotes in my post request. My http request with single quotes> > doesn't work.> >> > > From: [hidden email]> To: [hidden email]> Subject:> > > Re: Additional double quotes after csvread?> Date: Fri, 6 Feb 2009> > > 11:50:08 +0000> CC: [hidden email]> > Have you tried it with> > > single quotes?> > tag='to be or not to be'> > On Friday 06 February 2009> > > 11:46:12 [hidden email] wrote:> > Hi all,> >> > I have a> > > problem with my data driven test. My testdata is in an external> > csv> > > file. I got one cell with the content tag="to be or not to be". Notice> >> > > the double quotes around the string! Now I do a csvread and fill a> > > variable> > with the content of that specific cell. In this process,> > > additional quotes> > are added to my string. It looks like this:> > > query="tag=""to be or not to> > be""". So around tag= are additional> > > quotes and around the string are> > additional quotes. Why? I can't post> > > this request looking like this.> >> > Hope somebody has seen this before> > > and got a solution for me.> >> > Thanks!> > Sander> >> > > _________________________________________________________________> >> > > Nieuw: nu ook chatten op je mobiel!> >> > > http://www.overaljevriendenbijje.nl/#superdeal> > > >> > > ---------------------------------------------------------------------> To> > > unsubscribe, e-mail: [hidden email]> For> > > additional commands, e-mail: [hidden email]>> >> > _________________________________________________________________> > Nieuw: nu ook chatten op je mobiel!> > http://www.overaljevriendenbijje.nl/#superdeal> > > > ---------------------------------------------------------------------> To unsubscribe, e-mail: [hidden email]> For additional commands, e-mail: [hidden email]>
_________________________________________________________________
Download de nieuwste emoticons voor in je Messenger
http://www.msnmessengerexperience.nl/chuck/
Reply | Threaded
Open this post in threaded view
|

Re: Additional double quotes after csvread?

Noel O'Brien
Are you importing the CSV data into JMeter using a CSV Data Set Config
element?

I haven't used it myself, but I see from
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config
that there's a "Allow Quoted Data" option. Have you played around with that?

Regards,
Noel

On Friday 06 February 2009 12:14:32 [hidden email] wrote:

> hmmm, looked at the beanshell pre-processor, but I am not that technical.
> can't figure out how to make it work. Isn't there a simple way of putting
> something in front of the double quote in my csv, in order to make sure
> that jmeter will handle the quotes as text during the parse?> From:
> [hidden email]> To: [hidden email]> Subject: Re:
> Additional double quotes after csvread?> Date: Fri, 6 Feb 2009 12:10:52
> +0000> CC: [hidden email]> > One way to do it would be to have
> a beanshell pre-processor to substitute the > single quotes for double
> quotes. > > Regards,> Noel> > On Friday 06 February 2009 12:04:42
> [hidden email] wrote:> > Hi, thanks fro the prompt reply.> >
> Yes, tried that. That works fine (the parsing part at least), but I need> >
> the double quotes in my post request. My http request with single quotes> >
> doesn't work.> >> > > From: [hidden email]> To:
> [hidden email]> Subject:> > > Re: Additional double quotes
> after csvread?> Date: Fri, 6 Feb 2009> > > 11:50:08 +0000> CC:
> [hidden email]> > Have you tried it with> > > single quotes?> >
> tag='to be or not to be'> > On Friday 06 February 2009> > > 11:46:12
> [hidden email] wrote:> > Hi all,> >> > I have a> > > problem
> with my data driven test. My testdata is in an external> > csv> > > file. I
> got one cell with the content tag="to be or not to be". Notice> >> > > the
> double quotes around the string! Now I do a csvread and fill a> > >
> variable> > with the content of that specific cell. In this process,> > >
> additional quotes> > are added to my string. It looks like this:> > >
> query="tag=""to be or not to> > be""". So around tag= are additional> > >
> quotes and around the string are> > additional quotes. Why? I can't post> >
> > this request looking like this.> >> > Hope somebody has seen this before>
> > > and got a solution for me.> >> > Thanks!> > Sander> >> > >
> _________________________________________________________________> >> > >
> Nieuw: nu ook chatten op je mobiel!> >> > >
> http://www.overaljevriendenbijje.nl/#superdeal> > > >> > >
> ---------------------------------------------------------------------> To>
> > > unsubscribe, e-mail: [hidden email]> For> >
> > additional commands, e-mail: [hidden email]>> >> >
> _________________________________________________________________> > Nieuw:
> nu ook chatten op je mobiel!> >
> http://www.overaljevriendenbijje.nl/#superdeal> > > >
> ---------------------------------------------------------------------> To
> unsubscribe, e-mail: [hidden email]> For
> additional commands, e-mail: [hidden email]>
> _________________________________________________________________
> Download de nieuwste emoticons voor in je Messenger
> http://www.msnmessengerexperience.nl/chuck/



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Additional double quotes after csvread?

sebb-2-2
If you have selected "Allow quoted data" then you need to double-up
any double-quotes.

Instead of

a,b c,"d e f"

you would need to put

a,b c,"""d e f"""

If you don't have any embedded delimiters within the file, then you
don't need to use "Allow quoted data" and you don't need to do
anything special to quote quotes.

On 06/02/2009, Noel O'Brien <[hidden email]> wrote:

> Are you importing the CSV data into JMeter using a CSV Data Set Config
>  element?
>
>  I haven't used it myself, but I see from
>  http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config
>  that there's a "Allow Quoted Data" option. Have you played around with that?
>
>  Regards,
>
> Noel
>
>
>  On Friday 06 February 2009 12:14:32 [hidden email] wrote:
>  > hmmm, looked at the beanshell pre-processor, but I am not that technical.
>  > can't figure out how to make it work. Isn't there a simple way of putting
>  > something in front of the double quote in my csv, in order to make sure
>  > that jmeter will handle the quotes as text during the parse?> From:
>  > [hidden email]> To: [hidden email]> Subject: Re:
>  > Additional double quotes after csvread?> Date: Fri, 6 Feb 2009 12:10:52
>  > +0000> CC: [hidden email]> > One way to do it would be to have
>  > a beanshell pre-processor to substitute the > single quotes for double
>  > quotes. > > Regards,> Noel> > On Friday 06 February 2009 12:04:42
>  > [hidden email] wrote:> > Hi, thanks fro the prompt reply.> >
>  > Yes, tried that. That works fine (the parsing part at least), but I need> >
>  > the double quotes in my post request. My http request with single quotes> >
>  > doesn't work.> >> > > From: [hidden email]> To:
>  > [hidden email]> Subject:> > > Re: Additional double quotes
>  > after csvread?> Date: Fri, 6 Feb 2009> > > 11:50:08 +0000> CC:
>  > [hidden email]> > Have you tried it with> > > single quotes?> >
>  > tag='to be or not to be'> > On Friday 06 February 2009> > > 11:46:12
>  > [hidden email] wrote:> > Hi all,> >> > I have a> > > problem
>  > with my data driven test. My testdata is in an external> > csv> > > file. I
>  > got one cell with the content tag="to be or not to be". Notice> >> > > the
>  > double quotes around the string! Now I do a csvread and fill a> > >
>  > variable> > with the content of that specific cell. In this process,> > >
>  > additional quotes> > are added to my string. It looks like this:> > >
>  > query="tag=""to be or not to> > be""". So around tag= are additional> > >
>  > quotes and around the string are> > additional quotes. Why? I can't post> >
>  > > this request looking like this.> >> > Hope somebody has seen this before>
>  > > > and got a solution for me.> >> > Thanks!> > Sander> >> > >
>  > _________________________________________________________________> >> > >
>  > Nieuw: nu ook chatten op je mobiel!> >> > >
>  > http://www.overaljevriendenbijje.nl/#superdeal> > > >> > >
>  > ---------------------------------------------------------------------> To>
>  > > > unsubscribe, e-mail: [hidden email]> For> >
>  > > additional commands, e-mail: [hidden email]>> >> >
>  > _________________________________________________________________> > Nieuw:
>  > nu ook chatten op je mobiel!> >
>  > http://www.overaljevriendenbijje.nl/#superdeal> > > >
>  > ---------------------------------------------------------------------> To
>  > unsubscribe, e-mail: [hidden email]> For
>  > additional commands, e-mail: [hidden email]>
>  > _________________________________________________________________
>  > Download de nieuwste emoticons voor in je Messenger
>  > http://www.msnmessengerexperience.nl/chuck/
>
>
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: [hidden email]
>  For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Additional double quotes after csvread?

stevens_sander

Noel / Sebb,
 
Got it working! Thanks for the prompt replies.
 
Rgds,
Sander> Date: Fri, 6 Feb 2009 18:51:43 +0000> Subject: Re: Additional double quotes after csvread?> From: [hidden email]> To: [hidden email]> > If you have selected "Allow quoted data" then you need to double-up> any double-quotes.> > Instead of> > a,b c,"d e f"> > you would need to put> > a,b c,"""d e f"""> > If you don't have any embedded delimiters within the file, then you> don't need to use "Allow quoted data" and you don't need to do> anything special to quote quotes.> > On 06/02/2009, Noel O'Brien <[hidden email]> wrote:> > Are you importing the CSV data into JMeter using a CSV Data Set Config> > element?> >> > I haven't used it myself, but I see from> > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config> > that there's a "Allow Quoted Data" option. Have you played around with that?> >> > Regards,> >> > Noel> >> >> > On Friday 06 February 2009 12:14:32 [hidden email] wrote:> > > hmmm, looked at the beanshell pre-processor, but I am not that technical.> > > can't figure out how to make it work. Isn't there a simple way of putting> > > something in front of the double quote in my csv, in order to make sure> > > that jmeter will handle the quotes as text during the parse?> From:> > > [hidden email]> To: [hidden email]> Subject: Re:> > > Additional double quotes after csvread?> Date: Fri, 6 Feb 2009 12:10:52> > > +0000> CC: [hidden email]> > One way to do it would be to have> > > a beanshell pre-processor to substitute the > single quotes for double> > > quotes. > > Regards,> Noel> > On Friday 06 February 2009 12:04:42> > > [hidden email] wrote:> > Hi, thanks fro the prompt reply.> >> > > Yes, tried that. That works fine (the parsing part at least), but I need> >> > > the double quotes in my post request. My http request with single quotes> >> > > doesn't work.> >> > > From: [hidden email]> To:> > > [hidden email]> Subject:> > > Re: Additional double quotes> > > after csvread?> Date: Fri, 6 Feb 2009> > > 11:50:08 +0000> CC:> > > [hidden email]> > Have you tried it with> > > single quotes?> >> > > tag='to be or not to be'> > On Friday 06 February 2009> > > 11:46:12> > > [hidden email] wrote:> > Hi all,> >> > I have a> > > problem> > > with my data driven test. My testdata is in an external> > csv> > > file. I> > > got one cell with the content tag="to be or not to be". Notice> >> > > the> > > double quotes around the string! Now I do a csvread and fill a> > >> > > variable> > with the content of that specific cell. In this process,> > >> > > additional quotes> > are added to my string. It looks like this:> > >> > > query="tag=""to be or not to> > be""". So around tag= are additional> > >> > > quotes and around the string are> > additional quotes. Why? I can't post> >> > > > this request looking like this.> >> > Hope somebody has seen this before>> > > > > and got a solution for me.> >> > Thanks!> > Sander> >> > >> > > _________________________________________________________________> >> > >> > > Nieuw: nu ook chatten op je mobiel!> >> > >> > > http://www.overaljevriendenbijje.nl/#superdeal> > > >> > >> > > ---------------------------------------------------------------------> To>> > > > > unsubscribe, e-mail: [hidden email]> For> >> > > > additional commands, e-mail: [hidden email]>> >> >> > > _________________________________________________________________> > Nieuw:> > > nu ook chatten op je mobiel!> >> > > http://www.overaljevriendenbijje.nl/#superdeal> > > >> > > ---------------------------------------------------------------------> To> > > unsubscribe, e-mail: [hidden email]> For> > > additional commands, e-mail: [hidden email]>> > > _________________________________________________________________> > > Download de nieuwste emoticons voor in je Messenger> > > http://www.msnmessengerexperience.nl/chuck/> >> >> >> >> > ---------------------------------------------------------------------> >> > To unsubscribe, e-mail: [hidden email]> > For additional commands, e-mail: [hidden email]> >> >> > ---------------------------------------------------------------------> To unsubscribe, e-mail: [hidden email]> For additional commands, e-mail: [hidden email]>
_________________________________________________________________
De leukste online filmpjes vind je op MSN Video!
http://video.msn.com/video.aspx?mkt=nl-nl