SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Member
    Join Date
    Apr 2008
    Location
    UP,India
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Load response_info command for a timed out request

    Hi All,

    Can we execute the Load response_info command successfully after a Get request for which the request Timed out.

    Here is sample code for the same (IP has been modified)

    GET URI "http://192.168.00.00/ HTTP/1.0" ON 1 &
    HEADER DEFAULT_HEADERS &
    ,WITH {"Accept: */*", &
    "Accept-Language: en-us", &
    "Connection: Keep-Alive"}

    Synchronize Requests

    LOAD RESPONSE_INFO BODY ON 1 &
    INTO Homepagelogo &
    ,WITH "HTML(0)/BODY(2)/DIV(1)/DIV(0)/DIV(0)/A(0)/IMG(0):ATTRIBUTE:src(1)"

    Call Validate["CAR_logo.gif",Homepagelogo]

    ! Validate is a subroutine which validates the presence of CAR_logo.gif" in Homepagelogo variable to validate the page returned


    Now for this Get request I am getting "E* Request timed out for VU 2-14 on connection 13/1", which means that all the response has not been recieved from the server (may be some images or like that is yet to be recieved), but still I am able to successfully validate the presence of image "CAR_logo.gif" in the returned response by using the Load Response_Info command, and hence the page gets validated.
    So is this correct that the Load response_info commands executes even when the request timed out for that link.

    Hope my description is clear to you guys..

    Thanks a lot
    Namit
    Namit Jain
    Quality Assurance Lead, India
    CSTE Certified
    "A Cat looked at the mirror and what she saw was a Lion. Secret of success depends on how you see yourself."

  2. #2
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    > Can we execute the Load response_info command successfully after a Get request for which the request Timed out.

    No. There was no response so there is nothing you can load.

    > So is this correct that the Load response_info commands executes even when the request timed out for that link.

    Yes, it does. Use error trapping (ON ERROR command) or the RETURNING STATUS clause in GET/POST (followed by an IF test) to trap or recognize errors.

  3. #3
    Member
    Join Date
    Apr 2008
    Location
    UP,India
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    [ QUOTE ]


    No. There was no response so there is nothing you can load.



    [/ QUOTE ]

    Thanks Bernie for the reply. I used log command to see if the variable contains anything, and the log command displayed the "CAR_logo.gif" which clearly shows that load worked properly despite getting a Time out error.
    I am not able to figure it out why this is happening.

    Well I will use ON ERROR command to validate the same.

    Thanks once again Bernie

    Namit
    Namit Jain
    Quality Assurance Lead, India
    CSTE Certified
    "A Cat looked at the mirror and what she saw was a Lion. Secret of success depends on how you see yourself."

  4. #4
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    Are you sure the variable did not have that value before the get that timed out executed? The scope is local, right?

    If not, thats pretty strange and not at all what I would expect.

  5. #5
    Member
    Join Date
    Apr 2008
    Location
    UP,India
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    Yes Bernie I am pretty sure as this Get is for the Homepage for a Website and the Variable is used for the first time here after this get.

    I am posting the same code and the subroutine Validate to make it more clear

    ! Primary get
    GET URI "http://192.168.00.00/ HTTP/1.0" ON 1 &
    HEADER DEFAULT_HEADERS &
    ,WITH {"Accept: */*", &
    "Accept-Language: en-us", &
    "Connection: Keep-Alive"}

    Synchronize Requests ! this is where im getting a time out error
    LOAD RESPONSE_INFO BODY ON 1 &
    INTO Homepagelogo &
    ,WITH "HTML(0)/BODY(2)/DIV(1)/DIV(0)/DIV(0)/A(0)/IMG(0):ATTRIBUTE:src(1)"

    Call Validate["CAR_logo.gif",Homepagelogo]

    ! Validate is a subroutine which validates the presence of CAR_logo.gif" in Homepagelogo variable to validate the page returned


    subroutine validate [string,bodytext]
    SET j= ~LOCATE(string,bodytext), CASE_BLIND
    if (j<0) then
    log "Correct Page with ",string, " is not displayed"
    End Timer T_LOGIN
    exit
    else
    log "Correct Page with ",string," is displayed"
    end if
    RETURN
    END SUBROUTINE


    I have attahed the relevant result in the attachement with this post
    In the Attached results line 59 corresponds to the Synchronize Request after the primary get (for which there is a time out error)
    and line 568 corresponds to the Second log command in the called subroutine which validates the variable successfully.

    I hope that I am not making any silly mistake. Please ask for more information for more clarification.

    Thanks a lot
    Namit
    Attached Files Attached Files
    Namit Jain
    Quality Assurance Lead, India
    CSTE Certified
    "A Cat looked at the mirror and what she saw was a Lion. Secret of success depends on how you see yourself."

  6. #6
    Member
    Join Date
    Apr 2008
    Location
    UP,India
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    And yes Bernie the Scope of this Variable is local which also concludes that each VU will have his own copy of variable and will not mingle up with variable of other user

    Thanks
    namit
    Namit Jain
    Quality Assurance Lead, India
    CSTE Certified
    "A Cat looked at the mirror and what she saw was a Lion. Secret of success depends on how you see yourself."

  7. #7
    Member
    Join Date
    Apr 2008
    Location
    UP,India
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    Hi Bernie,

    Did you find anything wrong with the above script??

    Any suggestions will be highly welcomed.

    Thanks,
    Namit
    Namit Jain
    Quality Assurance Lead, India
    CSTE Certified
    "A Cat looked at the mirror and what she saw was a Lion. Secret of success depends on how you see yourself."

  8. #8
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    This may be related to a possible bug I've encountered recently.

    Try commenting out all "Connection: Keep-Alive" clauses for prior gets/posts on this connection and see if it fixes the problem.

  9. #9
    Member
    Join Date
    Apr 2008
    Location
    UP,India
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    [ QUOTE ]
    This may be related to a possible bug I've encountered recently.


    [/ QUOTE ]

    Hi Bernie,

    Could you please tell me the bug you had encountered.May be I will get a clue if anything is wrong with my script

    And as far as commenting out Prior "Connection:keep alive" statements for the same connection id is concerned, this is the first Get in the script, so this approach would also not work.

    Well what I think is that, Load response_info command always execute after the Synchronize requests, So in this case the Load response_info command tried to look for the CAR_logo.gif and is able to load the Variable Homepagelogo with the CAR_logo.gif image from the partial content that it has received before the request Timed out.
    I know that this is not possible but this is what I can think after seeing the result.


    Thanks Bernie for the suggestions

    Namit
    Namit Jain
    Quality Assurance Lead, India
    CSTE Certified
    "A Cat looked at the mirror and what she saw was a Lion. Secret of success depends on how you see yourself."

  10. #10
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Load response_info command for a timed out req

    [ QUOTE ]
    Could you please tell me the bug you had encountered.May be I will get a clue if anything is wrong with my script

    [/ QUOTE ]

    Here is the problem I thought might be related: I record a script and the wall clock time between pages was 5 seconds. I edit the script and change the 5 seconds to 1 minute. I play back the script and the second primary get (which is on the same conn id) fails with no data available on device even though I *know* the get worked. Seems that there is a case when keep-alive timers is in effect and a long delay is introduced between requests on the same connection id (much longer then was present during the recording due to script edits) that the connection times out, the second get fails, and OpenSTA fails to reissue the primary get as it should. While your case is a little different, I thought it was worth a try. Since your problem is happening on the FIRST primary get in the script, this is obviously not the case.




    [ QUOTE ]
    Well what I think is that, Load response_info command always execute after the Synchronize requests, So in this case the Load response_info command tried to look for the CAR_logo.gif and is able to load the Variable Homepagelogo with the CAR_logo.gif image from the partial content that it has received before the request Timed out.
    I know that this is not possible but this is what I can think after seeing the result.

    [/ QUOTE ]

    The load_response info command will execute after the SYNCHRONIZE REQUESTS command unless some fatal error occurs, which in your case has not. Timeouts simply cause the script to print an error message and then continue.

    Could it be that you did a primary get, then a bunch of related (secondary) gets and followed by a SYNCHRONIZE REQUESTS command? If so, then perhaps one of the secondary gets timed out.. but the primary get worked fine? That would explain what you are reporting. Check http data list for the user which had the failure and find the URL that had a response size of 0 in the timeframe where the error occurred. You will probably find that it was
    not the primary request which you are doing the load_response info on.

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:05 PM.

Copyright BetaSoft Inc.