Issue
Setup:
- test framework around latest WebdriverIO v.7
- Jenkins on GCP: master - Ubuntu, slave - Windows Server 2022 VM.
- connection between Jenkins master and slave is done with GCP jenkins plugin, so Windows slave is being created for test and then dies.
- app under test: Electron v14.2.1 based app.
Test - "User can start screenshare"
- User start a call.
- User select an available screen and start a screenshare.
Problem: Electron library can not detect available screen for capturing and sreensharing, because there is no RDP connection opened in test session.
In test logs no sources (screen) found:
2022-08-01 07:40:20:409 -00:00 | info | main-api-handler: - open-screen-picker-window - Properties: {
"cmd": "open-screen-picker-window",
"id": 1,
"sources": []
}
Questions:
- How can the screen be emulated?
- Where the RDP should be established? Should it?
- Are there other way than RDP to provide the screen for the Electron app?
Solution
The problem was solved by my colleague:
"So the root cause of this issue is that the SSH server which Jenkins uses to configure the node runs as a service, and that means it has problems interacting with desktop apps. Unfortunately, Windows' own SSH server only runs as a service. More explanations here: Starting GUI programs via OpenSSH on Windows?
To resolve this, I installed a separate SSH server (OpenSSH from MSYS2). The machine image is configured to autologin on boot, and sshd is started on logon as the currently logged in user. This gives it access to the desktop, and screenshare tests now seem to work better"
Answered By - Alexander Blatov
Answer Checked By - Timothy Miller (JavaFixing Admin)