TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Store screenshots of your web app in Git

44 点作者 glebm将近 12 年前

7 条评论

afhof将近 12 年前
Do not do this. This goes in the bucket of ideas-that-sound-good-but-aren&#x27;t. If screen diffing is how you want to test your program, you should use &#x2F; write an independent program to do so.<p>That said, there are some serious problems to using screen diffing. First, it requires manual testing. You will need a pair of human eyes to determine if a change is breaking or not. Second, there are a lot of false positives that make testing slow. When a few pixels are moved on the page, is it okay? Third, there&#x27;s a _LOT_ of data you will need to look at before you can be confident about the diffs. You will need to do a screen shot for each page for each resolution for each git commit.<p>The signal to noise ratio is very low for screen diffing. You would be MUCH better served by using (in the case of web apps) Selenium web driver tests to make sure your page works. As a bonus, with automated tests you can use git bisect to quickly find the offending commit!
评论 #6267548 未加载
peterhunt将近 12 年前
I think this is a great idea; it&#x27;s what we do at Instagram and we use Huxley[0] to generate these screenshots. Keeping a set of &quot;golden&quot; screen shots and being able to view their history over time is awesome.<p>[0] <a href="http://github.com/facebook/huxley" rel="nofollow">http:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;huxley</a>
评论 #6268107 未加载
languagehacker将近 12 年前
This is a good point. Screenshots are a nice visual way of being able to determine where something broke.<p>It&#x27;s worth noting that this is also something Selenium does, so you could just add the screenshots from that layer of integration testing to version control and require these tests be done at each commit or merge. To justinjlynn&#x27;s point, you should have a separate repo for this due to some of Git&#x27;s struggles with extremely large blobs.<p>Just a helpful hint, in terms of authorship: &quot;Cut out all those exclamation points. An exclamation point is like laughing at your own jokes.&quot; —F. Scott Fitzgerald
评论 #6266769 未加载
justinjlynn将近 12 年前
This could make for some huge git repositories, storing largish binary files in git is a real trap for young players.
评论 #6267353 未加载
评论 #6266607 未加载
hoka将近 12 年前
I wonder if there would be some way to host the images externally (imgur, for example) and have a git hook to add the image links to a file that is version controlled. Depending on the markup, GitHub could pull the images in.
评论 #6268099 未加载
victoriap将近 12 年前
Does Git have any advantages to store non-textual data? Does it have optimization for storage, access and version control?
评论 #6268145 未加载
barbs将近 12 年前
Awesome idea. What&#x27;s a good non-github way of rendering image diffs?
评论 #6268095 未加载
评论 #6267253 未加载