jenkinstestcomplete

TestComplete test parameter through Jenkins


I have multiple instances of a website and I would like to test them by using TestComplete. I have wrote a scenario with the instance URL as a test parameter and it works when I run it with TestComplete GUI.

My problem is that I would like to do the same thing but through Jenkins. I cannot find how to pass a parameter to the test through my job. It always take the default value.


Solution

  • I have found the solution:

    1. Add a parameter to the Jenkins job
    2. Enter this parameter in the Additional command line arguments field of TestComplete plugin (write your variable with a '$' for example if your parameter is named websiteUrl write $websiteUrl)
    3. In your test replace the value you want to change by BuiltIn.ParamStr(BuiltIn.ParamCount()) (this will retrieve the last parameter passed to TestComplete == your parameter)