Forum Discussion

crem's avatar
crem
Occasional Contributor
8 years ago

make recording more reliable

I recorded some keyword test cases from about a month ago and they were working fine. Today when playback the recording, it complains that it cannot find objects. Nothing was change to application. How can I record test cases so that it's more reliable? Any suggestions is greatly appreciated.

3 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    You will likely have to make some adjustments to your recordings.  Everyone's software is different and runs on different machines and TestComplete can get you really close to what you need but some of the fine tuning you have to do on your own.

     

    If you are getting object not found messages and nothing has changed in the application, then it might be a timing issue.   Try putting a Delay right before a line that fails and see if waiting a little will help the object be found.  You can do that in a keyword test.

     

    If this is happening in many places, instead of adding many Delays, you can also change the time between all events in Project Properties -> Playback and all your test steps will run a little slower.  I've had to do that to accommodate the timing between running on my laptop and running on a vm.

     

    Later on, if you get comfortable with adding Code Snippets or creating scripts, you can use the Wait functions to fine tune things even more: 

    https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/waiting-process-or-window-activation.html

     

     

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Marsha_R's response is spot on.

      The only other thing I'd add is that, if you want to tweak the timing for specific operations and not just the global value, you can right click on any operation in your keyword test and select "Set Auto-Wait Timeout for Operations" to override that project default value for the specific operation.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    And, in case you prefer to record your tests, the recommended practice is to consider what UI objects the test will interact with, manually namemap them beforehand to ensure that the mapping uses stable and reliable identification parameters and only then record the test.