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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?