Skip to content

Advanced: customize the export with hooks

pytest_xray_results(results, session) runs before import. In automatic mode it may add comments, defects or evidence, but must preserve the execution, ordered Test keys and supported statuses and must not inject testInfo. Comment byte limits still apply. Hooks are trusted local code and can expose sensitive data; no raw failure text is added automatically in this mode. Manual-mode report attachments use the existing report.evidences list of evidence dictionaries.