You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by VVikasV <v....@gmail.com> on 2010/04/13 15:21:11 UTC

Jmeter - Dynamic URL - How to record Script and Run.

PFB, the problem I am facing with Jmeter.

While recording script using Jmeter, when click the to validate the user,
the control goes to  third party service, where I need to enter the user
details. Here I am getting a problem like, for each user the Url generated
by the third party is different. The problem is still there if I am trying
to login using the same login credentials. There is a part in the URL which
changes with each login (that part is marked in the image below). So when I
am trying to run the recorded script, it is showing “session expired error”. 
Is there any way to overcome this problem?

•A portion in the recorded URL is dynamic. It changes with every login.
•Since it the dynamic part is in URL, we are not able to apply “Correlation”
to this.
•When we run the script it is throwing “Session Expired Error”.

I want to correlate the marked portion in URL.
https://xx.xxx.xx.xx/WebObjects/IDMSAccount.woa/1/wo/KpFpetJdbqgVfuOGJABAqg/0.19

I want to coorelate the part marked in bold in above URL.

http://old.nabble.com/file/p28229865/Untitled.jpg 
-- 
View this message in context: http://old.nabble.com/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28229865.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


Re: Jmeter - Dynamic URL - How to record Script and Run.

Posted by VVikasV <v....@gmail.com>.
Hi Deepak / Tibo,

Thanks alot for the help. Now I am able to successfully corelate the URL..


=)=)
-- 
View this message in context: http://old.nabble.com/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28264944.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


Re: Jmeter - Dynamic URL - How to record Script and Run.

Posted by Felix Frank <ff...@mpexnet.de>.
On 11/03/2010 12:23 PM, Deviran wrote:
> 
> Hi,
> 
> I have a URL in which the ID is generated dynamically from the javascript.
> How do i get the value.
> It's not present in the previous response.
> 
> e.g., http://www.example.com/STATE_ID/1288781880203/Search.do

Hi,

typically, you will have no choice but to teach Jmeter to do the work of
the Javascript. In your test plan, this probably must be done with a
BeanShellPostProcessor or somesuch.

HTH,
Felix

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


Re: Jmeter - Dynamic URL - How to record Script and Run.

Posted by Deviran <ka...@gmail.com>.
Hi,

I have a URL in which the ID is generated dynamically from the javascript.
How do i get the value.
It's not present in the previous response.

e.g., http://www.example.com/STATE_ID/1288781880203/Search.do

Thanks,
Devi.

-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Jmeter-Dynamic-URL-How-to-record-Script-and-Run-tp532873p3248268.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


Re: Jmeter - Dynamic URL - How to record Script and Run.

Posted by TincaTibo <Ti...@gmail.com>.
Hi,

As Deepal said, This generated URL must be known by the client, or else It
wouldn't be able to request it. You ust always consider that all work is
done on the server, and that the client does not know anything about your
application before connexion to it. That's what lightweight inter/intra net
applications are all about.

Clear your user cache, and record your communications flow.
Once your client has sent a so called generated url, stop the recording, and
do a full text search on the last response(s) to find where the generated
part of the url is (just the
'KpFpetJdbqgVfuOGJABAqg<https://xx.xxx.xx.xx/WebObjects/IDMSAccount.woa/1/wo/KpFpetJdbqgVfuOGJABAqg/0.19>'
probably).
Then you make a regex or a beanshell script to extract it in a variable, and
add this variable in all you following requests.
I do it all the time to simulate SAP applications..

The only way you wouldn't find it would be that the generated part is
generated according to your client configuration or time. (I had this once).
If client configuration, resending the requests with the same client should
work.. so that's not the case. For other reasons, you should find the
generation code in the javascript. Or ask the developpers.

Rgds,
Tibo

On Thu, Apr 15, 2010 at 07:10, Deepak Shetty <sh...@gmail.com> wrote:

> >. FYI, there is no reference of the generated URL in the previous request.
> How then will the browser know what the url is? Check your app carefully.
> The browser cannot automatically request a url or post a value to a url ,
> the url itself has to be there either within the HTML or Javascript. If you
> cant figure it out , ask a developer from your team or if the application
> is
> internet facing provide details so we can access and see.
>
>
>
> regards
> deepak
>
>
>
> On Wed, Apr 14, 2010 at 9:33 PM, VVikasV <v....@gmail.com> wrote:
>
> >
> > Hi Deepak,
> > Thanks for your response. FYI, there is no reference of the generated URL
> > in
> > the previous request. I think the below solution will work only when the
> > dymamic content is in 'Name value' pair. But here the dynamic content is
> in
> > URL itself. I tried searching for the problem alot, but i am not able to
> > find a solution.
> >
> >
> > Deepak Shetty wrote:
> > >
> > > The generated url should be available in the previous request. you have
> > to
> > > extract it out , using a post-processor into a variable (usually a
> regex
> > > extractor) and then use that variable as the path in the next request.
> > > Similar problems have been discussed multiple times in the mail
> archives.
> > >
> > > regards
> > > deepak
> > >
> > >
> > > On Tue, Apr 13, 2010 at 6:21 AM, VVikasV <v....@gmail.com>
> > wrote:
> > >
> > >>
> > >> PFB, the problem I am facing with Jmeter.
> > >>
> > >> While recording script using Jmeter, when click the to validate the
> > user,
> > >> the control goes to  third party service, where I need to enter the
> user
> > >> details. Here I am getting a problem like, for each user the Url
> > >> generated
> > >> by the third party is different. The problem is still there if I am
> > >> trying
> > >> to login using the same login credentials. There is a part in the URL
> > >> which
> > >> changes with each login (that part is marked in the image below). So
> > when
> > >> I
> > >> am trying to run the recorded script, it is showing “session expired
> > >> error”.
> > >> Is there any way to overcome this problem?
> > >>
> > >> •A portion in the recorded URL is dynamic. It changes with every
> login.
> > >> •Since it the dynamic part is in URL, we are not able to apply
> > >> “Correlation”
> > >> to this.
> > >> •When we run the script it is throwing “Session Expired Error”.
> > >>
> > >> I want to correlate the marked portion in URL.
> > >>
> > >>
> >
> https://xx.xxx.xx.xx/WebObjects/IDMSAccount.woa/1/wo/KpFpetJdbqgVfuOGJABAqg/0.19
> > >>
> > >> I want to coorelate the part marked in bold in above URL.
> > >>
> > >> http://old.nabble.com/file/p28229865/Untitled.jpg
> > >> --
> > >> View this message in context:
> > >>
> >
> http://old.nabble.com/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28229865.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/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28251127.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
> >
> >
>

Re: Jmeter - Dynamic URL - How to record Script and Run.

Posted by Deepak Shetty <sh...@gmail.com>.
>. FYI, there is no reference of the generated URL in the previous request.
How then will the browser know what the url is? Check your app carefully.
The browser cannot automatically request a url or post a value to a url ,
the url itself has to be there either within the HTML or Javascript. If you
cant figure it out , ask a developer from your team or if the application is
internet facing provide details so we can access and see.



regards
deepak



On Wed, Apr 14, 2010 at 9:33 PM, VVikasV <v....@gmail.com> wrote:

>
> Hi Deepak,
> Thanks for your response. FYI, there is no reference of the generated URL
> in
> the previous request. I think the below solution will work only when the
> dymamic content is in 'Name value' pair. But here the dynamic content is in
> URL itself. I tried searching for the problem alot, but i am not able to
> find a solution.
>
>
> Deepak Shetty wrote:
> >
> > The generated url should be available in the previous request. you have
> to
> > extract it out , using a post-processor into a variable (usually a regex
> > extractor) and then use that variable as the path in the next request.
> > Similar problems have been discussed multiple times in the mail archives.
> >
> > regards
> > deepak
> >
> >
> > On Tue, Apr 13, 2010 at 6:21 AM, VVikasV <v....@gmail.com>
> wrote:
> >
> >>
> >> PFB, the problem I am facing with Jmeter.
> >>
> >> While recording script using Jmeter, when click the to validate the
> user,
> >> the control goes to  third party service, where I need to enter the user
> >> details. Here I am getting a problem like, for each user the Url
> >> generated
> >> by the third party is different. The problem is still there if I am
> >> trying
> >> to login using the same login credentials. There is a part in the URL
> >> which
> >> changes with each login (that part is marked in the image below). So
> when
> >> I
> >> am trying to run the recorded script, it is showing “session expired
> >> error”.
> >> Is there any way to overcome this problem?
> >>
> >> •A portion in the recorded URL is dynamic. It changes with every login.
> >> •Since it the dynamic part is in URL, we are not able to apply
> >> “Correlation”
> >> to this.
> >> •When we run the script it is throwing “Session Expired Error”.
> >>
> >> I want to correlate the marked portion in URL.
> >>
> >>
> https://xx.xxx.xx.xx/WebObjects/IDMSAccount.woa/1/wo/KpFpetJdbqgVfuOGJABAqg/0.19
> >>
> >> I want to coorelate the part marked in bold in above URL.
> >>
> >> http://old.nabble.com/file/p28229865/Untitled.jpg
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28229865.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/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28251127.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
>
>

