Tracing ======= Testsuite provides basic facility to trace external requests. It generates `trace_id` and you can pass while performing calls to yours service. Mockserver already supports this feature. Check trace id -------------- You can use `testsuite_traceid_manager` fixture in the following ways: .. code-block:: python def test_foo(testsuite_traceid_manager): # current trace_id testsuite_traceid_manager.trace_id # check that given trace_id was generated by testsuite if testsuite_traceid_manager.is_testsuite('my trace id'): ... # check that given trace_id came from previous testcase if testsuite_traceid_manager.is_other_test('my trace id'): ... Override trace id generation ---------------------------- By default uuid4 is used as trace id, you can override this behaviour: .. code-block:: python @pytest.fixture(scope='session') def testsuite_traceid_generator(): def gen(): return 'foo' return gen Fixtures -------- .. currentmodule:: testsuite.plugins.tracing .. autofunction:: testsuite_trace_id() :no-auto-options: .. autofunction:: testsuite_traceid_generator() :no-auto-options: .. autofunction:: testsuite_traceid_manager() :no-auto-options: Classes ------- .. currentmodule:: testsuite.tracing .. autoclass:: TraceidManager :members: