Firstly, what is causing the 20+ delay? Do you have a global timer in force? 
But if this is also happening in postman it is very unlikely it is anything to 
do with the tool you are using.

In your original statement you said jmeter is taking 20+ seconds to load the 
response, I do not understand where you get this assumption from, jmeter 
doesn't actually load anything. No parsing or rendering takes place unless you 
try to look at the response in a listener but this is does asynchronous the to 
the transaction itself.

What are the resulting different times for this transaction type as reporting 
in jmeter?

But you main concern seems to be the assertions are not working when the 
landing page is present as a result of redirects instead of the challenge page. 
Have you included a view results tree to see what is actually coming back in 
both the redirects and they final stop?

-----Original Message-----
From: Gratzer, Steve [mailto:steve.grat...@aciworldwide.com.INVALID]
Sent: 28 September 2017 22:51
To: JMeter Users List <user@jmeter.apache.org>
Subject: RE: Need some help with HTTP responses and Assertions.

Let me clarify.

The redirects are not the issue and they need to be followed to their 
conclusion.
The landing page is the only thing that takes 20+ seconds to load.
The landing page is automatically returned after successful login and if a 
challenge page is not presented.
Following the redirects are necessary so that I can determine if a challenge 
page needs to be dealt with before the script can proceed to the landing page.

Currently I am doing a POST for the password submittal using an HTTP sampler.  
If the challenge page is not returned then the last result will be the landing 
page.  Assertions at that point do not seem to work as expected (or at all from 
what I see).  This in turn forces me to do a GET HTTP sampler for the landing 
page.  This adds 20+ seconds to the script duration (which I believe to be an 
unnecessary step to do).



-----Original Message-----
From: Stuart Kenworthy [mailto:stuart.kenwor...@bjss.com]
Sent: Thursday, September 28, 2017 4:11 PM
To: JMeter Users List <user@jmeter.apache.org>
Subject: Re: Need some help with HTTP responses and Assertions.

Seeing the same behaviour in postman most likely points to an issue in the 
request structure or the system under test. Are you missing out some headings?

Or as I previously commented in another post, could it be and ancillary 
activity such as dns lookup and timeout causing the issue? Is your browser 
using a proxy config your jmeter or postman request is not using?

On 28 Sep 2017 21:07, Stuart Kenworthy <stuart.kenwor...@bjss.com> wrote:
On top of that, jmeter will not hold up the redirects due to an assertion. 
Jmeter will only assert on the final redirect not each redirect in turn. The 20 
second delay between redirects is unlikely to be caused by you asking for and 
assertion. Something else must be in play.

On 28 Sep 2017 20:32, Deepak Shetty <shet...@gmail.com> wrote:
Im not sure I understand your issue exactly but hopefully this will clarify a 
couple of things.

In JMeter , every request/response can be asserted against , but there are a 
couple of flags that control whether you can do it on JMeter with some 
implications for your test case.
The way I understand your issue is you are logging in , and then there are a 
bunch of redirects that take you to the home page (or some page) and you are 
writing asserts for this final page , but you'd rather write asserts for the 
first post ?
The HTTP Request in JMeter has the Follow Redirects which controls whether 
JMeter automatically follows redirects - If you do not want to this , then 
uncheck it. Once you do that you can inspect /assert the response returned . 
However your test script has to change to extract the URL being redirected to 
and then a new sampler that actually makes a new request for this URL.(You can 
use transaction controllers if you want both individual times and grouped up 
times)

So effective you can either do
Request 1 (Follow Redirects = true, redirect automatically false)
   (Request 2,3,4,..n)
   Assert final

OR
Request 1(Follow redirect = false, redirect automatically false)
+Assert1
+Regex extract , extract Location header into say url2) Assert 3xx
+response code

Request $url2 (follow redirects or not as required , if not then each redirect 
needs its own request)

Note however in most systems there is really nothing to assert against in 
Request 1 (other than status codes , if the system is issuing a redirect ) 
because there wont be a response - youll have to use a browser tool to 
understand the request/response for your application

regards
deepak










On Thu, Sep 28, 2017 at 10:24 AM, Gratzer, Steve < 
steve.grat...@aciworldwide.com.invalid> wrote:

> Currently I have a jmeter script that does a login to a site.  The
> issue I am running into is that when the login process completes, it
> goes through some redirects and finally drops you at the landing page.
> The landing page is what I am using assertions on.  Essentially, this
> works fine, but with one problem.  The landing page takes 20+ seconds
> to load.  So, when the script submits (POST) the password to proceed,
> jmeter takes 20+ seconds to load the response and then another 20+
> seconds to reload the page with a GET sampler to do assertions on.
>
> This looks ugly from a monitoring standpoint as those two actions
> consume
> 40+ seconds to complete.
>
> At this point, I would like to do the assertions against the resulting
> return of the POST sampler instead of doing an additional GET sampler
> which adds another 20+ seconds to the script duration, but it doesn't
> seem to work that way.  I am assuming that the POST sampler is what
> the assertions are having an issue with.  They do not alert for missing 
> content.
>
> So, I am wondering if there is something I am missing?  Is my
> understanding not correct, or am I trying to do something that isn't
> available?
>
> I do need to follow the redirects after submitting the password to
> check the final returned URL.  It may return a security validation
> page that the script has to address, so I can't turn that off.
> Optimally, I would like to find a way that I can run the assertions on
> the final return results of a POST request.  This way I won't be
> getting the page automatically after the POST and then having to do a GET in 
> order to perform the assertions.
>
> Jmeter version is 2.13 (not my choosing, that is what I have to use).
>
> Order of sequence:
>
>
>   1.  Establish session / Get login page
>   2.  POST username
>   3.  GET password page
>   4.  POST password
>   5.  Check for additional security URL
>   6.  GET landing page
>
> ________________________________
> [https://www.aciworldwide.com/-/media/aci-footer]<http://
> www.aciworldwide.com<http://www.aciworldwide.com>>
> This email message and any attachments may contain confidential,
> proprietary or non-public information. The information is intended
> solely for the designated recipient(s). If an addressing or
> transmission error has misdirected this email, please notify the
> sender immediately and destroy this email. Any review, dissemination,
> use or reliance upon this information by unintended recipients is
> prohibited. Any opinions expressed in this email are those of the author 
> personally.
>



The information included in this email and any files transmitted with it may 
contain information that is confidential and it must not be used by, or its 
contents or attachments copied or disclosed to, persons other than the intended 
addressee. If you have received this email in error, please notify BJSS. In the 
absence of written agreement to the contrary BJSS' relevant standard terms of 
contract for any work to be undertaken will apply. Please carry out virus or 
such other checks as you consider appropriate in respect of this email. BJSS 
does not accept responsibility for any adverse effect upon your system or data 
in relation to this email or any files transmitted with it. BJSS Limited, a 
company registered in England and Wales (Company Number 2777575), VAT 
Registration Number 613295452, Registered Office Address, First Floor, Coronet 
House, Queen Street, Leeds, LS1 2TW.
________________________________
 [https://www.aciworldwide.com/-/media/aci-footer] 
<http://www.aciworldwide.com> This email message and any attachments may 
contain confidential, proprietary or non-public information. The information is 
intended solely for the designated recipient(s). If an addressing or 
transmission error has misdirected this email, please notify the sender 
immediately and destroy this email. Any review, dissemination, use or reliance 
upon this information by unintended recipients is prohibited. Any opinions 
expressed in this email are those of the author personally.
B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  
X  ܚX KK[XZ[
 \ \ ][  X  ܚX P Y]\  \X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 \ \ Z[ Y]\  \X K ܙ B

The information included in this email and any files transmitted with it may 
contain information that is confidential and it must not be used by, or its 
contents or attachments copied or disclosed to, persons other than the intended 
addressee. If you have received this email in error, please notify BJSS. In the 
absence of written agreement to the contrary BJSS' relevant standard terms of 
contract for any work to be undertaken will apply. Please carry out virus or 
such other checks as you consider appropriate in respect of this email. BJSS 
does not accept responsibility for any adverse effect upon your system or data 
in relation to this email or any files transmitted with it. BJSS Limited, a 
company registered in England and Wales (Company Number 2777575), VAT 
Registration Number 613295452, Registered Office Address, First Floor, Coronet 
House, Queen Street, Leeds, LS1 2TW.

Reply via email to