This library allows testing of Hubitat scripts locally on your machine (and via Continuous Integration, thus Hubitat CI).
It automatically validates correctness of some script aspects (such as pages/inputs/metadata/preferences/capabilities), and enables user to validate the rest.
It uses GroovyShell to load the scripts, makes objects out of them and lets user test them.
By default, the library will initialize script object, and perform its validation.
These validations can catch errors like these:
With proper IDE (I'm using IntellijIDEA), you can step through your tests and your script, view variables and have rich debugging experience in general.
Just something obvious, really. If you can run it on your machine, you can also run it in the cloud.
This library, and hubitat_ci_example, for example, have automatic builds set up in Azure Devops (former VSTS). Here's a build script file: azure-pipelines.yml.