Step timeout on page load

16 posts, 1 answers
  1. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 25 Jan 2012 Link to this post

    Hi,
    I have a test that loads a website that, because of security (and it's a unit server), redirects the page 2 or 3 times and takes about 20 seconds to more or less 1.5 minutes. I tried setting the WaitOnElements property to 360000 on both the step doing the navigating and the step following it, but nothing changes: the step times out 1 time out of 5, often on the first time it's been run in the hour.

    I've even added a test on top of my list to "preload" the pages so that the other tests pass (image attached).
    I would REALLY like to resolve this problem, since we want to integrate those tests with our daily builds.

    Thanks for any help you can give out.

    Sam
  2. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 25 Jan 2012 Link to this post

    Oh! I forgot to mention that the test doesn't wait 360000 mil.sec before failing. It waits a little while, but not 6 minutes. Last time I tried, it wait 35 seconds before failing.
  3. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 25 Jan 2012 Link to this post

    Hi Sam,

    I'm going to double check with software development but I'm pretty sure that the Navigate To test step doesn't even use the "Wait on elements" time out property (and it's a bug that our UI shows it on this step). I believe it's only used on steps that actually act on elements. It sets how long to wait for the target element(s) to exist before proceeding with the action.

    In your case I can recommend two things:
    1) Because you talk about redirection, you might try the "Wait for URL" step with a long timeout parameter. This is meant to be used where you know the final URL will be different from the current URL as the webserver is processing the request.
    2) Add a "wait for element exists" step via quick tasks as shown on this page. You can also set a very long time out on this type of test step.

    You can try either/both to see what works best. If it were me I'd probably implement both. Add a Wait for URL and follow that with a wait for element exists test step. Then you will have a clearer picture as to when/why a timeout occurred. 

    Regards,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 26 Jan 2012 Link to this post

    Hi Cody,
    Thanks for the reply. I already tried to implement the wait for URL (with 3600000 msec) after my button click, but the test fails on the button click step, as if it was waiting for the page to load before "stating" that the step was successful. Same thing with the "NavigateTo" step at the very beginning of the test. It waits for about 37 sec and then fails, without going over to the second step, which is the "WaitForURL" step.

    I attched a capture of the steps from one of my tests, having failed on the load. You can alaso see on step 19 that I have a wait after the button, but the test fails on step 18 (when we run that far)

    It's always on the first load of the pages, but still the tests should wait and not fail.. Anyway, anmy help would be welcomed.

    Thanks
    Sam
  5. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 26 Jan 2012 Link to this post

    Hi,

    I need to see the actual error message and stack trace before i can diagnose this type of failure. Just a screen shot of the failed step doesn't tell me anything other than "it's broken". Please export the failure details and shown in the 2nd image on this page and send me that .zip file. if you are worried about confidentiality you can create a private support ticket and attach the file to the new support ticket instead.

    Regards,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 26 Jan 2012 Link to this post

    Hi,
    Here is the exported error. Hope this will help.

    Sam
  7. Answer
    Cody
    Admin
    Cody avatar
    3354 posts

    Posted 26 Jan 2012 Link to this post

    Hi,

    Thanks that does help tremendously! What you're dealing with is a "Wait until ready" timeout condition. In other words Test Studio timed out waiting for the browser to say "I'm done downloading and rendering all the data for this website". There is a global setting for this which has a default value of just 30 seconds. It is the "Client ready timeout" setting as shown in the last figure on this page for quick execution. An equivalent setting exists in the Test List settings when running your tests as part of a test list..

    If you don't want to set it globally (which can make sense to have the timeout much shorter for the remainder of your test) you'll have to resort to performing your navigate step in code... but it's pretty easy. Try this:

    int oldValue = Manager.Settings.ClientReadyTimeout;
    Manager.Settings.ClientReadyTimeout = 360000;
    ActiveBrowser.NavigateTo("my website here");
    Manager.Settings.ClientReadyTimeout = oldValue;

    Kind regards,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 26 Jan 2012 Link to this post

    The second option seemed to be the best and I honestly thank you for all the help, but therre seems to be a problem with my test now. I modified my step in code like so:

    Dim oldValue as Int16 = Manager.Settings.ClientReadyTimeout
    Manager.Settings.ClientReadyTimeout = 180000
    Manager.Settings.ClientReadyTimeout = oldValue

    But now the test starts, I see the laucher window, the broswwer starts and then everything closes. The test says that it failed and that 0 passed out of 0 executed. I'm sure that I did something wrong, but I can't figure out what. Can you help me please.

    Thanks in advance
  9. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 26 Jan 2012 Link to this post

    Hi,

    Is there a test log? Any other error message beyond "failed and that 0 passed out of 0 executed"? Can you take a video of this happening? Jing is free and works well for this. Once you capture the video upload it to Screencast.com (also free) and send me the link to the video.

    Greetings,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 27 Jan 2012 Link to this post

    Hi,
    I'm sorry, but there is no test log and no other message. I was able to capture a small video, but sadly JING is blocked at work. I had to be a little creative and used CamStudio and zipped the file. Hope that it'll help, even though there's not much to see.

    Thanks again for all the help
    Sam
  11. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 27 Jan 2012 Link to this post

    Hi,

    Thank you for the video. Unfortunately I didn't learn anything from it after watching it. I'd like to look at this problem on your computer via GoToMeeting. Let me know what time zone you are in and your availability and I'll setup the meeting. I'm in Austin, TX which is Central Time (GMT -6).

    All the best,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 31 Jan 2012 Link to this post

    Hi Cody,
    Sadly, since I'm not admin of my workstation, I can't install anything that isn't automated by the company. I could, however, borrow my scrum master's laptop if you could use WebEx (that's the program that is available to us for video-conferencing). I'm in Quebec, Canada, which is Eastern time and I'm usually at work from 7 to 3:15pm.

    I'll be waiting to hear from you if this scenario is doable.

    Thanks again

    Sam
  13. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 31 Jan 2012 Link to this post

    Hello,

    You do not need to be an Admin on your box to use GoToMeeting (or install anything for that matter). GoToMeeting is really simply and easy to use and just runs automatically. It's really important that we do all the work on your actual main test development machine. Here is a meeting invite for 11:30am EST today. Please click on the link when you receive this and see if it works. If you get to a dialog that ways "Waiting for the meeting organizer" it is working perfectly. Let me know if it succeeds and we'll proceed with GoToMeeting. If it doesn't let me know as well and I'll come up with an alternative.

    1.  Please join my meeting.

    https://www2.gotomeeting.com/join/365484354

    2.  Use your microphone and speakers (VoIP) - a headset is recommended.  Or, call in using your telephone.

    Dial +1 (510) 443-0602

    Access Code: 365-484-354

    Audio PIN: Shown after joining the meeting

    Meeting ID: 365-484-354

    GoToMeeting®

    Online Meetings Made Easy™


    All the best,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 31 Jan 2012 Link to this post

    Hi Cody.

    Everything seems to work. I'm gonna have to call in though since they don't install audio cards on our development machines (VDI). Looking forward to our call. I'll prepare A project that we can experiment on, 'cause last time I tried to add the coded step, I couldn't run the project afterwards, and since I don't want to heck it up again...
  15. Sammy78
    Sammy78 avatar
    27 posts
    Member since:
    May 2010

    Posted 31 Jan 2012 Link to this post

    Hi Cody,
    At the risk of sounding like an incompetent, I'm going to have to cancel our meeting, since I don't want to waste your time. I tried the code again, in my new project (which is in source control, so I could always revert if it screwed up) and it seems to work. I still modified the global timeout in my test list, for my analysts, but now I know that if need arises, this solution should work.

    I've done nothing different, except change the variable from Int16 to Integer, since I had changed  the global timeout. It's still a mystery why the test failed like it did, but I can't reproduce the error. So I guess I'll just leave it be. 

    If any other problem pops up, I'll be sure to contact again.

    Thank you for all the help and I'm sorry if you wasted time on this.

    Sincerely
    Sam
  16. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 31 Jan 2012 Link to this post

    Hi,

    Nice, whatever works! I'll be here if you need further assistance.

    All the best,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top