0

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?

1
  • The system tray feature requires a window manager/desktop environment that supports either the freedesktop systemtray specification or the related dbus protocol. Note that for proper testing (especially if you need to test window geometry/metrics aspects), you should always use a window manager; it's common to use a very light one, such as blackbox/openbox or fluxbox, which should provide system tray functionalities. Unfortunately, it seems that, depending on the configuration, Qt keeps showing the tray icon on the "host" window manager (the one shown on the "real" screen), ignoring Xvfb. Commented Sep 25 at 17:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.