Forum Discussion

Kirannandedkar's avatar
Kirannandedkar
New Contributor
6 years ago

Record and play doesnt work

I am trying to use record and play functionality in testcomplete. I clicked on record and then ran our application but it doesnt capture lot of things. Also looks like it cant identify lot of objects. Do i need to do coding in order to make this function properly?

3 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    First of all you should provide more details about your application and what you do to recognize application controls.

     

    Also note, that Record'n'Play is the worst way to create tests, because it produces a lot of hard code, however the most of modern applications use dynamic identifiers, which require more smart and tricky mapping.

    • Kirannandedkar's avatar
      Kirannandedkar
      New Contributor

      We have webapplication where customer use to send shipments to various transport companies. I am not doing anything to recognize control. I was under impression that when i click on record then it will record everything and play as it is. But things are not like that and i get error while running recorded tests again. I get error "there was an attempt to perform an action on a zero-sized window". I have searched for this answer and tried few solutions. First was to map object by selecting on screen exclusively and second was to go to Tools> options>Engine> Recording and then Record text input into simple editors as "Keys". I tried setting both "keys" and "SetText" but nothing works.

      I was testing record and play because i want non technical guy to record some test where he finds some bug and its more easier for us to replicate by watching those steps he recorded. But it looks like you need to do some changes in order to record and play and its not so easy for non techincal guy. Being technical i am myself struggling. Offcourse i have never used any testing tools before as i am not tester but a developer.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Automated testing and Automated testing tools are development... you are writing and executing code of a sort.  Even record and playback... all that consists of is a means to "easily" write code based upon UI interaction... but as baxatob notes, objects in the UI, especially in modern applications, have dynamic identification values so when you record the first time it DOES automatically map... but it uses the values at the time of record.  Playback, those values may change. 

         

        Additionally, when you are recording, you are, as a human being, making note of on-screen cues as to when to click the next button or enter the data field... the automation isn't watching those queues so, on playback, it tries to run at "full speed" and the application may not be ready for a click or text field or something. 

         

        So, while record/playback is a good "starting" point, to be able to playback with consistency, you need to spend development time in many different places: adjusting object identification to account for dynamically generated identification proprties, adjusting timing with "wait" code and and delays, using "if/then" logic to detect the presence of fields and objects on screen to give cue as to whether or not the automation can proceed, etc.

         

        This is the case for any automated testing tool... Selenium, UFT, TestComplete, AutoIT, etc...  

        For your purposes, I would suggest not using an automation tool like TestComplete. If you want to be able to see what someone did when they found a bug, have them do a screen video record using something like Jing or Snag-it to capture a video of their steps so you can see the reproduction.  DEFINITELY a non-technical solution, gives you, the developer, what you're looking for, and doesn't require the development practices intrinsic to automated testing. 

         

        Keep in mind that TestComplete is an automated test development tool and, as such, requires a set of skills that go along with developing automated tests not unlike any software development practice.