This will run the automated tests suite in a docker container.
Note that this plugin contains tools that take some datasets as input and produce other datasets as outputs. Some tests compare those outputs to expected ones.
## Overwrite the expected result datasets
```bash
make test-overwrite-outputs
```
This will run the tests and overwrite the expected resultsets.
After that you can check the expected results sets feet your needs and commit them.
## Test the plugin with QGIS desktop in a docker environment
```bash
make qgis
```
This will run a docker container with QGIS desktop application.
Source code in mounted though a volume in folder `/app`.
This `/app` folder is also declared in `QGIS_PLUGINPATH` so the plugin can be
directly activated in "QGIS Extensions manager".
You can also access the tests input and expected results datasets in folder
`/app/tests/data`.
Note that QGIS setting are also stored in a named volume, so they will persist
when QGIS container is deleted and recreated.
## Test the plugin with QGIS desktop
### Linux
```bash
make link
```
This will create a symbolic link to the plugin source code folder in your home QGIS Python plugins folder.
### Windows
In QGIS settings, in tab *System* add an environment variable named `QGIS_PLUGINPATH` with as value the path to this folder (git repository root folder).
### All operating systems
In QGIS desktop extensions manager:
- load plugin `PreCourlis`;
- install QGIS Plugin `Plugin Reloader`.
Now you can easily make changes in source code, reload plugin `PreCourlis` and see changes in QGIS desktop.