Skip to content

Old reference images will be shown in some server environments #1600

@dalin-

Description

@dalin-

Some server environments will cause stale reference images shown in the browser report. This will happen whenever the server is configured to tell the browser to cache all images. E.g.

Image

When so configured, these are the steps to reproduce:

  1. Run backstop reference to get some "reference" snapshots (e.g. of the staging environment)
  2. Open the backstop browser report.
  3. Do something to change the appearance of the reference
  4. Rerun backstop reference to get fresh "reference" snapshots
  5. Open the backstop browser report. Note how the "reference" images are from the first run and not your changed content, even though backstop is able to diff correctly. Note how the "test" images are fine, that's because they always have a new path /backstop_data/bitmaps_test/<date+time>/<scenario>.png, but "reference" images always have a constant path /backstop_data/bitmaps_reference/<scenario>.png.

Proposed solution:
Append the time that the report was created to reference images. Something like:
e.g. <img src="/backstop_data/bitmaps_reference/my-scenario.png?report-time=1234567890" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions