Needle
github.com
What it is
Needle is an open-source Python testing library for checking rendered website visuals and layout. It captures selected page areas and compares them with baseline screenshots, helping identify visual changes in CSS, fonts, images, and SVGs. It also tests calculated CSS values and HTML element positions. Needle works with Selenium and nose, and documentation describes installing it with pip after Selenium. Browser-driver options include remote, PhantomJS, Firefox, Chrome, Internet Explorer, Opera, and Safari; NeedleFirefox is the default. PIL is the default screenshot engine, with PerceptualDiff and ImageMagick available as alternatives. PerceptualDiff and ImageMagick can create a diff PNG when comparisons fail. Tests can set viewport dimensions for responsive-site checks. Screenshot cleanup after successful tests is optional and disabled by default, while failed-comparison screenshots remain available. Package metadata describes the project as operating-system independent and for developers, while the listed platform is Linux. The repository uses a BSD license. PyPI lists version 0.5.0, released April 2, 2017, as the latest release. Needle is free and has no paid plan.
Spec sheet
- Purpose
- Needle tests CSS and other web visuals by comparing screenshots with known good screenshots.Read 10 Oct 2026 · github.com
- Intended users
- The package metadata classifies Needle for developers and as a Python testing library.Read 5 Oct 2026 · github.com
- Integrations
- The README demonstrates a nose test case using Selenium to open a web page and check an element screenshot.Read 10 Oct 2026 · github.com
- Security
- GitHub reports that the project has no SECURITY.md policy and no published security advisories.Read 5 Oct 2026 · github.com
- License
- The package metadata classifies Needle under the OSI-approved BSD License.Read 10 Oct 2026 · github.com
- Additional checks
- It also provides tools for testing calculated CSS values and HTML element positions.Read 5 Oct 2026 · github.com
- Baseline workflow
- Tests can save an initial screenshot as a baseline and compare later captures against it to detect regressions.Read 10 Oct 2026 · needle.readthedocs.io
- Browser automation
- Needle works with Selenium and nose.Read 10 Oct 2026 · needle.readthedocs.io
- Browser drivers
- The documentation lists NeedleRemote, NeedlePhantomJS, NeedleFirefox, NeedleChrome, NeedleIe, NeedleOpera, and NeedleSafari drivers.Read 5 Oct 2026 · needle.readthedocs.io
- Cleanup
- Screenshot cleanup after successful tests is optional and disabled by default.Read 5 Oct 2026 · needle.readthedocs.io
- Cleanup behavior
- Screenshot files are kept by default after successful tests, with an option to delete them; screenshots from failing comparisons remain available for inspection.Read 10 Oct 2026 · needle.readthedocs.io
- Comparison engines
- The documented screenshot engines are PIL, PerceptualDiff, and ImageMagick; PerceptualDiff and ImageMagick can produce diff images when tests fail.Read 10 Oct 2026 · needle.readthedocs.io
- Default driver
- The documentation says Needle uses NeedleFirefox by default.Read 5 Oct 2026 · needle.readthedocs.io
- Difference output
- The documentation says PerceptualDiff and ImageMagick generate a diff PNG when a test fails.Read 5 Oct 2026 · needle.readthedocs.io
- Image engines
- The default screenshot engine is PIL, with PerceptualDiff and ImageMagick also available.Read 5 Oct 2026 · needle.readthedocs.io
- Installation
- The documentation installs Needle with pip and lists Selenium as a dependency to install.Read 10 Oct 2026 · needle.readthedocs.io
- Release
- PyPI lists version 0.5.0, released April 2, 2017, as the latest release.Read 5 Oct 2026 · pypi.org
- Supported environments
- Package metadata describes Needle as operating-system independent and intended for developers.Read 10 Oct 2026 · github.com
- Viewport
- Tests can set browser viewport dimensions, which the documentation describes as useful for responsive-site testing.Read 5 Oct 2026 · needle.readthedocs.io
- Viewport testing
- Needle lets tests set browser viewport dimensions, including for responsive site testing.Read 10 Oct 2026 · needle.readthedocs.io
- Visual checks
- It can test rendered CSS, fonts, images, SVGs, calculated CSS values, and HTML element positions.Read 10 Oct 2026 · github.com
- WebDrivers
- The documentation lists Firefox, remote, PhantomJS, Chrome, IE, Opera, and Safari WebDriver options.Read 10 Oct 2026 · needle.readthedocs.io
Plans and prices
Strong points and limits
Strong points
- Captures and compares selected page areas
- Checks CSS values and element positions
- Supports multiple browser-driver options
- Viewport sizing supports responsive testing
- PerceptualDiff and ImageMagick produce diff PNGs
Limits
- Latest listed release is from April 2, 2017
- Screenshot cleanup is off by default
- Listed platform is Linux
- No SECURITY.md policy or published advisories
Who it suits
Needle suits developers building Python and browser-based visual regression tests. It is useful when Selenium, nose, baseline screenshots, and viewport checks are part of the workflow.
Verdict
Needle provides screenshot-based regression checks alongside CSS and position assertions. Its documented drivers and comparison engines offer several testing configurations, though the listed release is old.
Where Specifiction places it
- Visual Regression Testing Software#9 of 268.1
- Mod managers#53 of 787.7
- Game Mod Managers#57 of 797.6