You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by R R <ra...@hotmail.co.uk> on 2006/02/13 11:00:20 UTC

Sending Body data with http sampler

Hi,

The application that I am testing takes information in the body of a POST 
request and responds back to the client with a data stream which is then 
processed via Java scripts. I have two questions;

1)	In order to emulate this I have used the “SOAP/XML-RPC Request” sampler 
as I could not see an obvious way of sending data within the body of the 
HTML sampler. Is there a way of doing this with the HTML sampler?

2)	One of the data streams returns an array of data which I am loading into 
the Jmeter variable. I would like to carry out string manipulation on this 
data and load separate pieces of it into other variables. What would be the 
best way to achieve this? Or if at all possible does anyone have any sample 
code where they have done something similer?

Thanks for any assistance with these questions.

Regards

_________________________________________________________________
Are you using the latest version of MSN Messenger? Download MSN Messenger 
7.5 today! http://messenger.msn.co.uk


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Sending Body data with http sampler

Posted by R R <ra...@hotmail.co.uk>.
Doh :)

Thanx ....


>From: sebb <se...@gmail.com>
>Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
>To: JMeter Users List <jm...@jakarta.apache.org>
>Subject: Re: Sending Body data with http sampler
>Date: Wed, 15 Feb 2006 12:41:58 +0000
>
>On 15/02/06, R R <ra...@hotmail.co.uk> wrote:
> > Hi,
> >
> > Thanx that worked (it sticks a '=' at the end of the paramaters but this 
>did
> > not cause a error).
>
>Try unchecking "Use Equals".
>
> >
> > What would be the correct way to request an Enhancement, bugzilla?
>
>Yes.
>
> > It would be nice feature for the html sampler to have an open field that
> > would let us send any info in the body. The parameter is a good 
>workaround
> > but there maybe cases where the '=' raises an issue.
>
>See above
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

_________________________________________________________________
Are you using the latest version of MSN Messenger? Download MSN Messenger 
7.5 today! http://messenger.msn.co.uk


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Sending Body data with http sampler

Posted by sebb <se...@gmail.com>.
On 15/02/06, R R <ra...@hotmail.co.uk> wrote:
> Hi,
>
> Thanx that worked (it sticks a '=' at the end of the paramaters but this did
> not cause a error).

Try unchecking "Use Equals".

>
> What would be the correct way to request an Enhancement, bugzilla?

Yes.

> It would be nice feature for the html sampler to have an open field that
> would let us send any info in the body. The parameter is a good workaround
> but there maybe cases where the '=' raises an issue.

See above

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: Sending Body data with http sampler

Posted by alan <as...@transcorgroup.com>.
Thanks but I have since moved off of JMeter. I wrote my own load testing
tool using the new util.concurrent package since, at least for now, I am
only testing a very simple xml over http web service.


-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Tuesday, February 14, 2006 4:42 PM
To: JMeter Users List
Subject: Re: Sending Body data with http sampler

Just posted an answer - try putting the text as the parameter name...

