Skip to content

[Improvement] Add support for relative paths in --uselogs #220

@Berg-Ziege

Description

@Berg-Ziege

Summary

When using --uselogs, the dashboard generates log links using absolute filesystem paths.
This works only on the machine where the dashboard was created.

In CI environments such as Jenkins, the dashboard is typically packaged into a ZIP artifact and sent via e‑mail.
Recipients opening the ZIP on their own machine see broken log links, because absolute paths cannot be resolved.

Why this should be the default

  • Portable artifacts: ZIP dashboards should work anywhere without modification.
  • CI/CD workflows: Jenkins often distributes dashboards by e‑mail; absolute links make them unusable for recipients.
  • Security: Absolute paths leak internal directory structures and usernames.
  • Consistency: Robot Framework’s own log.html/report.html use relative paths and remain fully relocatable.

Expected Behavior

--uselogs should produce relative links based on the dashboard’s location, e.g.:

./robot_reports/log.html#s1-t3

dashboard
├── project_suite_name.html
├── project_suite_name.db
└── robot_reports
    ├── output.xml
    ├── log.html
    └── report.html

This ensures the dashboard remains functional when opened from a ZIP on any machine.

Actual Behavior

Absolute paths derived from the output files are embedded into the dashboard.
When the folder is moved, archived, or unzipped on another machine, all log links break.

Requested Change

Update --uselogs so that relative log/report paths are the default behavior:

  • Generate URLs relative to the dashboard HTML file
  • Keep existing deep‑link fragments (#s1‑t2) working
  • No additional CLI arguments required
  • Server mode remains fully compatible (can still serve logs based on relative paths)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions