The standard Moodle methods for PHPUnit and Behat testing can be used.
LMSTools provides several convenience functions that, with a single command, Initializes the test environment, runs selected tests, then prepares test reports. See LMSTools for details.