S.
On 14/02/06, R R <ra...@hotmail.co.uk> wrote:
> Hi,
>
> Yes very close.
>
> I looked but did not see any responses, did you get anything direct?
>
> Cheers
>
>
> >From: "alan" <as...@transcorgroup.com>
> >Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
> >To: "'JMeter Users List'" <jm...@jakarta.apache.org>
> >Subject: RE: Sending Body data with http sampler
> >Date: Mon, 13 Feb 2006 13:18:03 -0700
> >
> >I believe this question is similar to a question I posted on 2/10 titled
> >"load test a rest-style web service".
> >
> >
> >
> >-----Original Message-----
> >From: R R [mailto:rarokni@hotmail.co.uk]
> >Sent: Monday, February 13, 2006 1:12 PM
> >To: jmeter-user@jakarta.apache.org
> >Subject: Re: Sending Body data with http sampler
> >
> >Hi,
> >
> >No the parameters get sent in a pre-defined format. For my test the
server
> >expects info in the body of the form:
> >
> >{x,{y[value,value etc....
> >
> >Thanx for the hints on the variables will give them a try tommorow.
> >
> >Cheers
> >
> >
> >
> >
> > >From: sebb <se...@gmail.com>
> > >Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
> > >To: JMeter Users List <jm...@jakarta.apache.org>
> > >Subject: Re: Sending Body data with http sampler
> > >Date: Mon, 13 Feb 2006 14:30:12 +0000
> > >
> > >On 13/02/06, R R <ra...@hotmail.co.uk> wrote:
> > > > Hi,
> > > >
> > > > The application that I am testing takes information in the body of a
> > >POST
> > > > request and responds back to the client with a data stream which is
> >then
> > > > processed via Java scripts. I have two questions;
> > > >
> > > > 1)      In order to emulate this I have used the "SOAP/XML-RPC
> >Request"
> > >sampler
> > > > as I could not see an obvious way of sending data within the body of
> >the
> > > > HTML sampler. Is there a way of doing this with the HTML sampler?
> > >
> > >The HTTP Request POST command
> > >
> >
>http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_R
> >equest
> > >
> > >allows parameters to be sent as part of the request - does this not
work?
> > >
> > > > 2)      One of the data streams returns an array of data which I am
> > >loading into
> > > > the Jmeter variable. I would like to carry out string manipulation
on
> > >this
> > > > data and load separate pieces of it into other variables. What would
> >be
> > >the
> > > > best way to achieve this? Or if at all possible does anyone have any
> > >sample
> > > > code where they have done something similer?
> > >
> > >There is a split() function that may be suitable:
> > >http://jakarta.apache.org/jmeter/usermanual/functions.html#__split
> > >
> > >Or you could perhaps use BeanShell:
> > >http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell
> > >This can create variables if required.
> > >
> > >Or Javascript:
> > >http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript
> > >
> > >This can only return one string/variable, but you might be able to
> > >write a function to extract the parts one at a time.
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> >
> >_________________________________________________________________
> >The new MSN Search Toolbar now includes Desktop search!
> >http://toolbar.msn.co.uk/
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
> _________________________________________________________________
> Are you using the latest version of MSN Messenger? Download MSN Messenger
> 7.5 today! http://messenger.msn.co.uk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Sending Body data with http sampler

Posted by R R <ra...@hotmail.co.uk>.
Hi,

Thanx that worked (it sticks a '=' at the end of the paramaters but this did 
not cause a error).

What would be the correct way to request an Enhancement, bugzilla?

It would be nice feature for the html sampler to have an open field that 
would let us send any info in the body. The parameter is a good workaround 
but there maybe cases where the ‘=’ raises an issue.

Again cheers...





>From: sebb <se...@gmail.com>
>Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
>To: JMeter Users List <jm...@jakarta.apache.org>
>Subject: Re: Sending Body data with http sampler
>Date: Tue, 14 Feb 2006 23:42:22 +0000
>
>Just posted an answer - try putting the text as the parameter name...
>
>S.
>On 14/02/06, R R <ra...@hotmail.co.uk> wrote:
> > Hi,
> >
> > Yes very close.
> >
> > I looked but did not see any responses, did you get anything direct?
> >
> > Cheers
> >
> >
> > >From: "alan" <as...@transcorgroup.com>
> > >Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
> > >To: "'JMeter Users List'" <jm...@jakarta.apache.org>
> > >Subject: RE: Sending Body data with http sampler
> > >Date: Mon, 13 Feb 2006 13:18:03 -0700
> > >
> > >I believe this question is similar to a question I posted on 2/10 
>titled
> > >"load test a rest-style web service".
> > >
> > >
> > >
> > >-----Original Message-----
> > >From: R R [mailto:rarokni@hotmail.co.uk]
> > >Sent: Monday, February 13, 2006 1:12 PM
> > >To: jmeter-user@jakarta.apache.org
> > >Subject: Re: Sending Body data with http sampler
> > >
> > >Hi,
> > >
> > >No the parameters get sent in a pre-defined format. For my test the 
>server
> > >expects info in the body of the form:
> > >
> > >{x,{y[value,value etc....
> > >
> > >Thanx for the hints on the variables will give them a try tommorow.
> > >
> > >Cheers
> > >
> > >
> > >
> > >
> > > >From: sebb <se...@gmail.com>
> > > >Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
> > > >To: JMeter Users List <jm...@jakarta.apache.org>
> > > >Subject: Re: Sending Body data with http sampler
> > > >Date: Mon, 13 Feb 2006 14:30:12 +0000
> > > >
> > > >On 13/02/06, R R <ra...@hotmail.co.uk> wrote:
> > > > > Hi,
> > > > >
> > > > > The application that I am testing takes information in the body of 
>a
> > > >POST
> > > > > request and responds back to the client with a data stream which 
>is
> > >then
> > > > > processed via Java scripts. I have two questions;
> > > > >
> > > > > 1)      In order to emulate this I have used the "SOAP/XML-RPC
> > >Request"
> > > >sampler
> > > > > as I could not see an obvious way of sending data within the body 
>of
> > >the
> > > > > HTML sampler. Is there a way of doing this with the HTML sampler?
> > > >
> > > >The HTTP Request POST command
> > > >
> > > 
> >http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_R
> > >equest
> > > >
> > > >allows parameters to be sent as part of the request - does this not 
>work?
> > > >
> > > > > 2)      One of the data streams returns an array of data which I 
>am
> > > >loading into
> > > > > the Jmeter variable. I would like to carry out string manipulation 
>on
> > > >this
> > > > > data and load separate pieces of it into other variables. What 
>would
> > >be
> > > >the
> > > > > best way to achieve this? Or if at all possible does anyone have 
>any
> > > >sample
> > > > > code where they have done something similer?
> > > >
> > > >There is a split() function that may be suitable:
> > > >http://jakarta.apache.org/jmeter/usermanual/functions.html#__split
> > > >
> > > >Or you could perhaps use BeanShell:
> > > 
> >http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell
> > > >This can create variables if required.
> > > >
> > > >Or Javascript:
> > > 
> >http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript
> > > >
> > > >This can only return one string/variable, but you might be able to
> > > >write a function to extract the parts one at a time.
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > > >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > > >
> > >
> > >_________________________________________________________________
> > >The new MSN Search Toolbar now includes Desktop search!
> > >http://toolbar.msn.co.uk/
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> >
> > _________________________________________________________________
> > Are you using the latest version of MSN Messenger? Download MSN 
>Messenger
> > 7.5 today! http://messenger.msn.co.uk
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Sending Body data with http sampler

Posted by sebb <se...@gmail.com>.
Just posted an answer - try putting the text as the parameter name...

S.
On 14/02/06, R R <ra...@hotmail.co.uk> wrote:
> Hi,
>
> Yes very close.
>
> I looked but did not see any responses, did you get anything direct?
>
> Cheers
>
>
> >From: "alan" <as...@transcorgroup.com>
> >Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
> >To: "'JMeter Users List'" <jm...@jakarta.apache.org>
> >Subject: RE: Sending Body data with http sampler
> >Date: Mon, 13 Feb 2006 13:18:03 -0700
> >
> >I believe this question is similar to a question I posted on 2/10 titled
> >"load test a rest-style web service".
> >
> >
> >
> >-----Original Message-----
> >From: R R [mailto:rarokni@hotmail.co.uk]
> >Sent: Monday, February 13, 2006 1:12 PM
> >To: jmeter-user@jakarta.apache.org
> >Subject: Re: Sending Body data with http sampler
> >
> >Hi,
> >
> >No the parameters get sent in a pre-defined format. For my test the server
> >expects info in the body of the form:
> >
> >{x,{y[value,value etc....
> >
> >Thanx for the hints on the variables will give them a try tommorow.
> >
> >Cheers
> >
> >
> >
> >
> > >From: sebb <se...@gmail.com>
> > >Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
> > >To: JMeter Users List <jm...@jakarta.apache.org>
> > >Subject: Re: Sending Body data with http sampler
> > >Date: Mon, 13 Feb 2006 14:30:12 +0000
> > >
> > >On 13/02/06, R R <ra...@hotmail.co.uk> wrote:
> > > > Hi,
> > > >
> > > > The application that I am testing takes information in the body of a
> > >POST
> > > > request and responds back to the client with a data stream which is
> >then
> > > > processed via Java scripts. I have two questions;
> > > >
> > > > 1)      In order to emulate this I have used the "SOAP/XML-RPC
> >Request"
> > >sampler
> > > > as I could not see an obvious way of sending data within the body of
> >the
> > > > HTML sampler. Is there a way of doing this with the HTML sampler?
> > >
> > >The HTTP Request POST command
> > >
> > >http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_R
> >equest
> > >
> > >allows parameters to be sent as part of the request - does this not work?
> > >
> > > > 2)      One of the data streams returns an array of data which I am
> > >loading into
> > > > the Jmeter variable. I would like to carry out string manipulation on
> > >this
> > > > data and load separate pieces of it into other variables. What would
> >be
> > >the
> > > > best way to achieve this? Or if at all possible does anyone have any
> > >sample
> > > > code where they have done something similer?
> > >
> > >There is a split() function that may be suitable:
> > >http://jakarta.apache.org/jmeter/usermanual/functions.html#__split
> > >
> > >Or you could perhaps use BeanShell:
> > >http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell
> > >This can create variables if required.
> > >
> > >Or Javascript:
> > >http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript
> > >
> > >This can only return one string/variable, but you might be able to
> > >write a function to extract the parts one at a time.
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> >
> >_________________________________________________________________
> >The new MSN Search Toolbar now includes Desktop search!
> >http://toolbar.msn.co.uk/
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
> _________________________________________________________________
> Are you using the latest version of MSN Messenger? Download MSN Messenger
> 7.5 today! http://messenger.msn.co.uk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: Sending Body data with http sampler

Posted by R R <ra...@hotmail.co.uk>.
Hi,

Yes very close.

I looked but did not see any responses, did you get anything direct?

Cheers


>From: "alan" <as...@transcorgroup.com>
>Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
>To: "'JMeter Users List'" <jm...@jakarta.apache.org>
>Subject: RE: Sending Body data with http sampler
>Date: Mon, 13 Feb 2006 13:18:03 -0700
>
>I believe this question is similar to a question I posted on 2/10 titled
>"load test a rest-style web service".
>
>
>
>-----Original Message-----
>From: R R [mailto:rarokni@hotmail.co.uk]
>Sent: Monday, February 13, 2006 1:12 PM
>To: jmeter-user@jakarta.apache.org
>Subject: Re: Sending Body data with http sampler
>
>Hi,
>
>No the parameters get sent in a pre-defined format. For my test the server
>expects info in the body of the form:
>
>{x,{y[value,value etc....
>
>Thanx for the hints on the variables will give them a try tommorow.
>
>Cheers
>
>
>
>
> >From: sebb <se...@gmail.com>
> >Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
> >To: JMeter Users List <jm...@jakarta.apache.org>
> >Subject: Re: Sending Body data with http sampler
> >Date: Mon, 13 Feb 2006 14:30:12 +0000
> >
> >On 13/02/06, R R <ra...@hotmail.co.uk> wrote:
> > > Hi,
> > >
> > > The application that I am testing takes information in the body of a
> >POST
> > > request and responds back to the client with a data stream which is 
>then
> > > processed via Java scripts. I have two questions;
> > >
> > > 1)      In order to emulate this I have used the "SOAP/XML-RPC 
>Request"
> >sampler
> > > as I could not see an obvious way of sending data within the body of 
>the
> > > HTML sampler. Is there a way of doing this with the HTML sampler?
> >
> >The HTTP Request POST command
> >
> >http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_R
>equest
> >
> >allows parameters to be sent as part of the request - does this not work?
> >
> > > 2)      One of the data streams returns an array of data which I am
> >loading into
> > > the Jmeter variable. I would like to carry out string manipulation on
> >this
> > > data and load separate pieces of it into other variables. What would 
>be
> >the
> > > best way to achieve this? Or if at all possible does anyone have any
> >sample
> > > code where they have done something similer?
> >
> >There is a split() function that may be suitable:
> >http://jakarta.apache.org/jmeter/usermanual/functions.html#__split
> >
> >Or you could perhaps use BeanShell:
> >http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell
> >This can create variables if required.
> >
> >Or Javascript:
> >http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript
> >
> >This can only return one string/variable, but you might be able to
> >write a function to extract the parts one at a time.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
>_________________________________________________________________
>The new MSN Search Toolbar now includes Desktop search!
>http://toolbar.msn.co.uk/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

_________________________________________________________________
Are you using the latest version of MSN Messenger? Download MSN Messenger 
7.5 today! http://messenger.msn.co.uk


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: Sending Body data with http sampler

Posted by alan <as...@transcorgroup.com>.
I believe this question is similar to a question I posted on 2/10 titled
"load test a rest-style web service".



-----Original Message-----
From: R R [mailto:rarokni@hotmail.co.uk] 
Sent: Monday, February 13, 2006 1:12 PM
To: jmeter-user@jakarta.apache.org
Subject: Re: Sending Body data with http sampler

Hi,

No the parameters get sent in a pre-defined format. For my test the server 
expects info in the body of the form:

{x,{y[value,value etc....

Thanx for the hints on the variables will give them a try tommorow.

Cheers




>From: sebb <se...@gmail.com>
>Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
>To: JMeter Users List <jm...@jakarta.apache.org>
>Subject: Re: Sending Body data with http sampler
>Date: Mon, 13 Feb 2006 14:30:12 +0000
>
>On 13/02/06, R R <ra...@hotmail.co.uk> wrote:
> > Hi,
> >
> > The application that I am testing takes information in the body of a 
>POST
> > request and responds back to the client with a data stream which is then
> > processed via Java scripts. I have two questions;
> >
> > 1)      In order to emulate this I have used the "SOAP/XML-RPC Request" 
>sampler
> > as I could not see an obvious way of sending data within the body of the
> > HTML sampler. Is there a way of doing this with the HTML sampler?
>
>The HTTP Request POST command
>
>http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_R
equest
>
>allows parameters to be sent as part of the request - does this not work?
>
> > 2)      One of the data streams returns an array of data which I am 
>loading into
> > the Jmeter variable. I would like to carry out string manipulation on 
>this
> > data and load separate pieces of it into other variables. What would be 
>the
> > best way to achieve this? Or if at all possible does anyone have any 
>sample
> > code where they have done something similer?
>
>There is a split() function that may be suitable:
>http://jakarta.apache.org/jmeter/usermanual/functions.html#__split
>
>Or you could perhaps use BeanShell:
>http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell
>This can create variables if required.
>
>Or Javascript:
>http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript
>
>This can only return one string/variable, but you might be able to
>write a function to extract the parts one at a time.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

_________________________________________________________________
The new MSN Search Toolbar now includes Desktop search! 
http://toolbar.msn.co.uk/


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Sending Body data with http sampler

Posted by R R <ra...@hotmail.co.uk>.
Hi,

No the parameters get sent in a pre-defined format. For my test the server 
expects info in the body of the form:

{x,{y[value,value etc....

Thanx for the hints on the variables will give them a try tommorow.

Cheers




>From: sebb <se...@gmail.com>
>Reply-To: "JMeter Users List" <jm...@jakarta.apache.org>
>To: JMeter Users List <jm...@jakarta.apache.org>
>Subject: Re: Sending Body data with http sampler
>Date: Mon, 13 Feb 2006 14:30:12 +0000
>
>On 13/02/06, R R <ra...@hotmail.co.uk> wrote:
> > Hi,
> >
> > The application that I am testing takes information in the body of a 
>POST
> > request and responds back to the client with a data stream which is then
> > processed via Java scripts. I have two questions;
> >
> > 1)      In order to emulate this I have used the "SOAP/XML-RPC Request" 
>sampler
> > as I could not see an obvious way of sending data within the body of the
> > HTML sampler. Is there a way of doing this with the HTML sampler?
>
>The HTTP Request POST command
>
>http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Request
>
>allows parameters to be sent as part of the request - does this not work?
>
> > 2)      One of the data streams returns an array of data which I am 
>loading into
> > the Jmeter variable. I would like to carry out string manipulation on 
>this
> > data and load separate pieces of it into other variables. What would be 
>the
> > best way to achieve this? Or if at all possible does anyone have any 
>sample
> > code where they have done something similer?
>
>There is a split() function that may be suitable:
>http://jakarta.apache.org/jmeter/usermanual/functions.html#__split
>
>Or you could perhaps use BeanShell:
>http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell
>This can create variables if required.
>
>Or Javascript:
>http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript
>
>This can only return one string/variable, but you might be able to
>write a function to extract the parts one at a time.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

_________________________________________________________________
The new MSN Search Toolbar now includes Desktop search! 
http://toolbar.msn.co.uk/


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Sending Body data with http sampler

Posted by sebb <se...@gmail.com>.
On 13/02/06, R R <ra...@hotmail.co.uk> wrote:
> Hi,
>
> The application that I am testing takes information in the body of a POST
> request and responds back to the client with a data stream which is then
> processed via Java scripts. I have two questions;
>
> 1)      In order to emulate this I have used the "SOAP/XML-RPC Request" sampler
> as I could not see an obvious way of sending data within the body of the
> HTML sampler. Is there a way of doing this with the HTML sampler?

The HTTP Request POST command

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Request

allows parameters to be sent as part of the request - does this not work?

> 2)      One of the data streams returns an array of data which I am loading into
> the Jmeter variable. I would like to carry out string manipulation on this
> data and load separate pieces of it into other variables. What would be the
> best way to achieve this? Or if at all possible does anyone have any sample
> code where they have done something similer?

There is a split() function that may be suitable:
http://jakarta.apache.org/jmeter/usermanual/functions.html#__split

Or you could perhaps use BeanShell:
http://jakarta.apache.org/jmeter/usermanual/functions.html#__BeanShell
This can create variables if required.

Or Javascript:
http://jakarta.apache.org/jmeter/usermanual/functions.html#__javaScript

This can only return one string/variable, but you might be able to
write a function to extract the parts one at a time.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org