Forum Discussion

AssiaDerias's avatar
AssiaDerias
Occasional Contributor
9 years ago

Application Stopped responding

Hi

I realized a web project that contains 109 test with Keyword tests and  sripting, each tests work fine,  but when I run the all together, and before the execution ends,  The system stops and displays the following error at 108 test "An error  occured", in second time I have the  other error "Your Windows is destroyed" and errors is repeated each time i run the project.

I checked the option in tes complete like: propreties=  tree model  and  Web page loading timeout, ms=60000

I noticed that, when I click right with the mouse,  more than one web page of the application are opened, even if i closed them it happen the same error

 

Please could you give me somme advice and track for this error

 thanks for advance

 

  • So you have 109 tests.

     

    When run in isolation, each test is fine.

     

    When run in sequence, one after the other, it fails.

     

    Pretty simple then. One of your tests is leaving things in a state that the next one can't work with. You mention multiple pages being open? Is it meant to be like that? If a test expects to start with no browsers open, and your previous test has left a bunch open, then you're going to have problems.

     

    Automated tests generally require a solid baseline/start point. If you're not providing that, expect problems.

    • AssiaDerias's avatar
      AssiaDerias
      Occasional Contributor

      Thank you for your response

       

      But  in all my test I have  only  -The RUN Browser- activated in the first Test (Test 1)and -Close Browser- at the end (test 109)

      according to my logic,  I think its problem of  name mapping is't it? 

      Please do you have other solution

      Thank you

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Actually, no... I don't think it's name mapping as such.  I think what is happening is that you are getting a reference to an object, then you are doing something else, then you are going back to that object and, in that intervening interval, that object you had reference to was destroyed and recreated.  The original handle to the object is invalid.

        Hence the question of examining what's going on in Test 108... specifically, what line of code is getting the error and what is it expecting at that point in time.  And, likewise, you need to double check that, whever is going on there, it's not going to be sensitive to what happened in Test 107.  

        One POSSIBLE scenario to investigate... and this is just a guess but it is an example of what COULD happen.

        Test 107 grabs a reference to an object and throws it into something like a global variable or a project variable or something.  Test 108 uses that same variable in it's code to reference the same object and, perhaps, if that reference isn't there, it refreshes it somehow (reassigns the variable, performs some other steps, etc). 
        However, Test 107 ends up doing something that actually destroys the object so that the reference is still there (variable is not NULL) but the underlying object is no longer valid.  Test 108 sees the reference is not NULL and tries to use it only to find that the object was destroyed in the intermediate time.

        Again..., this is a POSSIBLE scenario and, since we don't actually have your test cases here, should only be treated as a guess.  The exercise of determining what EXACTLY is happening is left up to you to do the necessary leg work.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    This is not a matter of a web page time out or an improper tree model... The message you mention has to do with attempting to access an object that, between the time you "find" it and when you attempt to interact with it, it gets destroyed and, perhaps, recreated.  So, the problem is, probably, somewhere in test 108.

    Can you narrow down where it happens and either post the relevant code here or a screenshot of the keyword test?

     

    EDIT - Yeah, what Colin_McCrae said... I'm guessing that test 107 is not leaving the environment in a state that test 108 likes... So, take a look at 108, figure out where the code is failing, and then, from there, determine what pre-requisites are not being met in code 107 that would cause that failure.