Tests for a new module

Hi to all,

I tried to find a guideline how to write tests for a new feature. Is there any(?), or it is
better just directly to go to repository and see how tests are organized from the source code?

p.s. Default benchmark tests pass because my new module is never used in them :slight_smile:

Hi Fedor,
It is true that there is no guideline regarding testing. To be fair far from every module in the code is tested, mostly compilation options and the core parts of the software are.
Ideally every part should be checked, but that may require to integrate a bit too much of data in the distribution in order to properly test everything. Additionally for some features it could lengthen the pipeline processing, although both issue could be reduced with truncated data which is what is done currently.
But this is definitely a topic to discuss as a testing dataset could also help to understand how a new feature work and must be used. So if you would like to integrate a test, do not hesitate to add it in the gitlab-ci.yml of your branch!

Best,
Thibaut

I don’t think it is needed to package test data in the distribution of the software. Test data could be packaged separately and distributed to users who want to run tests and benchmarks, or even downloaded by the test/benchmark scripts themselves.

Hi Aurélien,
I was mostly thinking about the test data required for pipelines, which should be kept in the gitlab distribution.
But indeed maybe the way to go with user-developed modules is not to test them in pipelines, but keeping “offline” separate packages in order to do the occasional checks and/or keep them as examples.