For the latest Slicer documentation, visit the 4.10 page.
Too lazy to do the same actions over and over? QtTesting is the answer! The QtTesting library provides you with an easy way to record and play macros with 3DSlicer. Included in this library is a user-friendly recording interface that shows you what actions you're recording as well as a simple and smart playback interface that will allow you to control actions whenever you want. With no input from the user, QtTesting record all accomplished actions from the point you have started the record until you stop it! "Create a puppet and let it do the rest ... "
Slicer developers use this library to record tutorials and test the 3D Slicer application. How to create you own QtTesting test.
|QtTesting is an effort started by the ParaView team|
By default, QtTesting is not activated. You must enable it to be able to record or play a saved macro.
Recording a macro consists in observing all the high level events (or low level in some cases) that the user generate by interacting with the GUI elements. All the events are saved into a file (.xml) that can be used later to replay the recorded events in the same or different instance of the Slicer application.
How to record a macro
A record dialog appears at the bottom left of the application
Recorded macros (.xml) can be replayed within Slicer sessions. Note that the success of the macro execution can depend on the original state of the application.
How to play a macro
Slicer will ask if you want to restore the previously recorded settings. See below
Default settings recorded
To limit playback problems, QtTesting records automatically some of the applications settings.
Before each play back, the application might have different current settings, QtTesting then asks if you want to restore the settings to the record application state. To maximize the chance of a successful playback, settings must be restored to set the application into a state as much as possible similar to when the macro was recorded.
QtTesting in 3DSlicer is still under heavy development, some events might not be recorded properly.
What is subject to not work :
- Some actions under submenus, mainly actions on widget.
Work, but not perfectly:
- Shifts/offsets might happen when you recording events in the 3D views.