Forum Discussion

Michael_St_Pete's avatar
Michael_St_Pete
Contributor
14 years ago

Loc of .exe is diff from com where TC is to com where Test Execute is being used

Created scripts using TC 8.0 and trying to execute them on computer where Test Execute is.  The .exe file that is being called is in a different location from the one computer to the other.  How can this be handled?

3 Replies


  • Hi Michael,





    You can pass a path to an executable file via the command line and use it to start your tested application in the test. Please refer to this How To article describing how to work with command-line parameters.


  • I am not trying to pass parameters to the .exe, I am trying to talk to an .exe that is in a different location.  The computer where the .exe is located is c:\dir\subdir\loc and the the computer where Test Execute is trying to run has the .exe located in c:\other\subdir\loc.  How can I still use my location on the Test Complete computer and still have it run on the Test Execute computer?

  • Hi Michael,





    The parameter will contain the path to a folder where the executable file of your tested application is stored. For example, you will run TestExecute by using the following command line:

    "C:\Program Files\Automated QA\TestExecute 7\Bin\TestExecute.exe" "c:\My Projects\MyProjSuite\MyProjSuite.pjs" /r "AppPath=C:\My Application\"





    At the beginning of your test, you need to get the value of the AppPath parameter (based on the "Pass parameters via the command line" article) and use it to start your tested application:



    function Test()

    {

      var appPathValue = // ... obtain the value of the AppPath parameter 

      TestedApps.Orders.Path = appPathValue;

      TestedApps.Orders.Run();

    }