Best Practices for Testing
pcdswidgets is inherently driven by the user experience,
so there will need to be a mix of automated and interactive testing.
Unit Tests
Any widget that has testable components, i.e. any behavior with an objectively correct answer, should have that behavior tested in the unit tests suite.
This will help avoid critical regressions.
The unit test suite uses pytest-qt to help manage tests
that need to create and manipulate widgets.
Designer Tests
Before merging and after any functional commits, widgets should be tested using the following workflow:
Open a blank screen in
designerAdd the widget in
Try each of the options
Save, open in pydm
Confirm behavior
It’s important to start this step from the very beginning
to make sure the first experience is smooth.
It’s very easy to break the designer experience while
maintaining runtime logic.
Testing with pcdswidgets-show
Widgets should also be tested with pcdswidgets_show,
see Command-line Interface.
Every widget should be openable from this command-line tool.