Forum Discussion

Arvind1's avatar
Arvind1
New Member
8 years ago

Failure in playback but successful record!!

Hi,

I am working on an OMNIS desktop application.I was able to record a particular functionality.

However,I was NOT able to play the same thing back.

 

The application launches on playback but the playback does NOT click on a particluar button to login.

Also,this is my first time with Testcomplete and I am completely lost on how to debug or fix this issue.

 

Thanks,

Arvind

3 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    When you say doesn't click, does it provide an error? How are you identifying the object you are wanting to click?

     

    More than likely, you have let test complete auto-generate a name mapping when you recorded your application, and there is some object in the hierarchy that has a dynamic property.

     

    Automatic name mapping is a great starting point, but will almost NEVER be reliable and requires manual configuration.

     

    I would recommend doing a lot of reading in the documentation, specifically: https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/index.html

  • I guess the problem is related to automatic name mapping used while recording the script. While recording test complete will select a set of properties using which it guess it can identify the control uniquely during playback. But this will not be the case during playback. We can see the properties test completes selected to identify it from the name mapping file. Now we can run the application and right click over the control in name mapping tree and select Highlight on screen. The control will be highlighted over the UI if it can be identified uniquely. If we cannot identify the control, use the Object spy and drag over the control and identify the property that got a different value compared to name mapping file. Remove this property and try to identify a set of properties using which the control can be identified uniquely. Best practice might be to map the control manually to the namemapping file and then do a record if at all required

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    There are MANY reasons why you would experience what you are experiencing.

     

    1) Timing - When you record a test, you are acting as a human being, taking your cues from the screen and the application as to when it is possible to click on a button, select a field, etc. Playback runs at "full speed" so the test may be attempting to do something that the application is not ready to.  This is why TestComplete provides a variety of methods to "wait" for the applciation to be ready.  You can start with https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/waiting-process-or-window-activation.html to get you started in these tasks

    2) Object Identification - TestComplete uses a technology called "NameMapping" which utilizes the hierarchy of objects in memory and the properties of those objects to identify those objects for interaction. Many times, there is a dynamic quality to application objects where certain properties that are typically used for NameMapping may change between executions of the tests.  This requires the TestComplete user to make modifications to the NameMapping that is generated on record to improve the reliability of the identification.  NameMapping is one of the core pieces of test automation using TestComplete and, therefore, if it is not done well, it can cause all sorts of issues.  I would highly recommend reading through all the documentation on NameMapping starting with https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/overview.html

    3) Coding Errors - I've seen, on occasion, that when you record a test, not all steps get recorded.  This especially happens on a machine that performs poorly. You may need to investigate the test case itself to make sure that all steps were recorded properly.  Start with https://support.smartbear.com/testcomplete/docs/testing-with/debugging/general-info/about.html to start evaluating your tests.  

     

    Now... for us to help you to figure out exactly what was going on with your test...   Are there any errors in your log after playback? If so, what are they? Can you provide a screenshot of the test you recorded, noting the step where it fails? We may ask for more information beyond that but that's where we can start.