You can schedule automated tests to run daily or nightly using the TestComplete command line and Windows Task Scheduler.
Create a Scheduled Task
-
In your Windows operating system, open the Control Panel. The way you do this depends on the Windows version you use. For example:
-
Windows 10: In the search box on the taskbar, type control panel, and then click Control Panel.
-
Windows 8: Move the mouse to the top right corner of the screen to open the Charms bar, then click Search and search for control panel.
-
Windows 7: Click Windows Start button > Control Panel.
-
-
In the search box of the Control Panel (in the top right corner), type schedule and then select Schedule tasks. This will open the Task Scheduler window.
-
Click Create task in the Actions panel on the right to create a new scheduled task. This will open the Create Task wizard.
-
Use the wizard to specify the task properties like name, time, user account and others.
-
In the Security Options group, select Run only when user is logged on.
-
Specify the instructions that will launch TestComplete:
On Windows 7:
On Windows 8 and later:
To test Windows Store applications:
Testing applications different from Windows Store applications.
Notes
-
For a description of the TestComplete command-line arguments, see TestComplete Command Line.
-
Use TestComplete exit codes to determine if the test run was successful. If you need to check whether the test was successful, you can create a batch file which will call TestComplete, specify command-line arguments for it and check the TestComplete exit code. You can find an example for this batch file in the TestComplete Exit Codes topic.
-
Enable the Run only when user is logged on option for scheduled tests. These tests cannot be run with the Run whether user is logged on or not option selected, because in this case, they run in a non-interactive session and cannot interact with the GUI.
Note that if you enabled the Run only when user is logged on option for a scheduled task, the computer must NOT be locked at the moment the task is triggered.
-
If you use Remote Desktop to connect to the computer where tests are scheduled, you need to disconnect from it using the tscon command. If you simply close Remote Desktop instead of using tscon, the remote computer will become locked and the scheduled GUI tests will fail.
TestComplete 32-bit executable is located in the <TestComplete>\Bin folder.
TestComplete 64-bit executable is located in the <TestComplete>\x64\Bin folder.
TestComplete 32-bit executable is located in the <TestComplete>\Bin folder.
TestComplete 64-bit executable is located in the <TestComplete>\x64\Bin folder.
See Also
Running Tests
TestComplete Command Line
TestComplete Exit Codes