Step-by-Step Quick Record and Playback with TestComplete 4
Test and Monitor | Posted December 28, 2005

Here's a quick step-by-step example of how to create a simple automated record and playback test with TestComplete 4.


Recording a Script


The script that we will record is short and simple. This is to give you an idea of what needs to be done to automate a test, but not overwhelm you with tons of information. We will record the Windows Calculator to simulate keystrokes and mouse clicks.


Recording a script is the easiest way for a beginner to get a base script to work with. We will use VBScript as our scripting language and Microsoft Windows XP Professional for our operating system. To record the script:

  • Start TestComplete 4 and click File on the Menu bar then select New and click New Project
  • Accept all defaults for the new project
  • Click the Record button on the TestComplete 4 toolbar
  • TestComplete is now recording all user actions like typing and mouse clicks
  • Click the Windows Start button, click Run, type calc then click OK
  • The standard windows calculator should now be running
  • Type 34 into the calculator
  • Click the calculator's + button
  • Type 50 into the calculator
  • Click the calculator's = button
  • Click the calculator's Close button
  • Click the Stop button  on TestComplete's Recording toolbar


  • The script is now recorded, it should look similar to this listing:


    Script Playback


    Playing back your script is even easier than recording it. Once the recording has stopped, TestComplete displays the newly recorded script. To playback your script:


  • Select Unit1 and click the Run Script button in the Project Explorer, as shown in the figure below

    Click to display image
    Project Explorer


    Test Results


    After the script runs, the test results display:

    Click to display image
    Test Log

    In my next post I will provide step-by-step instructions of how to debug a  script.

  • Close

    By submitting this form, you agree to our
    Terms of Use and Privacy Policy

    Thanks for Subscribing

    Keep an eye on your inbox for more great content.

    Continue Reading

    Add a little SmartBear to your life

    Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox