Forum Discussion

simonaferrara's avatar
simonaferrara
Frequent Contributor
27 days ago

Windows 11 O.S. - Test Execute not correctly running

Hi,

with Windows 11 O.S. I'm falling within some issues for the Azure DevOps release pipeline execution, that randomically fails with an "Unable to connect to TestExecute error".

This error happens when TestExecute is sometimes not correctly started, that is: it is shown within the Task Manager but is not appearing within the running programs:


The issue can be resolved after several attempts, by trying to kill the process and then rerun it but, in the meanwhile, the automatic tests within the release pipeline cannot be executed since the "Unable to connect" error is raised.

Note that the machine contains only the Administrator user, so there are no other users connected.

This issue had never happened by using Windows 10.

Has anyone encountered this issue and how do you have resolved it?

Thanks!

Simona

13 Replies

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

    I'm not sure how your TestExecute is launched, but are you using the /exit parameter? This parameter will ensure that TestExecute is fully closed once all tests are completed.

  • simonaferrara's avatar
    simonaferrara
    Frequent Contributor

    From release pipeline, I'm using VSTest task, as this example:


    If I run it manually (and the issue is replicated also manually), I simply double click TestExecute.exe by running it as administrator.


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

      In the task you have shown, is there a way of adding command line parameters, which can be used for TestExecute?

      For example (not sure if it will work!),

      - task: VSTest@2
        displayName: 'Run TestExecute tests'
        inputs:
          testSelector: 'testAssemblies'
          testAssemblyVer2: '**\*TestExecute*.exe'
          searchFolder: '$(System.DefaultWorkingDirectory)'
          runSettingsFile: '$(System.DefaultWorkingDirectory)\TestRunSettings.runsettings'
          otherConsoleOptions: '/param1 value1 /param2 value2'
          diagnosticsEnabled: true

      or

      - task: CmdLine@2
        displayName: 'Run TestExecute with Parameters'
        inputs:
          script: '"C:\Program Files (x86)\SmartBear\TestExecute\TestExecute.exe" /Project:"$(Build.SourcesDirectory)\MyTestProject.pjs" /run /exit /param1 value1 /param2 value2'
      

       

      • simonaferrara's avatar
        simonaferrara
        Frequent Contributor

        I think that the /exit parameter will not solve anyway, since the issue happens on TestExecute activation action, not at closure action.

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

    Do your TestComplete and TestExecute versions still match?

    • simonaferrara's avatar
      simonaferrara
      Frequent Contributor

      I've got only TestExecute version installed on that machine (no TestComplete installed) and it is the following: 15.68.8.11 x64 .

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

    Hello Simona,

    Since the problem is intermittent it makes it hard to address. To help isolate the root cause, systematically let's test starting outside the pipeline. 

    A) After a reboot follow these steps:
    1-validate in "Task Manager" that TestExecute is not running (it is not expected after reboot)
    2-using windows shortcut run TestExecute (should run)
    3-select a sample test and run it, view results, and exit TestExecute
    Repeat these steps until you reproduce the problem. Could you reproduce? if yes, I suggest you contact SmartBear support providing such details.

    B) If you could not reproduce, proceed with testing:
    1-validate in "Task Manager" that TestExecute is not running
    2-using windows console issue TestExecute command line to run a sample test
    [start /wait "TestExecute" TestExecute.exe "C:\Work\My Projects\MySuite.pjs" /run /exit]
    Repeat these steps until you reproduce the problem. Could you reproduce? if yes, I suggest you contact SmartBear support providing such details.

    Note: TestExecute waits until the specified project suite, project, test and so on is executed. However, the command line is ready to receive new commands right after TestExecute has been launched. If you want the command line to wait until the test (project and so on) execution is over, you can use the START command.

    C) If you could not reproduce, proceed with testing:
    Using windows scheduler perform the same above steps of command line
    Repeat these steps until you reproduce the problem. Could you reproduce? if yes, I suggest you contact SmartBear support providing such details.

    D) If you could not reproduce, proceed with pipeline testing:
    1-validate in "Task Manager" that TestExecute is not running
    2-in VSTest run the task (first try without start /wait "TestExecute")
    Repeat these steps until you reproduce the problem. Could you reproduce? if yes, add start /wait "TestExecute" to your configuration to try again.

    If still you reproduced the problem we would have narrowed it down. What is the exact error message you get? Screen shot also helps. Intermittent connection issues can stem from various factors, including CPU usage causing timeout, network problems, firewall restrictions, proxy server hiccups, or conflicts with other applications example antivirus.