[QGIS-Developer] Testsuite improvements (was: Direct push forbidden to master)

Sandro Santilli strk at kbt.io
Sun Nov 10 05:35:03 PST 2019


On Sun, Nov 10, 2019 at 11:54:48AM +0100, Matthias Kuhn wrote:
> On 11/10/19 11:42 AM, Sandro Santilli wrote:

> >    - Make it easy for devs to run single, specific tests, to help
> >      when changing a single specific spot of the codebase
> 
> See https://docs.qgis.org/testing/en/docs/developers_guide/unittesting.html#run-your-tests

I've also written some of that in tests/README.md (review welcome)

> > If a test fails, you can use the ctest command to examine more closely why
> it failed. Use the |-R| option to specify a regex for which tests you want
> to run and |-V| to get verbose output:
> 
> > $ ctest -R appl -V
> 
> Is there more required?

- More intuitive mapping between filenames and testnames
- Ability to run single functions in a test (the README above
  has some hints, but maybe there's a ctest way?)
- A Makefile target to run the testsuite setup (ie:
  create/populate the test databases)

But yes, the support is all there, it's just about makeing
things "easier". I often find myself commenting out most of
a test script, to focus on the single test I'm running, that
part is probably fixable by splitting long tests in multiple
functions and allowing to run single functions.

--strk;


More information about the QGIS-Developer mailing list