I'm working on putting together pytest suites for some of our in-house tools, and I'm having a devil of a time doing it with Houdini.
Our general methodology has been:
- Create a vanilla Docker container with the bare minimum needed to test;
- Start a virtual frame buffer using xvfb;
- Run pytest on a commandline version of the DCC's python (e.g. hython).
While this allows us to run non-UI-related tests (we can test that our 'general controller' code can open/close/import/etc), even basic stuff inside Houdini (i.e. "can we open a window? is it the right size?") causes it to crash in a way we've not seen with Maya or Nuke. Opening up hython and running this:
>>> import sys
>>> from PySide2 import QtWidgets
>>> QtWidgets.QApplication(sys.argv)
...will cause hython to crash and exit -- unfortunately, in such a way that pytest fails, but does not capture the failure as output.
Has anyone had any luck in running Houdini UI tests from the command line? We're at the point of just tossing out this part of our test suite, and trusting that anything we do in vanilla command-line qt will translate over seamlessly to Houdini using our Houdini-specific window/panel boilerplate (which we can't test).