# Sessioncreator CLI never returns ERRORLEVEL 1

**URL:** <https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402>\
**Category:** TestComplete\
**Tags:** test, testcomplete, migrated, desktop-testing\
**Created:** [July 21, 2025, 7:51am UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402 "2025-07-21T07:51:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 21, 2025, 7:51am UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/1 "2025-07-21T07:51:36Z")

</div>

> Originally posted by **MW\_Didata** on July 21, 2025

I noticed this a while ago, when using Sessioncreator through the CLI the documentation says this:

> @echo off  
> “C:\TestCompleteFolder\Bin\TestComplete.exe” “C:\TestCompleteProjects\MyProj\MyProj.mds” /run /exit
> 
> IF ERRORLEVEL 1001 GOTO NotEnoughDiskSpace  
> IF ERRORLEVEL 1000 GOTO AnotherInstance  
> IF ERRORLEVEL 127 GOTO DamagedInstall  
> IF ERRORLEVEL 4 GOTO Timeout  
> IF ERRORLEVEL 3 GOTO CannotRun  
> IF ERRORLEVEL 2 GOTO Errors  
> IF ERRORLEVEL 1 GOTO Warnings  
> IF ERRORLEVEL 0 GOTO Success  
> IF ERRORLEVEL -1 GOTO LicenseFailed

But when warnings are in the logs I only get ERRORLEVEL 1 (Success).

This has been an issue for at least the past 3 years.  
Overal not a big issue, I was just wondering if it’s just me.

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 21, 2025, 9:57am UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/2 "2025-07-21T09:57:16Z")

</div>

> Originally posted by **rraghvani** on July 21, 2025

Here’s an example, where I run individual functions i.e. test1, test2, test3, test4 to log either a message, warning or error.

 ![](https://canada1.discourse-cdn.com/flex049/uploads/smartbear_prod/original/1X/284bad20e7dd8dc4353ba432dfe04501d83275db.png)

When test1 completes, it returns ERRORLEVEL = 0.

When test2 completes, it returns ERRORLEVEL = 1.

When test3 completes, it returns ERRORLEVEL = 2.

When test4 completes, it returns ERRORLEVEL = 2, because the highest level is logged

If the instance of TestComplete/TestExecute is not executed within the same process, you will get a different retuned value.

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 21, 2025, 10:21am UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/3 "2025-07-21T10:21:13Z")

</div>

> Originally posted by **MW\_Didata** on July 21, 2025

**EDIT: I tried the same using TestExecute instead of SessionCreator, TE does return the Errorlevel 1 warnings. SessionCreator does not.**

For me I only get back ERRORLEVEL 0 on warnings, I did use SessionCreator not Testexecute.

 ![](https://canada1.discourse-cdn.com/flex049/uploads/smartbear_prod/original/1X/bbf170344a4fbedd6fa73acc1684961e45c44ae9.png)

> “C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\SessionCreator.exe” RunTest /Username: /Password: /ProjectPath:“PathTo\TestErrorLevel.pjs” /UA /ScreenResolution:1600\*900 /Timeout:9000 /project:TestErrorLevel
> 
> IF ERRORLEVEL 1001 GOTO NotEnoughDiskSpace  
> IF ERRORLEVEL 1000 GOTO AnotherInstance  
> IF ERRORLEVEL 127 GOTO DamagedInstall  
> IF ERRORLEVEL 4 GOTO Timeout  
> IF ERRORLEVEL 3 GOTO CannotRun  
> IF ERRORLEVEL 2 GOTO Errors  
> IF ERRORLEVEL 1 GOTO Warnings  
> IF ERRORLEVEL 0 GOTO Success  
> IF ERRORLEVEL -1 GOTO LicenseFailed
> 
> :Timeout  
> GOTO End
> 
> :CannotRun  
> GOTO End
> 
> :Errors  
> GOTO End
> 
> :Warnings  
> GOTO End
> 
> :Success  
> GOTO End
> 
> :End  
> echo %ERRORLEVEL%  
> pause

In the TestErrorLevel project there is this test:

> function test1()  
> {  
> Log.Warning(“This is a warning”);  
> }

The test was run through the Execution plan

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 21, 2025, 1:58pm UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/4 "2025-07-21T13:58:26Z")

