用于测试迁移时网站外观的浏览器插件

发布于 2024-07-25 22:01:24 字数 537 浏览 3 评论 0原文

我想我需要一个执行以下操作的浏览器插件,如果它不存在,它应该存在。 我现在不妨说 FF,但它可以是任何浏览器。

问题:当将网站从一台服务器移动到另一台服务器时,您需要迁移测试。 手动点击每个链接并将其与旧主机进行比较是一种痛苦。 你确实需要两台机器,或者必须不断地修改你的主机文件。

该插件:

允许您为网站指定备用主机条目。 两个条目就可以清楚地表明这一点,一个用于现场,一个用于测试。

该插件将抓取网站上的每个链接,并在浏览器中呈现页面,并保存整个页面的图像。

它将切换主机并重复,并将图像保存在第二个文件夹中。 由于渲染引擎匹配,因此图像也应该匹配。 我们需要切换主机(如 /etc/hosts),以便站点的所有绝对链接都相同。

现在这可能是插件或外部的一部分,现在我们有 2 个同名图像的文件夹,我们对整个批次运行图像差异程序。 快速测试可以是 bdiff 或散列,或者我们可以变得更复杂并确定每个图像的不同程度。

这会节省很多时间。 那么可以用现有的工具来完成吗,还是需要自己去写呢?

I'm thinking I need a browser plugin that does the following, and if it doesn't exist, it should. I may as well say FF for now, but it could be any browser.

The problem: when moving a website from one server to another, you need migration testing. It is a pain to click on every link by hand and compare it to the old host. You really need 2 machines or have to constantly thrash your hosts file.

The plugin:

Would allow you to specify an alternate hosts entry for a website. 2 entries would make it clear, one for live, one for test.

The plugin would crawl every link on the site, and render the page in the browser, and save an image of the entire page.

It would switch hosts and repeat, and save images in a second folder. Since the rendering engines match, the images should match. We need to switch hosts (like /etc/hosts) so all absolute links are the same for the site.

Now this could be part of the plugin or external, now that we have 2 folders of identically named images, we run an image-diff program on the whole batch. A quick test would be a bdiff or hash, or we could get more sophisticated and determine how different each image is.

This would save so much time. So can it be done with existing tools, or do I need to go write it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦亿 2024-08-01 22:01:24

看看 Selenium,它允许您编写与浏览器交互的脚本并验证内容。

Have a look at Selenium, it allows you to script interactions with the browser and verify content.

愚人国度 2024-08-01 22:01:24

这是过度设计的。 这是一个什么样的网站? 多大? 哪个框架(PHP、JSP、Rails 等)? 为什么不将网站复制到新服务器上并 grep 代码以与旧服务器建立特定联系?

That is overengineered. What kind of website is it? How big? Which framework (PHP, JSP, Rails, etc.)? Why not copy the website onto the new server and grep the code for specific ties to the old server?

水溶 2024-08-01 22:01:24

我会集中讨论为什么您认为两个服务器之间的站点会有所不同,并重点测试这些特定情况而不是整个站点。 当站点移动到新机器时,只需查看几个页面,问题通常就非常明显。

假定存在数据源,那么它们可能都在查看相同的数据源,否则两个安装上的文件夹差异就足够了。 在这种情况下,确定站点的哪些区域可能受到服务器迁移的影响应该是一项简单的任务。

另外,我个人不相信机器匹配两个图像来签署系统准备上线。 真正的人体测试是无可替代的。 是的,这很耗时,但是您的网站有多重要?

I'd concentrate on why you think the site would differ between two servers, and focus on testing those specific cases rather than the whole site. When a site is moved to a new machine the issues are generally very obvious from looking at a couple of pages.

Presumably they are both looking at the same data source, assuming there is a data source, otherwise a folder diff on the two installations would suffice. This being the case, it should be a simple task to identify which areas of the site are likely to be affected by a server migration.

Also, I wouldn't personally trust a machine matching two images to sign off system as ready to go live. There just isn't a substitute for real human testing. Yes it's time consuming, but how important is your site?

苹果你个爱泡泡 2024-08-01 22:01:24

尝试 http://www.browsercam.com/ - 免费试用应该允许您指定主页并跟踪链接也可以自动制作子页面的屏幕截图。

Try http://www.browsercam.com/ - free trial should allow you to specify main page and follow links to make screenshots automatically of the sub-pages as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文