needle

Automated tests for your CSS.

Github星跟踪图

Needle

Build Status

Needle is a tool for testing visuals with Selenium
and nose.

It checks that visuals (CSS/fonts/images/SVG/etc.) render correctly by taking
screenshots of portions of a website and comparing them against known good
screenshots. It also provides tools for testing calculated CSS values and the
position of HTML elements.

Example

This is what a Needle test case looks like:

from needle.cases import NeedleTestCase

class BBCNewsTest(NeedleTestCase):
    def test_masthead(self):
        self.driver.get('http://www.bbc.co.uk/news/')
        self.assertScreenshot('#blq-mast', 'bbc-masthead')

This example checks for regressions in the appearance of the BBC's masthead.

Documentation

Full documentation available on Read the Docs.

If you'd like to build the documentation yourself, first install sphinx:

pip install sphinx

Then run:

cd docs
make html

The documentation will then be available browsable from
docs/_build/index.html.

Running Needle's test suite

First install tox (usually via pip install tox). Then:

$ tox

主要指标

概览
名称与所有者python-needle/needle
主编程语言Python
编程语言Python (语言数: 1)
平台
许可证Other
所有者活动
创建于2010-12-30 00:59:36
推送于2022-11-05 17:23:40
最后一次提交2017-04-23 22:55:57
发布数6
最新版本名称0.5.0 (发布于 )
第一版名称0.0.1 (发布于 )
用户参与
星数592
关注者数22
派生数48
提交数159
已启用问题?
问题数38
打开的问题数15
拉请求数28
打开的拉请求数5
关闭的拉请求数21
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?