Unit tests are useful to call code in isolation during development (so you don't need to start the entire GUI to test every change), and for regression tests.
A couple of unit tests for Rosegarden have been written in src/test.
Enable WANT_TEST in ccmake and build the codebase as usual
Run 'make test'
Creating new unit tests