I currently have a CD/CI pipeline that tests my application by using Xvfb to start a framebuffer and xdotool to focus on the window and send a ctrl+q. My application is set to exit on ctrl+q:
#!/bin/bash -eux
export DISPLAY=:101
Xvfb $DISPLAY &
$application --debug &
application_pid=$!
while true; do
sleep 2
xdotool search --class $application windowfocus
xdotool key ctrl+q
done &
wait "$application_pid"
This allows me to test applications that open a window, but recently I've started working on an application that runs in the notification tray. There is an "Exit" item in its menu (It's written in Qt6/PySide6). Is there any way to handle a "virtual" tray in a headless CI/CD testing environment, where I can bring up the popup menu and select the exit item?