You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by kiran kadiyala <sl...@yahoo.com> on 2004/06/08 16:44:39 UTC

Sending HashMap as request paarmeter

Hi All,

I've totally new to Jmeter and havnt explored its
features as yet. But as far as i got through, the tool
seems to be pretty impressive. 

I've a small question to you all. I've a struts action
class which expects a hashmap from the request object.
I know how to set user parameters (Strings basically)
in JMeter GUI, but is there a way in JMeter to send a
HashMap instead of a string to my action class?

Thanks All,

Bye



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


When data written

Posted by Shambu <sh...@applabs.net>.
Jmeter gives raw data output with timestamp ,response
time,rrequest,thread,return code etc.Here the time stamp pertains to time
when request was made or when response was sucessfully made??

-----Original Message-----
From: Michael Stover [mailto:mstover1@apache.org]
Sent: Tuesday, June 08, 2004 9:01 PM
To: JMeter Users List
Subject: Re: Sending HashMap as request paarmeter


JMeter simulates a browser and sends HTTP protocol requests, just like a
browser.  HTTP protocol is a simple string-based protocol.  A hashmap
doesn't translate.  Your servlet engine converts a browsers request into
A Request object that looks to you like a HashMap, but that is not how a
browser sent it.  And neither is it how JMeter sends it.

JMeter sends soemthing like this:

GET http://host.domain.com/testPage.jsp?uname=username

-Mike

On Tue, 2004-06-08 at 11:09, kiran kadiyala wrote:
> Hi Jorg,
>
> Let me clarify two things that I forgot to mention in
> my previous mail
>
> 1.) I already tested my action class with STC and
> Cactus. So unit testing wise its not a problem. Now I
> want to performance test my struts app. So trying to
> use JMeter for that
>
> 2.) All the form parameters are enclosed in a haspmap
> which is sent through a request object.
> Ex:
> If the form has Username and Password
> HashMap input.put("uname","username");
>
> request.setAttribute("Hash",input);
>
> Guess I made myself clear
>
> Thanks for your help.
>
> --- Jorg Heymans <jh...@domek.be> wrote:
> > IIUC, in your current setup you are sending a
> > hashmap from a form to the
> > struts action object? (don't see how this is
> > possible)
> >
> > Shouldn't you better use junit and some mockobjects
> > to test your action
> > class?
> >
> > More details please!
> >
> > Regards
> > Jorg
> >
> > kiran kadiyala wrote:
> >
> > > Hi All,
> > >
> > > I've totally new to Jmeter and havnt explored its
> > > features as yet. But as far as i got through, the
> > tool
> > > seems to be pretty impressive.
> > >
> > > I've a small question to you all. I've a struts
> > action
> > > class which expects a hashmap from the request
> > object.
> > > I know how to set user parameters (Strings
> > basically)
> > > in JMeter GUI, but is there a way in JMeter to
> > send a
> > > HashMap instead of a string to my action class?
> > >
> > > Thanks All,
> > >
> > > Bye
> > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Friends.  Fun.  Try the all-new Yahoo! Messenger.
> > > http://messenger.yahoo.com/
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
--
Michael Stover <ms...@apache.org>
Apache Software Foundation


---------------------------------------------------------------------
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 HashMap as request paarmeter

Posted by Michael Stover <ms...@apache.org>.
JMeter simulates a browser and sends HTTP protocol requests, just like a
browser.  HTTP protocol is a simple string-based protocol.  A hashmap
doesn't translate.  Your servlet engine converts a browsers request into
A Request object that looks to you like a HashMap, but that is not how a
browser sent it.  And neither is it how JMeter sends it.

JMeter sends soemthing like this:

GET http://host.domain.com/testPage.jsp?uname=username

-Mike

