Forum Discussion

erikgt's avatar
erikgt
Occasional Contributor
19 days ago
Solved

TestExecute save log every ... minutes

Is it possible to let TestExecute, similarly as the functionality in TestComplete, save the log every ... minutes? We're occasionally running into the situation where a test hangs, and is killed by a timeout set in a Jenkins pipeline, making TestExecute end ungracefully; does a functionality to be able to still access a log file to help diagnose exist?

9 Replies

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

    When TestExecute ends ungracefully, there's no log files? There should be log files regardless, unless you machine is being wiped.

    Are you using any command line parameters for TestExecute?

    • erikgt's avatar
      erikgt
      Occasional Contributor

      [deleted] Still looking into this

  • erikgt's avatar
    erikgt
    Occasional Contributor

    As it turns out, the test results are in fact saved as-per the timeout in the TestComplete project! However, after the process being ended ungracefully through an external timeout, they are not being displayed in Jenkins:

    So it seems the issue might be with the TestComplete Jenkins plugin.

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

      You need to look at the Logs which Jenkins produces, from here, the information shown should give you a rough idea as to what the issue is. It might be relating to Jenkins configuration or it could be your automation scripts.

      • erikgt's avatar
        erikgt
        Occasional Contributor

        Thank you for your reply. Can you confirm that the TC Jenkins plugin should in fact display the log correctly in such a situation? 

        The Jenkins log on a gracefully ended test (with correct displaying of the test results):

        11:25:36  [TestComplete] The test execution started ({{projectName}}/{{module}}/{{testName}}).
        11:25:36  [TestComplete] Found TestComplete/TestExecute installations:
        11:25:36 Type: TE, Version: 15.70.4.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe"
        11:25:36 Type: TELite, Version: 15.70.4.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 15\x64\bin\TestExecuteLite.exe"
        11:25:36 [TestComplete] Selected TestComplete/TestExecute installation:
        11:25:36 Type: TE, Version: 15.70.4.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe"
        11:25:36 [TestComplete] Launching the test runner.
        11:25:36  $ '"{{testCompleteServicePath}}"' //LogonAndExecute //lDomain: "{{domain}}" //lName: "{{username}}" //lPassword: ******** //lTimeout: "-1" //lUseActiveSession: "true" //lCommandLine: '""{{testExecutePath}}" "{{projectFilePath}}/{{projectSpecificPath}}/backofficertp.pjs" /run /SilentMode /ForceConversion /ns /exit "/ExportLog:{{logExportPath}}/{{projectSpecificPath}}/1745573136247.tclogx" "/ExportLog:{{logExportPath}}/{{projectSpecificPath}}/1745573136247.htmlx" "/ErrorLog:{{errorLogPath}}/{{projectSpecificPath}}/1745573136247.txt" /project:{{project}} /test:{{test}} /DoNotShowLog /PSVar:MYSERVER=myServerName /JenkinsTCPluginVersion:2.9.2"'
        11:28:27  [TestComplete] Test runner exit code: 0.
        11:28:27  [TestComplete] The test execution finished ({{projectName}}/{{module}}/{{testName}}).

        On being aborted by Jenkins timeout:

        12:05:09  [TestComplete] The test execution started ({{projectName}}/{{module}}/{{testName}}).
        12:05:09  [TestComplete] Found TestComplete/TestExecute installations:
        12:05:09  	Type: TE, Version: 15.70.4.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe"
        12:05:09  	Type: TELite, Version: 15.70.4.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 15\x64\bin\TestExecuteLite.exe"
        12:05:09  [TestComplete] Selected TestComplete/TestExecute installation:
        12:05:09  	Type: TE, Version: 15.70.4.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe"
        12:05:09  [TestComplete] Launching the test runner.
        12:05:09  $ '"C:\Program Files (x86)\SmartBear\TestExecute 15\bin\TestCompleteService15.exe"' //LogonAndExecute //lDomain: "{{domain}}" //lName: "{{username}}" //lPassword: ******** //lTimeout: "-1" //lUseActiveSession: "true" //lCommandLine: '""C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe" "D:\Jenkins-rootdir\workspace\{{privatePath}}\backofficertp.pjs" /run /SilentMode /ForceConversion /ns /exit "/ExportLog:D:\Jenkins-rootdir\workspace\{{privatePath}}\1745575509747.tclogx" "/ExportLog:D:\Jenkins-rootdir\workspace\{{privatePath}}\1745575509747.htmlx" "/ErrorLog:D:\Jenkins-rootdir\workspace\{{privatePath}}\1745575509747.txt" /project:{{project}} /test:{{test}} /DoNotShowLog /PSVar:MYSERVER=myServer /JenkinsTCPluginVersion:2.9.2"'
        12:11:21  Cancelling nested steps due to timeout

        I'll open another topic on how to open the resultant log files, as the original question here has been answered :)