Forum Discussion

shahid24's avatar
shahid24
Contributor
22 days ago

Test Execute exit code -1

HI,


I'm running text execute in silent mode from Jenkins and all tests pass but i get a return code of -1 and the Jenkins build is marked as failure. 

In the silent log i see 

17/02/2026 17:37:29:791 Tried to open the Save dialog. The default value: YES."

16:43:41 Started by upstream project "Ace/Platform/Build-3.14" build number 298

16:43:41 originally caused by:

16:43:41 Started by user  

16:43:41 Running as SYSTEM 16:43:41 [EnvInject] - Loading node environment variables. 16:43:41 Building remotely on ACE Agent (smoketest) in workspace E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test 16:43:41 No emails were triggered. 16:43:41 [ACE Platform Smoke Test] $ cmd /c call C:\Users\TEST_R~1\AppData\Local\Temp\jenkins17618320814231844395.bat 16:43:41 16:43:41 E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test>del /Q "E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test\TestComplete_Logs\Log_*.mht" 2>nul 16:43:41 16:43:41 E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test>exit 0 16:43:41 16:43:41 [TestComplete] The test execution started (ACE 3 Smoke Tests). 16:43:41 [TestComplete] Found TestComplete/TestExecute installations: 16:43:41 Type: TC, Version: 15.79.5.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 15\x64\bin\TestComplete.exe" 16:43:41 Type: TE, Version: 15.80.1.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe" 16:43:41 Type: TELite, Version: 15.80.1.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 15\x64\bin\TestExecuteLite.exe"

16:43:41 [TestComplete] Selected TestComplete/TestExecute installation: 16:43:41 Type: TE, Version: 15.80.1.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe" 16:43:41 [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.

16:43:41 [TestComplete] Launching the test runner.

16:43:41 $ '"C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\SessionCreator.exe"' ExecuteProcess '/c:""C:\Program Files (x86)\SmartBear\TestExecute 15\x64\bin\TestExecute.exe"" ""E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test\ACE 3 Smoke Tests.pjs"" /run /SilentMode /ForceConversion /ns /exit ""/ExportLog:E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test\1771346621277.tclogx"" ""/ExportLog:E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test\1771346621277.htmlx"" ""/ErrorLog:E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test\1771346621277.txt"" /Timeout:3800 /DoNotShowLog ""/ExportLog:E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test\TestComplete_Logs\Log_187.mht"" /JenkinsTCPluginVersion:2.9.2'

 17:37:36 [TestComplete] Test runner exit code: -1.

17:37:37 [TestComplete] [WARNING] Errors occurred during the test execution. 17:37:37 [TestComplete] Marking the build as UNSTABLE. 17:37:37 [TestComplete] The test execution finished (ACE 3 Smoke Tests).

17:37:37 Build step 'TestComplete Test' changed build result to UNSTABLE

 17:37:37 [ACE Platform Smoke Test] $ powershell.exe -NonInteractive -ExecutionPolicy Bypass -File C:\Users\TEST_R~1\AppData\Local\Temp\jenkins7100129622043842865.ps1

17:37:37 Renamed log to: E:\jenkins\workspace\Ace\Test Complete Smoke Tests\ACE Platform Smoke Test\TestComplete_Logs\Log_Build-187_Installer_v3.2.14.6_and_Platform_3.14.23.11.mht 17:37:38 Archiving artifacts

17:37:39 [Office365connector] Matched status 'UNSTABLE' for webhook with name 'ACE Smoke Test'. 17:37:39 Email was triggered for: Unstable (Test Failures) 17:37:39 Sending email for trigger: Unstable (Test Failures) 17:37:39 Sending email to:  17:37:42 Finished: UNSTABLE

2 Replies

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

    Exit code -1 from TestExecute usually means an unexpected dialog or runtime issue occurred during execution — even if all tests appear to pass.

    In your log this line is key: “Tried to open the Save dialog. The default value: YES.”

    When running in /SilentMode, TestExecute cannot display UI dialogs. If a Save (or any modal) dialog appears, it automatically selects the default option and returns -1 to indicate unexpected interaction.

    You’re also running: Running as SYSTEM

    Running UI tests under the SYSTEM account (especially via JNLP agent) often causes hidden dialog/session issues. TestExecute works more reliably when the agent runs under a regular user session.

    Recommended actions:

    • Check the generated /ErrorLog file for details.
    • Ensure your tested app closes without triggering save prompts.
    • Explicitly handle any Save dialogs in your test.
    • Run the Jenkins agent under a real user account instead of SYSTEM.

    Even if the tests pass logically, any unhandled modal dialog in SilentMode will cause exit code -1.

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