Skip to content

Test and run a plugin

Start with the installed developer kit. The QGIS-free tests run on the SDK fakes; they are not a substitute for running a plugin inside QGIS.

Terminal window
qgis-sdk new field_tools --no-input
cd field_tools
qgis-sdk check

check reports project and declaration problems before QGIS loads the plugin. See project checks for the rule IDs and remedies.

Terminal window
qgis-sdk test

Add tests under tests/ for the plugin’s actions and services. The fakes exercise plugin behavior without starting QGIS; see the scoped plugin runtime for the service boundary.

With a supported QGIS installation available, run:

Terminal window
qgis-sdk targets
qgis-sdk test --target qgis
qgis-sdk dev

targets reports what the machine can reach. The QGIS target adds native checks; dev starts QGIS Desktop with the plugin loaded from source and reloads on save. Desktop requires a working display and QGIS installation. See supported targets and developing against QGIS for discovery and options.

Terminal window
qgis-sdk build

Install the ZIP in dist/ through QGIS’s plugin manager. See the build reference for packaging details.