Old reference images will be shown in some server environments

未关闭
#1,600 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
javascript
领域
testing-qa

调研方向

使用 backstop reference、浏览器报告以及配置为缓存图像的服务器重现该问题。检查报告如何构建 /backstop_data/bitmaps_reference/<scenario>.png URL,并添加一个报告专用的 cache-busting 值。完成标准是:刷新的参考图像会出现在报告中,同时测试图像和差异比较继续正常工作。

由索引模型根据 Issue 内容生成。

描述

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" />

主要语言
JavaScript
星标
7.2k
派生
617
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

garris/BackstopJS 的其他 Issue

查看 garris/BackstopJS 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。