Testing without launching graphical components

Hi,
I am trying to set up a GHA workflow to test the SlicerDMRI extension. ctest is effectively finding and triggering the tests so far:
ENH: Test build · SlicerDMRI/SlicerDMRI@576ae7c · GitHub

However, as I’ve realized locally, some of those tests launch Slicer’s GUI components, and thus fail in the GitHub headless testing environment. I’ve seen that the test command contains a number of flags, e.g.
ENH: Test build · SlicerDMRI/SlicerDMRI@576ae7c · GitHub

Including e.g. a --no-splash.

I am wondering whether tests we can completely avoid launching Slicer’s GUI parts, or whether this is the case already, and if tests fail, it is because they genuinely launch GUI parts (within the context of the extension, maybe due to some design choices). I am asking this to save installing xfvb (and spending time interacting with GHA to see if the steps work) if possible.

Even when a display is available, I’d say that it is not desirable to launch GUI parts.

Thanks.

The first failing test seems to be due to this error:

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

You might need to install these:

https://slicer.readthedocs.io/en/latest/user_guide/getting_started.html#debian-ubuntu

It’s fine t have both kinds of tests, with and without the GUI, but as a general rule the tests that involve the GUI are more comprehensive and detect a wider variety of regressions, so explicitly running them as part of any CI is preferred. Using xvfb or docker are options to make this seamless.

Thanks for answering, Steve.

libxcb is being installed: ENH: Test build · SlicerDMRI/SlicerDMRI@d841568 · GitHub

and there is a symlink already:
ENH: Test build · SlicerDMRI/SlicerDMRI@9c6c873 · GitHub

So the only chances seems to use xvfb. Hoping that solves the issue:
ENH: Test build · SlicerDMRI/SlicerDMRI@5e56b79 · GitHub