skip to navigation
skip to content

Not Logged In

needle 0.2.0

Automated testing for your CSS.

Latest Version: 0.3

[![Build Status](https://travis-ci.org/bfirsh/needle.png?branch=master)](https://travis-ci.org/bfirsh/needle)

Needle is a tool for testing your CSS with [Selenium](http://seleniumhq.org/) and [nose](http://somethingaboutorange.com/mrl/projects/nose/).

It checks that CSS renders 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 is on [Read the Docs](http://needle.readthedocs.org/).

Running Needle’s test suite

$ nosetests
 
File Type Py Version Uploaded on Size
needle-0.2.0.tar.gz (md5) Source 2014-04-08 41KB
  • Downloads (All Versions):
  • 49 downloads in the last day
  • 421 downloads in the last week
  • 483 downloads in the last month