How to allow running the processes with UI under appveyor

galaxyblazer's Avatar

galaxyblazer

17 Mar, 2021 04:27 PM

I'm trying to setup build and run the automated tests under self hosted appveyor server.
Automated tests, that I'm trying to run starting the application with UI . When I'm running the test from VS or manually from nunit-console they are working fine. But, when I'm trying to run the same tests inside appveyor build process they are failing because the application that required for tests won't start properly (process appear in the process list but no any UI appear and we unable to get the instance of this application) Also, for test purposes I tried start notepad from yml script and it also won't start properly , process appear in the list but no UI.

This behavior caused because of some option or setting that I haven't enabled, or appveyor do not support running UI processes properly ?

  1. Support Staff 1 Posted by Feodor Fitsner on 17 Mar, 2021 05:56 PM

    Feodor Fitsner's Avatar

    By default AppVeyor Server is running as a Windows Service, without UI. You need to run it as an interactive app.

    The simplest way to do that is to stop AppVeyor server service and then run C:\Program Files\AppVeyor\Server\appveyor-server.exe from a command line. Give it a try.

    To automatically run it machine start add it to "Run" section in the Registry.

  2. 2 Posted by galaxyblazer on 18 Mar, 2021 06:25 AM

    galaxyblazer's Avatar

    Hello Feodor,
    Sorry for misunderstanding, I setup BYOC machine and trying run build on it instead of appveyor machine.
    I don't have the AppVeyor server . Instead I have Appveyor.HostAgent and Appveyor.BuildAgent services . Also I don't have the folder mentioned in your reply. Does this means that I need some extra setup on my machine ?
    Also in the settings to build cloud I have enabled option Start Build Agent in interactive mode .

  3. Support Staff 3 Posted by Feodor Fitsner on 18 Mar, 2021 06:54 PM

    Feodor Fitsner's Avatar

    OK, from your original post I've got impression you have AppVeyor Server. Right, for BYOC there is going to be Host Agent only.

  4. 4 Posted by galaxyblazer on 18 Mar, 2021 10:03 PM

    galaxyblazer's Avatar

    Yes, that's correct. Out tests trying to run application with active UI, but for some reasons when they performs during build process, application runs as a background process and it's causing tests to fail.

  5. Support Staff 5 Posted by Feodor Fitsner on 18 Mar, 2021 10:07 PM

    Feodor Fitsner's Avatar

    You have to run Host Agent (C:\Program Files\AppVeyor\HostAgent\appveyor-host-agent.exe) as an interactive process (from command line), not as a windows service.

  6. 6 Posted by galaxyblazer on 19 Mar, 2021 12:54 PM

    galaxyblazer's Avatar

    Thanks, that solution working fine. But now we faced with the problem to run appveyor host agent on startup with admin privileges - we need this cause our build process require registry of dlls and we getting errors when host agent running without administrative rights.

  7. Support Staff 7 Posted by Feodor Fitsner on 19 Mar, 2021 05:20 PM

    Feodor Fitsner's Avatar

    You can add it under Run in Registry:

    Set-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "AppVeyor.HostAgent" `
        -Value "powershell -File `"${env:ProgramFiles}\AppVeyor\HostAgent\appveyor-host-agent.exe`""
    

    At the same time disable Host Agent windows service completely.

  8. Feodor Fitsner closed this discussion on 19 May, 2021 09:04 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM
20 Sep, 2024 05:50 PM