On Tue, 2004-06-08 at 11:09, kiran kadiyala wrote:
> Hi Jorg,
> 
> Let me clarify two things that I forgot to mention in
> my previous mail
> 
> 1.) I already tested my action class with STC and
> Cactus. So unit testing wise its not a problem. Now I
> want to performance test my struts app. So trying to
> use JMeter for that
> 
> 2.) All the form parameters are enclosed in a haspmap
> which is sent through a request object.
> Ex:
> If the form has Username and Password
> HashMap input.put("uname","username");
> 
> request.setAttribute("Hash",input);
> 
> Guess I made myself clear
> 
> Thanks for your help.
> 
> --- Jorg Heymans <jh...@domek.be> wrote:
> > IIUC, in your current setup you are sending a
> > hashmap from a form to the 
> > struts action object? (don't see how this is
> > possible)
> > 
> > Shouldn't you better use junit and some mockobjects
> > to test your action 
> > class?
> > 
> > More details please!
> > 
> > Regards
> > Jorg
> > 
> > kiran kadiyala wrote:
> > 
> > > Hi All,
> > > 
> > > I've totally new to Jmeter and havnt explored its
> > > features as yet. But as far as i got through, the
> > tool
> > > seems to be pretty impressive. 
> > > 
> > > I've a small question to you all. I've a struts
> > action
> > > class which expects a hashmap from the request
> > object.
> > > I know how to set user parameters (Strings
> > basically)
> > > in JMeter GUI, but is there a way in JMeter to
> > send a
> > > HashMap instead of a string to my action class?
> > > 
> > > Thanks All,
> > > 
> > > Bye
> > > 
> > > 
> > > 
> > > 	
> > > 		
> > > __________________________________
> > > Do you Yahoo!?
> > > Friends.  Fun.  Try the all-new Yahoo! Messenger.
> > > http://messenger.yahoo.com/
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> > 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
-- 
Michael Stover <ms...@apache.org>
Apache Software Foundation


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


Re: Sending HashMap as request paarmeter

Posted by kiran kadiyala <sl...@yahoo.com>.
Hi Jorg,

Let me clarify two things that I forgot to mention in
my previous mail

1.) I already tested my action class with STC and
Cactus. So unit testing wise its not a problem. Now I
want to performance test my struts app. So trying to
use JMeter for that

2.) All the form parameters are enclosed in a haspmap
which is sent through a request object.
Ex:
If the form has Username and Password
HashMap input.put("uname","username");

request.setAttribute("Hash",input);

Guess I made myself clear

Thanks for your help.

--- Jorg Heymans <jh...@domek.be> wrote:
> IIUC, in your current setup you are sending a
> hashmap from a form to the 
> struts action object? (don't see how this is
> possible)
> 
> Shouldn't you better use junit and some mockobjects
> to test your action 
> class?
> 
> More details please!
> 
> Regards
> Jorg
> 
> kiran kadiyala wrote:
> 
> > Hi All,
> > 
> > I've totally new to Jmeter and havnt explored its
> > features as yet. But as far as i got through, the
> tool
> > seems to be pretty impressive. 
> > 
> > I've a small question to you all. I've a struts
> action
> > class which expects a hashmap from the request
> object.
> > I know how to set user parameters (Strings
> basically)
> > in JMeter GUI, but is there a way in JMeter to
> send a
> > HashMap instead of a string to my action class?
> > 
> > Thanks All,
> > 
> > Bye
> > 
> > 
> > 
> > 	
> > 		
> > __________________________________
> > Do you Yahoo!?
> > Friends.  Fun.  Try the all-new Yahoo! Messenger.
> > http://messenger.yahoo.com/ 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


Re: Sending HashMap as request paarmeter

Posted by Jorg Heymans <jh...@domek.be>.
IIUC, in your current setup you are sending a hashmap from a form to the 
struts action object? (don't see how this is possible)

Shouldn't you better use junit and some mockobjects to test your action 
class?

More details please!

Regards
Jorg

kiran kadiyala wrote:

> Hi All,
> 
> I've totally new to Jmeter and havnt explored its
> features as yet. But as far as i got through, the tool
> seems to be pretty impressive. 
> 
> I've a small question to you all. I've a struts action
> class which expects a hashmap from the request object.
> I know how to set user parameters (Strings basically)
> in JMeter GUI, but is there a way in JMeter to send a
> HashMap instead of a string to my action class?
> 
> Thanks All,
> 
> Bye
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/ 


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