TDD /测试CSS和HTML? [英] TDD/Testing CSS and HTML?

查看:98
本文介绍了TDD /测试CSS和HTML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有办法测试CSS和HTML吗?例如:有时一些通知受到一些CSS更改的影响。

IS there a way to test CSS and HTML? For instance: sometimes some of the notices get affected by some CSS changes. I don't want to be testing all the notices by hand every time I do a change.

感谢

推荐答案

自动测试布局非常困难。

It's very difficult to automate testing of layout. But it's not too difficult to drastically cut down the time and effort involved so that you can do it manually, but very quickly.

你可以尝试眨眼测试。

我听说过它用于这样的网站。

I've heard of it used for websites like this.


  1. 浏览您的网站,浏览尽可能多的网页。

  2. 在每个网页上,拍摄一张屏幕截图。

  3. 组合所有屏幕

  4. 现在,每一天,您都可以播放电影并观看任何问题。

  1. Write a script that walks through your website, visiting as many pages as you can think of.
  2. At each page, take a screen shot.
  3. Combine all the screen shots into a 'movie' with just a second or two for each screenshot.
  4. Now, each day you can 'play' the movie and watch it for any issues.

你甚至可以扩展bcarlso的方法,但用一个视觉检查替换MD5检查。每个页面显示1秒 - 首先是已知好的,然后是新的。你可以交替他们几次,所以任何明显的错误将出现闪烁。

You could even extend bcarlso's approach but replace the MD5 check with a visual check. Each page gets displayed for 1 second - first the known good, then the new. You could alternate them a few times so any obvious errors will appear as a flicker.

有几百页的网站可以在几分钟内进行检查。您可能不会认为这将提供足够的时间来查找问题,但它在识别您的网站的明显问题是非常有效的。

A website with hundreds of pages can be checked like this in a matter of a few minutes. You may not think this will provide enough time to find issues, but it is remarkably efficient in identifying obvious problems with your website.

任何具有主要布局问题的页面将弹出因为它们与所有其他页面的模式不匹配。

Any pages that have major layout problems will pop out at you as they don't match the same pattern as all the other pages.

这篇关于TDD /测试CSS和HTML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