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 t...
  • rraghvani's avatar
    9 months ago

    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.