Forum Discussion

ancybaby's avatar
ancybaby
Occasional Contributor
2 days ago

Testcomplete not executing interactive tests when triggered with TestComplete plugin .

Testcomplete is  not executing interactive tests when triggered with TestComplete plugin . Testcomplete plugin version used in Jenkins job is 2.9.2 . The agent us connected to Jenkins master  using JNLP for interactive execution . please help on this issue .

The Testcomplete plugin invocation script is as given below:

           testcompletetest actionOnErrors: 'NONE', credentialsId: 'UTAAdmin_User_Pass', executorType: 'TE', executorVersion: '15.0', generateMHT: true, sessionScreenResolution: '1680x1050', suite: "${env.Pjs}", useTCService: true, timeout: '21600', useTimeout: true , useActiveSession: true

Please find the log below

13:58:56 [TestComplete] The test execution started (TestAuto). 13:58:57 [TestComplete] Found TestComplete/TestExecute installations: 13:58:57 Type: TC, Version: 15.40.421.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 15\x64\bin\TestComplete.exe" 13:58:57 Type: TE, Version: 15.40.421.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe" 13:58:57 Type: TELite, Version: 15.40.421.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 15\x64\bin\TestExecuteLite.exe" 13:58:57 [TestComplete] Selected TestComplete/TestExecute installation: 13:58:57 Type: TE, Version: 15.40.421.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe" 13:58:57 [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. 13:58:57 [TestComplete] Launching the test runner. 13:58:57 [TestComplete] [WARNING] Unable to publish test results (xml data is empty). [Pipeline] }

