Now we can run our simple test to see how TestComplete simulates user actions.
Before running a recorded test, make sure it starts with the same initial conditions as the recording did. For instance, the test almost always requires the tested application to be running. So, before simulating the user actions, you should launch the application. In our case, to launch our tested application, we use the Run TestedApp operation at the beginning of the test, so the test will launch it for us. Alternatively, you can run the tested application manually from the TestComplete IDE.
To run the recorded test, simply click Run on the test editor toolbar:
The test engine will minimize the TestComplete window and start executing the test commands. In our case, the test will simply repeat your recorded actions.
|Note:||Do not move the mouse or press keys during the test execution. Your actions may interfere with actions simulated by TestComplete, and the test execution may go wrong.|
After the test execution is over, TestComplete will restore its window and display the test results. In the next step, we will analyze them.
Some notes about the test run:
The created tests are not compiled into an executable for test runs. You run the tests directly from TestComplete. To run tests on computers that do not have TestComplete installed, you can use a resource-friendly utility called TestExecute. You can also export script code (if you use it) to an external application and run it there. For more information on this, see Connected Applications - Overview and Self-Testing Applications.
During test execution, TestComplete displays an indicator in the top right corner of the screen:
The indicator displays messages informing you about the simulated test actions.
TestComplete executes the test commands until the test ends. You can stop the execution at any time by clicking Stop on the Test Engine toolbar or in the indicator, or by selecting Test > Stop from the TestComplete main menu.
You can pause the test execution by clicking Pause. During the pause, you can perform any actions needed. For instance, you can explore the test log or check the test variables and objects using the TestComplete Watch List or Locals panel or the Evaluate dialog (see Debugging Tests).
To launch the test we used the Run button on the test editor toolbar. This is only one of several possible ways to run the test. You can also run tests from the Project Explorer or from another test. You can also use the Execution Plan editor to create a batch run.
For complete information on running tests in TestComplete, on project settings that affect the runs and on the test execution, see Running Tests.