See the "KeywordTest.Run" and "Running Keyword Tests" help topics.
Running Tests From Scripts
You can run keyword tests from scripts. The statement that executes a test has the following syntax:
Call KeywordTests.Test_Name.Run(Param1, Param2, Param3 ...)
KeywordTestsis the name of the project item. Test_Name stands for the name of the desired test.
Run is the method that is used to execute keyword tests. The method does not return any value.
Param1, Param2 and so on are values of the test parameters (if the test has parameters). You should specify the values for parameters in the same order, in which the parameters are displayed on the Parameters page of the KeywordTest Editor.
If the parameter has a default value, you may skip it in the call. If the parameter does not have a default value, it cannot be skipped.
If a test does not have parameters, just use the empty braces after the
Run method name.
P.S. I would highly recommend to read TestComplete's help documentation - it is very useful and informative (unlike documentation for a lot of other tools by different vendors).
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.