Forum Discussion

sarvpreetsidhu's avatar
sarvpreetsidhu
Occasional Contributor
3 years ago

Not able to run tests on jenkins

Created a new jenkins job & tried to run testcomplete tests, but it keeps getting stuck at launching stage

 

[TestComplete] Launching the test runner.

$ '"C:\..\15\x64\bin\SessionCreator.exe"' ExecuteProcess '/c:""C:\..\\bin\TestComplete.exe"" "C:...\...\..\testComplete\Converter\TestComDemo.pjs" /run /SilentMode /ForceConversion /ns /exit "/ExportLog:C:\..\\1649716890761.tclogx" "/ExportLog:C:\..\1649716890761.htmlx" "/ErrorLog:C:\..\\1649716890761.txt" /JenkinsTCPluginVersion:2.8.1' 

couple of things i am seeing in console output

- its able to locate version of testcomplete & testexecute

- getting warning-[TestComplete] [WARNING] The node is connected via Java Web Start (JNLP). In this mode, the "Run interactive user session" property of the TestComplete Test step is ignored.

  • Ok. I did try running the following command in cmdline (TestComplete.exe "C:\..\..\TestComDemo.pjs" /run /SilentMode /ForceConversion /ns /exit) & it ran the tests without issue. I think the issue is in jenkins setup. Here are some screenshots of jenkins freestyle job. 

  • I tried updating login at active session step but it didnt resolve the issue. FYI, I am providing user login for node under which jenkins is running. Also I am downloading repo(SCM) in this jenkins job & that is working fine.

  • npaisley's avatar
    npaisley
    3 years ago

    This could also be related to the type of license you are using for TestComplete.

     

    If you use SmartBear License Management to control your TestComplete (and TestExecute) licenses, you can specify the access key assigned to your SmartBear account. This key will be used to license the TestComplete (TestExecute) instances that will run tests.

     

    If that is not setup correctly it can cause the same type of issue. We have information for this in the document below.

     

    Configuring Jenkins Freestyle Jobs to Run TestComplete Tests;

    https://support.smartbear.com/testcomplete/docs/working-with/integration/jenkins/running-tests.html

  • Hello,

     

    Thank you for that information! 

     

    Everything looks good from what I can see. I have been attempting to duplicate your issue and I was able to do so by either A. removing my credentials for the active user session or B. by providing improper credentials. Either scenario results in my job sitting indefinitely. 

     

    I think the issue here lies within the credentials being passed for the 'interactive user session'. 

    For instance, a common issue on Windows nodes is requiring to setup an Active Directory credential for machines that use AD, the screenshot below is an example of how I have to setup my instance.

     

     

    I would experiment with the credentials used for login into the machine you are running these jobs on, I'm almost certain that is where the problem is.

    • sarvpreetsidhu's avatar
      sarvpreetsidhu
      Occasional Contributor

      I tried updating login at active session step but it didnt resolve the issue. FYI, I am providing user login for node under which jenkins is running. Also I am downloading repo(SCM) in this jenkins job & that is working fine.

      • npaisley's avatar
        npaisley
        Staff

        This could also be related to the type of license you are using for TestComplete.

         

        If you use SmartBear License Management to control your TestComplete (and TestExecute) licenses, you can specify the access key assigned to your SmartBear account. This key will be used to license the TestComplete (TestExecute) instances that will run tests.

         

        If that is not setup correctly it can cause the same type of issue. We have information for this in the document below.

         

        Configuring Jenkins Freestyle Jobs to Run TestComplete Tests;

        https://support.smartbear.com/testcomplete/docs/working-with/integration/jenkins/running-tests.html

  • Hi sarvpreetsidhu

     

    Do you ever see any errors in the console output? If so, may you provide the entire console log from a failed session so that we can see what the 'Test runner exit code' is? 

    • sarvpreetsidhu's avatar
      sarvpreetsidhu
      Occasional Contributor

      Hi Nick, I am not seeing any error code. it keeps running for hours without doing anything. Here is the console output

      [TestComplete] The test execution started (TestComDemo).
      [TestComplete] Found TestComplete/TestExecute installations:
      	Type: TC, Version: 15.20.341.7, Path: "C..\bin\TestComplete.exe"
      	Type: TE, Version: 15.31.374.11, Path: "C..\bin\TestExecute.exe"
      	Type: TELite, Version: 15.31.374.50, Path: "C..\bin\TestExecuteLite.exe"
      [TestComplete] Selected TestComplete/TestExecute installation:
      	Type: TC, Version: 15.20.341.7, Path: "C..\bin\TestComplete.exe"
      [TestComplete] [WARNING] The node is connected via Java Web Start (JNLP). In this mode, the "Run interactive user session" property of the TestComplete Test step is ignored. TestComplete (or TestExecute) will work in the current user session.
      [TestComplete] Launching the test runner.
      $ '"C..\bin\SessionCreator.exe"' ExecuteProcess '/c:""C..\bin\TestComplete.exe"" "C..\testComplete\Converter\TestComDemo.pjs" /run /SilentMode /ForceConversion /ns /exit "/ExportLog:C..\TC_Converter\1649740744075.tclogx" "/ExportLog:C..\TC_Converter\1649740744075.htmlx" "/ErrorLog:C..\TC_Converter\1649740744075.txt" /JenkinsTCPluginVersion:2.8.1'
      [TestComplete] [WARNING] Unable to publish test results (xml data is empty).
      Build was aborted

       

      • npaisley's avatar
        npaisley
        Staff

        Hello,

         

        Thanks for the updated console log. Looking at the commands I see you are using the session creator. Although since you are using JNLP, I'm not sure this would be required. 

         

        Can you tell me how you are building the commands for the pipeline? For instance, are you using our Jenkins plugin to build out the commands required for execution? Would it be possible for you to provide a screenshot of the 'Build' section of your pipeline so we can see how it is setup?

         

        Something I also do when troubleshooting issues such as this, is take the command line operation that is built and simply execute it manually from a CLI. In your case it would be the 'ExecuteProcess' with full paths. This would help you determine if the issue lies within the test, the command line operation or with Jenkins itself.

        ExecuteProcess '/c:""C..\bin\TestComplete.exe"" "C..\testComplete\Converter\TestComDemo.pjs" /run /SilentMode /ForceConversion /ns /exit"