jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jannetta Steyn <janne...@henning.org>
Subject Re: Regular Expressions
Date Wed, 15 Apr 2009 17:50:35 GMT
Yes the data of one of the fields I want to submit is a textarea which
sometimes contains line breaks.

I have two ways of retrieving the data. The first is as I mentioned before
from the CSV file, so it is in a variable. Because the CSV data config can't
read line breaks, I replaced the line breaks with <br/>.I can replace it
with anything really as long as when I submit it to the text field I can
replace it with line breaks again.

Alternatively I can retrieve the data from a database, but then I don't know
how to get it into a variable to submit in the form.

I tried to use a Regular Expression Extractor to retrieve the data from the
Response Data. The data is then broken up into separate variables by each
line break. For instance, if the reference name I specify is DESCRIPTION,
the Regular expression is (.+), template is $1$, match no is -1, then
DESCRIPTION_matchNr will contain the number of lines read and the lines will
be in DESCRIPTION_1 to DESCRIPTION_n. What I then can't figure out is how to
submit the whole lot to the form again - in an automated manner of course.

Regards
Jannetta




2009/4/15 Noel O'Brien <nobrien@newbay.com>

 Do you need to have line breaks in your data?
>
> Is the data in question sent as a parameter or in the request body?
>
> Regards,
>
> Noel
>
> On Wednesday 15 April 2009 17:05:47 Jannetta Steyn wrote:
>
> > Hi Folks
>
> >
>
> > I posted this message earlier today but it didn't seem to go through.
>
> > Apologies if it now ends up having gone through twice.
>
> >
>
> > I wonder if someone can perhaps help. I am using JMeter to test a web
> site
>
> > which consist of forms submitted by POST. I read data from a CSV file and
>
> > then submit the information using HTTP Request. The problem I have is
> with
>
> > the CSV Data Set Config not being able to read data with line breaks in
> the
>
> > fields. So what I have done is to replace the line breaks with an odd
>
> > character (or with <br/>). However before I submit I would like to
> replace
>
> > the odd character (or the <br/>) with a line break.
>
> >
>
> > I have tried a few things but just can't get it to work. Does anybody
> have
>
> > any advice regarding this?
>
> >
>
> > Thanks in advance.
>
> > Jannetta
>
>



-- 

===================================
Web site: http://www.jannetta.com
Email: jannetta@henning.org
===================================

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message