Tracker Functional Testing

Tracker has a set of functional tests to verify it is working fine in some basic (and not so basic) use cases. While the unit tests exercise specific areas of the code, the functional-tests simulate real Tracker use cases.

The functional tests are enabled by default in the Meson build system and in Tracker's GitLab CI pipelines.

Debugging Tips

Verbose output

By default the functional tests produce no output.

You can get debug output by setting TRACKER_TESTS_VERBOSE=1 in the environment. Once this is set, you can also use set TRACKER_VERBOSITY=3 to get verbose output from the Tracker daemons.

Debugging the Tracker daemons

The functional-tests execute the Tracker daemons themselves. This makes it tricky if you want to attach a debugger to one of the daemons in order to investigate some problem.

The recommended way to do this is add a Python debugger breakpoint early on in the test in question. This is done by inserting two lines in the test code:

    import pdb
    pdb.set_trace()

Now when you run the test, it'll pause and wait for input. You can then open a second terminal and attach a debugger such as GDB to the tracker process you want to debug.

Attic/Tracker/Documentation/FunctionalTesting (last edited 2023-08-14 12:50:15 by CarlosGarnacho)