Recording a screen movie of the automation that is taking place can come in handy for debugging problems that occur while replaying test scripts.
Squish itself does not include functionality for screen recording yet, but it is generally possible to use external tools that satisfy the individual requirements.
The tool Open Broadcaster Software (OBS Studio, OBS) supports recording from various input sources, including the screen. In addition it has a command line interface, which makes it possible to integrate it with Squish. The rest of this article shows how to integrate screen recording via OBS into Squish test scripts.
Please refer to Open Broadcaster Software for download and installing OBS.
As of version 19.0.3 OBS supports Linux, macOS and Windows.
After installing OBS it needs to be started to perform the initial configuration.
In general we recommend to follow the suggestions made by OBS:
Choose to optimize for recording (not streaming).
Choose to use the setup wizard which tries to determine the optimal recording settings.
After startup, OBS looks similar to this:
At this point click on Sources > + > Screen Capture (or similar).
In the resulting dialog Create/Select Source keep the default (Create new) and click on OK.
In the resulting dialog Properties for ‘Screen Capture’ (or similar) check Capture Cursor (if this is what you want) and click on OK. OBS should now look similar to this:
In the OBS main window choose File > Settings, select Output and note or change the entry Recording > Recording Path as desired. (This is where newly recorded screen movies will automatically be stored.)
Using OBS from Squish test scripts¶
(See Executing external applications for starting external processes from test scripts.)
obs_wrapper.pyin the test suite folder.
OBS installed on computer.
OBS Studio command line help (as of version 19.0.3):