Forum Discussion

mfoster711's avatar
mfoster711
Regular Contributor
9 months ago
Solved

Testexcute Not Starting overnight - How to verify if license issue

I am trying to troubleshoot an issue occurring on one of our test PCs overnight. TestExecute should be starting up and running our script but it is not.

 

My only guess is that TestExecute failed to get a license when it ran. How could I verify if this is the case? Is there anywhere to see if a license was requested but denied?

 

Notes on our process:

  • We use a Windows Scheduled Task to run a batch file at logon of any user.
  • This batch file starts TestExecute and runs our desired script.
  • I know the batch file works fine.
    • I can manually run it and it starts the script.
    • I can manually run the Schedule Task and that works.
    • I can reboot the PC during the day and it runs the Schedule Task and starts TestExecute
  • For unknown reasons, when this is running overnight, the batch file runs but TestExecute does NOT start.
  • I added custom logging messages to a text file to troubleshoot this issue
    • One log message occurs when the batch file runs.
    • One log message occurs at the first line of the script
  • When this runs overnight, I know the batch file ran successfully but the log message for TestExecute does not appear which indicates it never started.

So why is TestExecute not starting over night? Any tips on how to troubleshoot this if it is not a license issue?

 

 

  • See TestComplete Exit Codes, I think the same applies to TestExecute. -1 indicates not obtaining a license.

     

    I use the following snippet of code in my PowerShell script,

     

     

    # Run specific project in project suite
    Start-Process 'C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\TestExecute.exe' -ArgumentList """C:\Sandbox\TestComplete\ALS\ALS.pjs"" /run /exit /DoNotShowLog /ExportLog:""C:\Sandbox\Log\TC_Automation_$tc_timestamp\index.html"" /ExportSummary:""$summary_report""" -Wait | Out-Null
    
    # https://support.smartbear.com/testexecute/docs/running/automating/command-line/exit-codes.html
    switch ($LASTEXITCODE)
    {
        1001 { Write-Output 'Not Enough Disk Space' }
        1000 { Write-Output 'Another Instance' }
        127 { Write-Output 'Damaged Install' }
        4 { Write-Output 'Timeout' }
        3 { Write-Output 'Cannot Run' }
        2 { Write-Output 'Errors' }
        1 { Write-Output 'Warnings' }
        0 { Write-Output 'Success' }
        -1 { Write-Output 'License Failed' }
    }
    

     

     

    Also, have a look at your Task Scheduler History tab, to get a rough idea of what is going on.

     

    Every weekend, all of out remote machines restart due to IT doing their stuff. This logs out my active session, and the automation fails to run.

     

2 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    See TestComplete Exit Codes, I think the same applies to TestExecute. -1 indicates not obtaining a license.

     

    I use the following snippet of code in my PowerShell script,

     

     

    # Run specific project in project suite
    Start-Process 'C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\TestExecute.exe' -ArgumentList """C:\Sandbox\TestComplete\ALS\ALS.pjs"" /run /exit /DoNotShowLog /ExportLog:""C:\Sandbox\Log\TC_Automation_$tc_timestamp\index.html"" /ExportSummary:""$summary_report""" -Wait | Out-Null
    
    # https://support.smartbear.com/testexecute/docs/running/automating/command-line/exit-codes.html
    switch ($LASTEXITCODE)
    {
        1001 { Write-Output 'Not Enough Disk Space' }
        1000 { Write-Output 'Another Instance' }
        127 { Write-Output 'Damaged Install' }
        4 { Write-Output 'Timeout' }
        3 { Write-Output 'Cannot Run' }
        2 { Write-Output 'Errors' }
        1 { Write-Output 'Warnings' }
        0 { Write-Output 'Success' }
        -1 { Write-Output 'License Failed' }
    }
    

     

     

    Also, have a look at your Task Scheduler History tab, to get a rough idea of what is going on.

     

    Every weekend, all of out remote machines restart due to IT doing their stuff. This logs out my active session, and the automation fails to run.

     

  • mfoster711's avatar
    mfoster711
    Regular Contributor

    Thanks for reminding me of the exit codes. That helped. I am getting a License Failed error. Now I just have to figure out why.