Forum Discussion

Tank302's avatar
Tank302
Occasional Contributor
3 years ago

Name Mapping for web application testing.

Historically, many web application testing projects have been written using name mapping. And during tests, name mapping often stops working. Here is an example of 6 test cases. I run 2 functions three times. It doesn't matter what their order is, but name mapping always stops working on the 6th test case.

 

The problem is solved if after 5 test cases close and open the browser. But this is incorrect and time consuming.

Help please.

 

 

9 Replies

  • I imagine this is caused due to timing. We could quickly test this by adding a hardcoded delay, and if that solves the problem, optimize the delay by making it dynamically wait for an object to be visible, enabled or exists. 

  • Tank302's avatar
    Tank302
    Occasional Contributor

    Thank you very much for your help, but unfortunately nothing helped. I run the same test case 6 times and it always falls in the same place, although 5 times before it was successful.

     

    What else could be?

     

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      I think that as per log message, you must figure-out why TemplateGuide object appears to not exist for the sixth test. Use debugger and general knowledge of your tested application to figure this out. The reasons might be different - restarted application, changed identification parameters for TemplateGuide object, delayed creation of the object, etc. This is something that is very difficult to diagnose remotely without knowing your test code and tested application.

      But personally I would put my efforts to find the reason of why TemplateGuide object disappears for the sixth test (or on six iteration).

       

  • Tank302's avatar
    Tank302
    Occasional Contributor

    Exactly! I can't understand why I run the same test case 5 times and namemapping stops working 6 times.

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      Set a breakpoint on the line that errors out and set breakpoint to trigger on the sixth pass. Then investigate in debugger if the object exists. Try to figure out what might be the reason if the object does not exist.

       

      • Tank302's avatar
        Tank302
        Occasional Contributor

        Here is a screenshot below. When I run the same test case 6 times, the "Done" button is no longer visible for name mapping. Why so? Nothing changes. I just run the same test case 6 times.