Test succeeds, then fails, then succeeds

4 posts, 0 answers
  1. Dennis Minard
    Dennis Minard avatar
    8 posts
    Member since:
    May 2010

    Posted 07 May 2010 Link to this post

    Since we have Rad controls throughout our web applications, I'm trying out the trial version of WebUI Test Studio (Developer Edition) to see if it will work for all of our testing needs on these applications.  So far (after creating several tests), I'm quite impressed, but I do have a point of confusion/frustration that I cannot find any documentation or forum entry addressing.

    I one test for our login page.  I also have a series of tests that test the functionality of various other pages and I've set it up so that I first call the login page test, then go to the tests of the other pages.  It works very well, MOST of the time.

    I find that I can often run the test (chain of tests) successfully for several hours, modifying as I go, but when I close my Visual Studio (I'm using 2010 Ultimate) and reopen the solution later, or the next day, the same test that did work, no longer works.  Most of the time is fails on the login page test so it can't go to the children test(s). 

    To troubleshoot why the successful test fails, I've tried a variety of things (including closing and reopening VS) but I've not come up with what is causing this and what the solution is.

    I'm new enough at testing that I'm sure I'm just not understanding something simple, but does anyone have any advice or suggestions for me?

    Dennis
  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 07 May 2010 Link to this post

    Hi Dennis Minard,

    There are a wide variety of possible reasons why a test works one day and fails the next day. To be able to figure out how to improve the reliability of your tests we need to better understand exactly where and why it's failing. You say it often fails on the login page. In what way? Is it not accepting the login? Is not not clicking the login button? Can you tell us exactly in what way is it failing? Do you have a particular test step that it is failing on? Is there an error message when it fails?

    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.
  3. Dennis Minard
    Dennis Minard avatar
    8 posts
    Member since:
    May 2010

    Posted 07 May 2010 Link to this post

    Hi Cody,

    Upon further testing, it appears that I might be dealing with a timeout issue, the default 5 seconds might be ok some of the time, and at other times it might not be enough.  Hence the symptoms I'm experiencing where the test works only sometimes.

    The login test (which the other tests make use of) does only a few simple steps:
    1. Enter a user name
    2. Enter a password
    3. Click the login button to proceed to an intial "home" page which has a variety of controls including a RadMenu bar
    4. Make a specific selection in the RadMenu to proceed to a "client" page
    5. Do a validation on the client page to confirm I arrived at the right page

    The error (typically) that I kept getting (sporadically) was on the step in which I clicked on the RadMenu.  It said it didn't know what I was talking about (i.e. couldn't find the control).  I've increased the WaitOnElementsTimeout and so far it seems to work.  Also, because the error always occurs in the called test (login) and there is no specific info on which step of the login fails, I created a code behind file to include a Cleanup() override, as Nelson described in another forum entry, so that I get some feedback on the error.  We'll see.  Hopefully this is the solution.

    Dennis
  4. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 08 May 2010 Link to this post

    Hello Dennis,

    That sounds good and we are glad you get progress in resolving the problem. Thanks for posting this info and please let us know if further assistance is needed.

    Greetings,
    Konstantin Petkov
    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