Skip to content

[Feature] Add support for searching and filtering tests based on logs, traces, and error content within the report viewer. #248

Description

@reach2jeyan

Problem It Solves

Currently, tests can only be identified through names, status, or suite hierarchy. In large CI runs, engineers often remember an error message or log snippet rather than the exact test name, making failure investigation slower.
e.g. "Find all tests containing timeout, HTTP 500, or stale element errors across retries and attempts."

Proposed Solution

Allow global search across:

  • logs
  • traces
  • exception messages
  • retry attempts

Example capabilities:

  • Filter tests whose logs contain a keyword
  • Search only failed retries
  • Highlight matching log snippets in results

Example future capability

pytest --report-searchable-logs

Potential config option

reporterplus = {
    "enable_log_search": True
}

Alternatives Considered

Currently users must manually open individual test logs or rely on browser text search, which becomes difficult for large reports and retry-heavy executions.

Additional Context

Similar concepts exist in observability/logging tools, but are uncommon in lightweight pytest reporting solutions. This feature would improve CI debugging and flaky test investigation workflows.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions