You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Andrius Kazimieras Kasparavičius <an...@andrius.org> on 2013/09/07 04:14:31 UTC
GET and POST in a single-redirect session
I need to crawl through few pages in a single session, while
retaining some data from previous pages, using both GET and
POST, i.e.:
1. I try opening page with GET
https://idp.domain.com/simplesaml/saml2/idp/SSOService.php?spentityid=https://dev-sso.domain.com/sp
2. Every time it redirects to a page with a *different* secret in URL and gives
cookies, again GET -
https://idp.domain.com/simplesaml/module.php/core/loginuserpass.php?AuthState=_0822c2fdecc8ab7b9879466a1405bf84e4acd04d74%3Ahttps%3A%2F%2Fidp.domain.com%2Fsimplesaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Dhttps%253A%252F%252Fdev-sso.domain.com%252Fsp%26cookieTime%3D13784896503. That page has username/password which is sent by POST then.
The problems I have when creating testing plan is that step 2.
should be retrieved from step 1. as the URL is different every
time. Simple follow redirects might work, but then I need to use POST for passwords after using GET in the first two steps, which is not possible?
I am not sure if jmeter can do this at all? Any other tool to
do such kind of load test?
Thanks,
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Re: GET and POST in a single-redirect session
Posted by Deepak Shetty <sh...@gmail.com>.
>but then I need to use POST for passwords after using GET in the first two
steps, which is not possible?
Im not sure I understand your problem - why is it not possible? These are
separate samples for Jmeter (from what I remember of SAML you might be
referring to the fact that the browser auto posts some data but that is a
separate http request and hence a separate http sampler for jmeter)
Note also you dont have to use follow redirects - you can choose not to
follow redirects on your samplers , extract the status code and Location
header (and any other data you want to extract) and make the request
yourself as a separate sampler
On Fri, Sep 6, 2013 at 7:14 PM, Andrius Kazimieras Kasparavičius <
andrius@andrius.org> wrote:
> I need to crawl through few pages in a single session, while
> retaining some data from previous pages, using both GET and
> POST, i.e.:
> 1. I try opening page with GET
>
> https://idp.domain.com/simplesaml/saml2/idp/SSOService.php?spentityid=https://dev-sso.domain.com/sp
> 2. Every time it redirects to a page with a *different* secret in URL and
> gives
> cookies, again GET -
>
> https://idp.domain.com/simplesaml/module.php/core/loginuserpass.php?AuthState=_0822c2fdecc8ab7b9879466a1405bf84e4acd04d74%3Ahttps%3A%2F%2Fidp.domain.com%2Fsimplesaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Dhttps%253A%252F%252Fdev-sso.domain.com%252Fsp%26cookieTime%3D13784896503.
> That page has username/password which is sent by POST then.
>
>
>
> The problems I have when creating testing plan is that step 2.
> should be retrieved from step 1. as the URL is different every
> time. Simple follow redirects might work, but then I need to use POST for
> passwords after using GET in the first two steps, which is not possible?
>
>
> I am not sure if jmeter can do this at all? Any other tool to
> do such kind of load test?
>
> Thanks,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>
Re: GET and POST in a single-redirect session
Posted by Flavio Cysne <fl...@gmail.com>.
Suggestion:
Disable 'Follow Redirects' and do each request in a separate HTTP Request
sampler.
Add Regular Expression Extractors to reuse needed values on next sampler.
-----
But, I think you don't need to disable 'Follow Redirects'.
If I understood it right, you have 3 requests. The first HTTP Request
sampler executes 2 requests (GET -redurect- GET) and the second HTTP
Request is the POST.
Regular Expression Extractor works even with redirects, indeed the last
request in the chain of redirects is the one it uses to extract variable
values.
Hope it helps.
2013/9/6 Andrius Kazimieras Kasparavičius <an...@andrius.org>
> I need to crawl through few pages in a single session, while
> retaining some data from previous pages, using both GET and
> POST, i.e.:
> 1. I try opening page with GET
>
> https://idp.domain.com/simplesaml/saml2/idp/SSOService.php?spentityid=https://dev-sso.domain.com/sp
> 2. Every time it redirects to a page with a *different* secret in URL and
> gives
> cookies, again GET -
>
> https://idp.domain.com/simplesaml/module.php/core/loginuserpass.php?AuthState=_0822c2fdecc8ab7b9879466a1405bf84e4acd04d74%3Ahttps%3A%2F%2Fidp.domain.com%2Fsimplesaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Dhttps%253A%252F%252Fdev-sso.domain.com%252Fsp%26cookieTime%3D13784896503.
> That page has username/password which is sent by POST then.
>
>
>
> The problems I have when creating testing plan is that step 2.
> should be retrieved from step 1. as the URL is different every
> time. Simple follow redirects might work, but then I need to use POST for
> passwords after using GET in the first two steps, which is not possible?
>
>
> I am not sure if jmeter can do this at all? Any other tool to
> do such kind of load test?
>
> Thanks,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>