jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rahulp <rahul.pachagh...@tcs.com>
Subject Re: Dynamic mapping with Jmeter - Please help..
Date Thu, 18 Feb 2010 06:27:07 GMT

Dear Deepak,

Thank you very much for your reply.

The parameters that I have are most of type <input type="text">. 

Can you please elaborate on using a CSV file and how to write a sql query so
that I can get some idea. If you can explain with some example that would be
great..

Thank you.
Regards,
Rahul


<Author="Deepak Shetty">
I assume these 50 parameters are mostly of the type <input type="hidden"> in
which case you can write one regular expression/xpath expression which
extracts all 50 (or most of them) and then use a bean shell pre processor to
dynamically add parameters to the sample (using sampler.addArgument() )

In case they aren't then you could also store the data you want as part of
the CSV file itself.(which could be generated from say a SQL query)

You could add 1 regex per variable , but thats tedious to maintain .


regards
deepak


On Wed, Feb 17, 2010 at 8:52 PM, rahulp <rahul.pachaghare@tcs.com> wrote:

>
> Dear Deepak,
>
> Thanks a lot for your reply.
>
> I thought of using Regular expressions. But there are lot of - around 50
> parameters that get passed in the next request.
>
> So I think I will have to add a Regular Expression Extractor to extract
> each
> parameter in the request, due to which I will end up adding more than 50
> Regular Expression Extractors in single HTTP Request.
>
> Is it proper to add a Regular Expression Extractor for each parameter or
> is
> there any way so that I can extract multiple parameters in a single
> Extractor..I am not aware if this is the case.
>
> Please help me with this.
>
> Thank you.
> Regards,
> Rahul
>
>
>
>
> Deepak Shetty wrote:
> >
> >>Now HTTP Request2 should take the changed parameters and should change
> > the details like price etc according to the dynamic prodID from CSV1
> > Assuming that the response of HTTPRequest1 generates the response which
> > has
> > he changed parameters you need,
> > you would nede to useany of the Post processor (regex or XPATH usually)
> > and
> > extract the value into a variable and use the variable in HTTPRequest2
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor
> > .
> > Search the archives , you should be able to get a few samples
> >
> > regards
> > deepak
> >
> > On Tue, Feb 16, 2010 at 11:00 PM, rahulp <rahul.pachaghare@tcs.com>
> wrote:
> >
> >>
> >> Dear All,
> >>
> >> I am trying to prepare a test plan and I am stuck at one problem..
> >>
> >> I am not aware of how to do the dynamic mapping with Jmeter. Let me
> >> explain
> >> the scenario.
> >>
> >> My test plan is like:
> >> [code]
> >> Thread Group -
> >> HTTP Request Defaults
> >> HTTP Cookie Manager
> >> CSV1
> >> Simple Controller
> >>       Once Only Controller
> >>               Login Details
> >>       IF Controller
> >>               Some requests
> >>               IF Controller
> >>                       HTTP Request1
> >>                       IF Controller
> >>                                HTTP Request2
> >>                                HTTP Request3
> >> [/code]
> >> Please consider this like Shopping Cart eg. Lets say I am changing my
> >> product parameters say prodID and prodType in HTTP Request1 with the
> help
> >> of
> >> CSV1. Now HTTP Request2 should take the changed parameters and should
> >> change
> >> the details like price etc according to the dynamic prodID from CSV1.
> And
> >> HTTP Request3 should show that prodID item is saved successfully.
> >>
> >> I am not able to specify HTTP Request2 and HTTP Request3 so that it
> >> behave
> >> in desired manner. I am stuck as to what to do and how to do it. I
> >> searched
> >> for dynamic mapping in net but could not find solution.
> >>
> >> Please help me with this.
> >>
> >> Thank you in advance..
> >>
> >> Regards,
> >> Rahul
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Dynamic-mapping-with-Jmeter---Please-help..-tp27619764p27619764.html
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Dynamic-mapping-with-Jmeter---Please-help..-tp27619764p27634403.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>



-- 
View this message in context: http://old.nabble.com/Dynamic-mapping-with-Jmeter---Please-help..-tp27619764p27634789.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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


Mime
View raw message