Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/python-needle/needle
Automated tests for your CSS.
https://github.com/python-needle/needle
css python screenshot testing
Last synced: 2 months ago
JSON representation
Automated tests for your CSS.
- Host: GitHub
- URL: https://github.com/python-needle/needle
- Owner: python-needle
- License: other
- Created: 2010-12-30T00:59:36.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2022-11-05T17:23:40.000Z (about 2 years ago)
- Last Synced: 2024-04-13T01:11:47.505Z (9 months ago)
- Topics: css, python, screenshot, testing
- Language: Python
- Homepage: https://needle.readthedocs.io/
- Size: 189 KB
- Stars: 592
- Watchers: 23
- Forks: 50
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
- awesome-regression-testing - Needle - Needle is a tool for testing visuals with Selenium and nose (Python). (Tools and frameworks)
- awesome-regression-testing - Needle - Needle is a tool for testing visuals with Selenium and nose (Python). (Tools and frameworks (a-z↓))
README
Needle
======[![Build Status](https://travis-ci.org/python-needle/needle.png?branch=master)](https://travis-ci.org/python-needle/needle)
Needle is a tool for testing visuals with [Selenium](http://seleniumhq.org/)
and [nose](https://nose.readthedocs.io/).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:
```python
from needle.cases import NeedleTestCaseclass 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](https://needle.readthedocs.io/).
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