Step-by-Step Quick Record and Playback with TestComplete 4
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:
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
After the script runs, the test results display:
In my next post I will provide step-by-step instructions of how to debug a script.