Forum Discussion

Novari-QA's avatar
Novari-QA
Frequent Contributor
8 years ago

Running TestExecute from Command Line with Dynamic Parameters

Good day All,

I was wondering if it was possible to run a specific test from the command line with 1 or 2 custom parameters. 

For example:
TestExecute.exe "C:\Work\SmartBear\TestExecute\Projects\My\MySuite.pjs" /r /p:MyProj \parms:Value

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Yup!  I do it all the time. In fact...

    Go download https://bitbucket.org/privateteamogre/scriptextensions/downloads/OgreUtilities.tcx and follow the help instructions for installing a script extension.  There's a method on that object (ogreUtils.getTCCommandLineParam) that examines the TC command line for any parameter of the format /<parametername>=<parametervalue>.  Feel free to adapt and use it however, as a courtesy, please give credit as due.

    • Novari-QA's avatar
      Novari-QA
      Frequent Contributor

      Thanks Tristaanogre, I'll take a look at it. If we do end up using it, I'll be sure to put credit!