Hi Matthew,
The RunRoutine and RunRoutineEx methods start the test execution and call the specified routine. I think that you should not start the execution every time you want to call a routine. If TestComplete is in the playback state, you can call a routine by using the 'Runner.CallMethod' method. You can find information on this method in the
Runner.CallMethod help topic.
If you are working with TestComplete from a Connected application, you can use the RunTest method to put TestComplete into the playing state. All run-time objects are accessible via their names in Connected applications. Please find more information in the '
Running Connected and Self-Testing Applications' help topic.
If the application you are working with is not a Connected application, you can run a routine with an endless loop by using the RunRoutine method and then call the needed script routines in the following way:
' The Runner object can be obtained only if a test is being executed
Dim Runner As Object = IntegrationObject.GetObjectByName("Runner")
' Calling a script routine
Call Runner.CallMethod("Unit1.TestArrParam", props, vals)