Re: Jmeter - Dynamic URL - How to record Script and Run.

Posted by VVikasV <v....@gmail.com>.
Hi Deepak,
Thanks for your response. FYI, there is no reference of the generated URL in
the previous request. I think the below solution will work only when the
dymamic content is in 'Name value' pair. But here the dynamic content is in
URL itself. I tried searching for the problem alot, but i am not able to
find a solution. 


Deepak Shetty wrote:
> 
> The generated url should be available in the previous request. you have to
> extract it out , using a post-processor into a variable (usually a regex
> extractor) and then use that variable as the path in the next request.
> Similar problems have been discussed multiple times in the mail archives.
> 
> regards
> deepak
> 
> 
> On Tue, Apr 13, 2010 at 6:21 AM, VVikasV <v....@gmail.com> wrote:
> 
>>
>> PFB, the problem I am facing with Jmeter.
>>
>> While recording script using Jmeter, when click the to validate the user,
>> the control goes to  third party service, where I need to enter the user
>> details. Here I am getting a problem like, for each user the Url
>> generated
>> by the third party is different. The problem is still there if I am
>> trying
>> to login using the same login credentials. There is a part in the URL
>> which
>> changes with each login (that part is marked in the image below). So when
>> I
>> am trying to run the recorded script, it is showing “session expired
>> error”.
>> Is there any way to overcome this problem?
>>
>> •A portion in the recorded URL is dynamic. It changes with every login.
>> •Since it the dynamic part is in URL, we are not able to apply
>> “Correlation”
>> to this.
>> •When we run the script it is throwing “Session Expired Error”.
>>
>> I want to correlate the marked portion in URL.
>>
>> https://xx.xxx.xx.xx/WebObjects/IDMSAccount.woa/1/wo/KpFpetJdbqgVfuOGJABAqg/0.19
>>
>> I want to coorelate the part marked in bold in above URL.
>>
>> http://old.nabble.com/file/p28229865/Untitled.jpg
>> --
>> View this message in context:
>> http://old.nabble.com/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28229865.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/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28251127.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


Re: Jmeter - Dynamic URL - How to record Script and Run.

Posted by Deepak Shetty <sh...@gmail.com>.
The generated url should be available in the previous request. you have to
extract it out , using a post-processor into a variable (usually a regex
extractor) and then use that variable as the path in the next request.
Similar problems have been discussed multiple times in the mail archives.

regards
deepak


On Tue, Apr 13, 2010 at 6:21 AM, VVikasV <v....@gmail.com> wrote:

>
> PFB, the problem I am facing with Jmeter.
>
> While recording script using Jmeter, when click the to validate the user,
> the control goes to  third party service, where I need to enter the user
> details. Here I am getting a problem like, for each user the Url generated
> by the third party is different. The problem is still there if I am trying
> to login using the same login credentials. There is a part in the URL which
> changes with each login (that part is marked in the image below). So when I
> am trying to run the recorded script, it is showing “session expired
> error”.
> Is there any way to overcome this problem?
>
> •A portion in the recorded URL is dynamic. It changes with every login.
> •Since it the dynamic part is in URL, we are not able to apply
> “Correlation”
> to this.
> •When we run the script it is throwing “Session Expired Error”.
>
> I want to correlate the marked portion in URL.
>
> https://xx.xxx.xx.xx/WebObjects/IDMSAccount.woa/1/wo/KpFpetJdbqgVfuOGJABAqg/0.19
>
> I want to coorelate the part marked in bold in above URL.
>
> http://old.nabble.com/file/p28229865/Untitled.jpg
> --
> View this message in context:
> http://old.nabble.com/Jmeter---Dynamic-URL---How-to-record-Script-and-Run.-tp28229865p28229865.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
>
>