Loki vs Needle
Loki
loki.js.orgNeedle
github.comSide by side
| Figure | Loki | Needle |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| Windows | Yes | — |
| macOS | Yes | — |
| Linux | Yes | Yes |
| iOS | Yes | — |
| Android | Yes | — |
| Self-hosted | Yes | — |
| Plans published | 1 | 1 |
| Spec score · Visual Regression Testing Software | 8.6 (#4) | 8.1 (#9) |
| License | The project repository identifies Loki as MIT licensed. | The package metadata classifies Needle under the OSI-approved BSD License. |
| Purpose | Loki tests Storybook projects for visual regressions by comparing screenshots with reference images. | Needle tests CSS and other web visuals by comparing screenshots with known good screenshots. |
| Security | The command-line reference documents a `chromeDockerWithoutSeccomp` option, which defaults to false. | GitHub reports that the project has no SECURITY.md policy and no published security advisories. |
Plans
In their own words
Loki
Loki is a free, MIT-licensed tool for checking Storybook projects for visual regressions. It captures story screenshots and compares them with reference images, producing visual differences for review. The workflow is to create reference screenshots, run comparisons, review the differences, and approve updated references. Loki is designed for continuous integration, where tests can fail if reference images are missing. Capture targets include Chrome in Docker or locally, Chrome in AWS Lambda, the iOS simulator, and the Android emulator; an AWS Lambda renderer is available for large test suites. Node 16 or later is required. Recent Storybook versions need no extra integration for non-React Native projects, while React Native setup uses an import in `storybook/storybook.js`. Projects can configure Loki in a `package.json` section or supported Loki configuration files. Loki does not start Storybook or simulator and emulator servers, so they need to be running before tests. Documented animation limitations include looping requestAnimationFrame animations, GIFs, SVG animations, native Lottie animations, and React Native Animated.
Needle
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.