Showing results for 
Search instead for 
Did you mean: 

Provide the commandline params for run method as well

0 Kudos

Provide the commandline params for run method as well

Hi everyone


I have already discussed this thing with support (case 00344903). The application that I'm testing supports command line parameters. There are few built-in ways in TestComplete how we can provide the command line parameters for the TestedApp object:

1. Using the RunAs method - but this one requires to provide the user details (name, password and domain)

2. Using the Run method by providing the TestedApp.Params.ActiveParams.CommandLineParameters = params


The second option actually modifies the TestedApp object without an ability to save the object. 


The approach is to provide the commandline params for Run method as well as for RunAs method




Community Hero

Is there a reason why you must use TestedApp?  Can you use the WShell object to execute a command line for your application?  Or set your tested app to run a batchfile that you edit and save at startup?

The reason I say so is that I'm not sure how feasible it is to write such an object to disk at run time.  The run-time TestedApp object is exactly that... runtime.  It exist ONLY in runtime as an in-memory object for the app that you're executing.  What you're proposing is editing the XML formatted file that is read into memory for that runtime object.  While it probably can be done, it seems like a problem with the current TestComplete execution architecture... much like altering script code or keyword tests at run time.

Occasional Contributor

Hi @tristaanogre 


I agree with you that it might be not very good idea to save the testcomplete object at runtime. To me it is kind of the workaround. Ideally I would like to have an ability to run the TestedApp using Run method with the CMD line parameters as using RunAs method. I know that there are different workarounds that I can use. However, to me it is a bit strange that I can modify the TestedApp object during the script execution that will prompt the other QA specialist to save when he close the project. 


Maybe I should just change the description to have an ability to execute with cmd lines parameters using Run method same as RunAs method in runtime.



Community Hero

I'd go along with that... provide the commandline params for run method as well.