Forum Discussion

iamraj09's avatar
iamraj09
Contributor
9 months ago

Unable to execute Desktop GUI tests on Azure Virtual Machine connected to GitHub Actions runner

Hi everyone,

Currently we are migrating to GitHub and as a part of that I am trying to execute a simple GUI desktop test using TestComplete with GitHub actions. 

The issue:

I have created a batch file to launch TestComplete and run the simple GUI test as mention in the documentation provided on TestComplete website. (refer to Syntax screenshot)

https://support.smartbear.com/testcomplete/docs/working-with/integration/github-actions.html?_ga=2.246307148.915657396.1707729558-339793958.1707729558

https://support.smartbear.com/testexecute/docs/running/automating/command-line/command-line.html#examples

https://community.smartbear.com/discussions/testcomplete-questions/testexecute-command-line/119642

The Batch file which was created using the support documents, works fine when executed manually on the Virtual Machine, it launches TestComplete and executes GUI test and generates report. But when it is executed with GitHub actions, it hangs indefinitely (refer to Admin-mode and GitHub-execution screenshot) and should be cancelled. So I am stuck at this point because debugging is difficult, as there is no specific error message appears during or after the execution. 

1.Tried to run the batch file using Admin privileges 

2.Checked Firewall setting etc.,  

3. I have gone through the documentation and questions on the community related to this topic but could not find any solution related to this issue.

Has anyone had similar issue ?

Thank you. 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    The link that I had provided, Running Tests via Remote Desktop and the sub topics, gives a clear indication of the requirements for running GUI tests.

    The example that I had provided, tests a web sites using the Chrome web browser, which is all GUI testing.

    I can run the agent as either a process or service, on the VM that is always on, unlocked and has an active user session.

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Do you have a batch file, with the full command to either TestCompete or TestExecute to run your project? 

  • Yes.. I am uploading it here. This runs fine when I execute it manually (refer to Verification-FAT). But hangs when executed via Github actions. I have tried executing simple batch file to check if the firewall is blocking but it worked fine. 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    There are two executable files for TC in the following location, C:\Program Files (x86)\SmartBear\TestComplete 15\Bin and C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin. Ensure you are using the correct one.

    What version of TestComplete/TestExecute are you using? Are you testing a web browser or windows app?

    • iamraj09's avatar
      iamraj09
      Contributor

      I am using 15.42. I have tried with both but both but didn't work. I am testing a Desktop application.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I've just been learning about GitHub Actions, and after sometime, I have now managed to get TestComplete to run my sample project,

    I'm using PowerShell commands within my YAML configuration. The above results is based on having TC already installed; project is downloaded from GitHub repository and played back by TC.

  • We found the issue. If the runner is started as a service GUI tests are not running. If we start it using command prompt or a batch file it is working fine. But for that Virtual Machine should be turned on manually and create a session which is not we are looking. We are trying to Automated everything from start to end. 

    The project what you have mention above, does it include GUI tests? Are you running it on a VM? How is the runner started? Just curious to know the solution, so that we can try it on our side. Thank you for responding. :)