</div>

> Originally posted by **scot1967** on July 21, 2025

Everything I find indicates that SessionCreator _should_pass back the ERRORLEVEL returned from TestExecute. This may be one to pass up to support.

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 21, 2025, 2:31pm UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/5 "2025-07-21T14:31:28Z")

</div>

> Originally posted by **rraghvani** on July 21, 2025

I don’t seem to always get notifications from a reply, I’ve responded to. Hence the delay in replying.

I’ve run the same test using SessionCreator, and I am not getting the same results, with or without /UseActiveSession. Though Exit Codes are supported via SessionCreator, it’s not working as expected. So It’s best to open a Support Ticket via [https://support.smartbear.com/testcomplete/message/](https://support.smartbear.com/testcomplete/message/) .

 ![](https://canada1.discourse-cdn.com/flex049/uploads/smartbear_prod/original/1X/f2e820b8689fc9e1062352533f421a6c97719b1b.png)Running test2() and test4()

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 21, 2025, 2:58pm UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/6 "2025-07-21T14:58:10Z")

</div>

> Originally posted by **scot1967** on July 21, 2025

I had to get to a meeting… Here is the rest of what I found…

Each of these error levels should be returned to the CLI. In older versions, SessionCreator returned fewer ERRORLEVELS. So, I am not sure what is going on here.

_[Edit] Check your version? [/Edit]_

Applies to TestExecute 15.40, last modified on March 25, 2022

> [https://support.smartbear.com/testexecute-for-testleft/docs/running/automating/sessioncreator/index.html](https://support.smartbear.com/testexecute-for-testleft/docs/running/automating/sessioncreator/index.html)

Applies to TestComplete 15.76, last modified on July 09, 2025

> [https://support.smartbear.com/testcomplete/docs/working-with/automating/session-creator/index.html](https://support.smartbear.com/testcomplete/docs/working-with/automating/session-creator/index.html)

Open a support request:

> [https://support.smartbear.com/testcomplete/message/](https://support.smartbear.com/testcomplete/message/)

… If you find my posts helpful drop me a like! 👍 Be sure to mark or post the solution to help others out and/or to credit the one who helped you. 😎

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 21, 2025, 3:16pm UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/7 "2025-07-21T15:16:41Z")

</div>

> Originally posted by **scot1967** on July 21, 2025

Version # should follow your installed TestComplete/TestExecute Version #

 ![](https://canada1.discourse-cdn.com/flex049/uploads/smartbear_prod/original/1X/80b40a9e1ff0ffc04997c80edb7b8b1d8359ab62.png)

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 22, 2025, 6:51am UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/8 "2025-07-22T06:51:05Z")

</div>

> Originally posted by **MW\_Didata** on July 21, 2025

Thanks for verifying, I’ll contact support with this issue!

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [July 22, 2025, 6:52am UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/9 "2025-07-22T06:52:26Z")

</div>

> Originally posted by **MW\_Didata** on July 21, 2025

I am using the latest version of TC, TE and SessionCreator.  
Thanks for looking into it, I’ll create a support ticket for this issue.

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [June 30, 2026, 2:15pm UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/10 "2026-06-30T14:15:15Z")

</div>

> Originally posted by **MW\_Didata** on June 30, 2026

If anyone is wondering Smartbear solved this issue in the new 15.82 release:

| | |
| --- | --- |
| TC-108976 | Resolved an issue where SessionCreator returned success for warning-only logs. |

---

<div class="post-metadata">

**Author:** ![system](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@system](https://community.smartbear.com/u/system)\
**Post date:** [October 7, 2026, 5:16pm UTC](https://community.smartbear.com/t/sessioncreator-cli-never-returns-errorlevel-1/402/11 "2026-10-07T17:16:48Z")

</div>

Closed on October 7, 2026, 5:16pm UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
