Forum Discussion

kixosvk's avatar
kixosvk
New Contributor
9 years ago
Solved

TestComplete 'Jenkins Job' with parameters

Hi all, 

 

is somehow possible to run Jenkins 'Test Complete test' job but with parameters ?

 

When i configure this kind of job with parameters (e.g. ENV, BROWSER or TEST_NAME, etc)  these are not sent to testcomplete / testexecute.

 

How are you solving this situation ?

 

Thanks.

  • Hi Kixosvk,

     

    I’m not familiar very well with your requirements. However, you can try using the following approach:

    1. Enabling the This build is parameterized option in Jenkins.
    2. Specify your parameters and their values.
    3. In the TestComplete Test build step, you can pass those parameters to TestComplete via ${ParameterName}
    4. In TestComplete, you will need to modify your project accordingly to your parameters.

    Please read the Setting up TestComplete Tests in Jenkins ( http://smartbear.com/viewarticle/70358/ ) article for details.

    Does this approach work for you? If it doesn’t, please describe your task in details.

9 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Kixosvk,

     

    I’m not familiar very well with your requirements. However, you can try using the following approach:

    1. Enabling the This build is parameterized option in Jenkins.
    2. Specify your parameters and their values.
    3. In the TestComplete Test build step, you can pass those parameters to TestComplete via ${ParameterName}
    4. In TestComplete, you will need to modify your project accordingly to your parameters.

    Please read the Setting up TestComplete Tests in Jenkins ( http://smartbear.com/viewarticle/70358/ ) article for details.

    Does this approach work for you? If it doesn’t, please describe your task in details.

    • kixosvk's avatar
      kixosvk
      New Contributor

      Hi Tanya, 

       

      big thanks to you it works !

       

      Before i tried to call params with %ParamName% , that was the Problem.

       

      A have maybe another question:

       

      Is somehow possible to send params to TestComplete i mean in command line way (for late processing in TestComplete with 'BuildIn' class ) ? 

       

      For example:

      'TestName' param i will use in TestComplete Test build step but others (EnvName, BrowserName) i want only send to TestComplete in command line. Is that possible ? I will be very thanksfull if this is somehow possible.

       

       

       

       

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        I’m glad that my solution works for you :)

         

        As for your question, right now, there is no way to pass TestComplete command line parameters from Jenkins. You can submit a feature request here so that other community members could vote for it.

         

    • madeshwaran's avatar
      madeshwaran
      Occasional Contributor

      Hi Kixosvk,

       

      I am trying to pass the parameter from jenkins to Testcomplete. here is what i did.

       

      I have created a Build with parameters in jenkins with a name Env_Val

       

      Then in the testComplete, i created a method with parameter.

       

      Then i set the value as Param1(value=${Env_Val}).

       

      But i am not able to get the parameter value from jenkins to Testcomplete. Am i doing something wrong or if you hve any step by step procedure, then that would be really helpful

      • baxatob's avatar
        baxatob
        Community Hero

        Hi, 

         

        Use "Additional command line arguments" in Jenkins -> Job -> Build (TestComplete Test) -> Settings

         

        Then you can get it using BuiltIn.ParamStr() in TestComplete

         

         

    • DavidE's avatar
      DavidE
      Contributor

      Tanya,

       

      It appears that the link you provided is no longer valid.  I get a 404 error.  Is this document available elsewhere now?

       

      Thanks!