4 Replies

  • From your logs, this warning stands out:

    [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.

    This usually happens because JNLP agents in Jenkins cannot create or unlock a desktop session, which is required for interactive TestComplete or TestExecute tests (like UI automation). So even though your pipeline includes:

    useActiveSession: true useTCService: true

    These settings are ignored in JNLP mode, and TestExecute can only run in the currently active session — assuming it's already unlocked and ready. That’s likely why your interactive tests aren’t running as expected.

    ✅ Recommended Fix: Switch to Windows Service Launch

    To allow TestComplete to run interactively, the Jenkins agent should be configured to run as a Windows service instead of using JNLP.

    Steps:

    1. In Jenkins:
      • Go to Manage Jenkins > Manage Nodes and Clouds > [Your Agent] > Configure
      • Change Launch method from:
      • “Launch agent via Java Web Start (JNLP)”
        to:
        “Launch agent via Windows Service”
    2. On the agent machine:
      • Install the Jenkins agent as a Windows service (if not already).
      • Run the service as a real user account (not Local System) — ideally the same user that runs TestExecute.
      • Ensure that user is logged in and the desktop is unlocked when the test runs.

    For reference: Running Tests in Jenkins – TestComplete Docs

    🔧 Optional Config Update (Recommended)

    Here’s a cleaned-up version of your testcompletetest step with a few adjustments:

    testcompletetest(
      actionOnErrors: 'FAIL',                    // Fails the build if test fails
      credentialsId: 'UTAAdmin_User_Pass',
      executorType: 'TE',
      executorVersion: '15.40',                  // Match installed version exactly
      generateMHT: true,
      sessionScreenResolution: '1680x1050',
      suite: "${env.Pjs}",
      useTCService: true,
      useActiveSession: true,
      timeout: '21600',                          // 6 hours
      useTimeout: true
    )
    

    💡 Tip:

    If you’re not tied to a specific TestExecute version, you can omit executorVersion entirely, and the plugin will automatically select the most recent installed version. This can help avoid mismatches if the machine has been updated.

    🧪 Diagnostic Steps (If Test Still Fails or No Results Are Generated)

    On the agent machine:

    • Does the test run correctly when executed manually using TestExecute?
    • Does it run in the currently logged-in user’s interactive session?
      • Run the test manually (outside Jenkins) and confirm it interacts with the desktop (e.g., opens windows, clicks UI elements).
      • If it doesn’t, there may be issues with the TestExecute configuration, user permissions, or session access.
    • ✅ Are .mht or other result logs being generated at all?
    • 🔍 Check the default TestComplete log folder "C:\Users\{your-user}\Documents\TestComplete 15\Log" or any custom results directory you’ve configured.

    In Jenkins:

    • 📁 Use this step to archive the .mht logs for post-job inspection:
    archiveArtifacts artifacts: '**/*.mht', allowEmptyArchive: true
    • ⚠️ Ensure that no cleanup steps (like cleanWs()) are deleting test results before they’re read.
    • 🧾 Review the Jenkins console log for signs of early termination or issues with launching the interactive session.

    🤖 AI-assisted response
    👍 Found it helpful? Click Like
    ✅ Issue resolved? Click Mark as Solution

    • ancybaby's avatar
      ancybaby
      Occasional Contributor

      Isn't java webstart for JNLP deprecated ?

      I was getting the same logs even when the test was working fine before. Please find the logs when test execution worked fine before jenkins upgrade.

       

      [TestComplete] The test execution started (XLVirtual/XLVirtualGroups/FULL). [TestComplete] Found TestComplete/TestExecute installations: Type: TC, Version: 15.69.139.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 15\x64\bin\TestComplete.exe" Type: TE, Version: 15.69.139.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe" Type: TELite, Version: 15.69.139.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 15\x64\bin\TestExecuteLite.exe" [TestComplete] Selected TestComplete/TestExecute installation: Type: TC, Version: 15.69.139.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 15\x64\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:\cygwin64\bin\cygpath -w '"C:\Program Files (x86)\SmartBear\TestComplete 15\x64\bin\SessionCreator.exe"' $ '"C:\Program Files (x86)\SmartBear\TestComplete 15\x64\bin\SessionCreator.exe"' ExecuteProcess '/c:""C:\Program Files (x86)\SmartBear\TestComplete 15\x64\bin\TestComplete.exe"" ""C:\Users\utaadmin\Documents\TestComplete 15 Projects\XLVirtual\XLVirtual.pjs"" /run /SilentMode /ForceConversion /ns /exit "/ExportLog:c:\jenkins-pspc\workspace\LTE\BeOn\BeOn_Android\XLVirtualAndroid-Product\1756958455186.tclogx" "/ExportLog:c:\jenkins-pspc\workspace\LTE\BeOn\BeOn_Android\XLVirtualAndroid-Product\1756958455186.htmlx" "/ErrorLog:c:\jenkins-pspc\workspace\LTE\BeOn\BeOn_Android\XLVirtualAndroid-Product\1756958455186.txt" "/ExportLog:c:\jenkins-pspc\workspace\LTE\BeOn\BeOn_Android\XLVirtualAndroid-Product\1756958455186.mht" "/project:XLVirtualGroups" "/test:FULL" /JenkinsTCPluginVersion:2.9.2' [TestComplete] Test runner exit code: 2. [TestComplete] [WARNING] Error: Unable to find an element by the specified selector.. [TestComplete] [WARNING] Errors occurred during the test execution. [TestComplete] The test execution finished (XLVirtual/XLVirtualGroups/FULL).

      • ancybaby's avatar
        ancybaby
        Occasional Contributor

        Also the tests works fine when I use SessionCreator from jenkins for executing tests. its just that it doesnot work with the Testcomplete plugin now. When it was working fine before , the agent was connected using JNLP.                                                                                  This log statement [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. was present even when the tests worked fine .

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    Looking at the messages that you have posted - Jenkins cannot create a new user session, like logging into the desktop, because JNLP connects within the currently logged-in user's session. Therefore, any "Run interactive user session" setting in the Jenkins TestComplete plugin is ignored. TestComplete or TestExecute will simply run in the current desktop session.

    This is just a warning, not an error, but it means TestComplete will only run properly if the desktop is available and unlocked, since JNLP cannot create sessions.

    Refer to https://support.smartbear.com/testcomplete/docs/working-with/integration/jenkins/index.html and https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlocked.html