DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk6 min

How to Configure Loki for Storybook Visual Regression Testing

Configure Loki to capture Storybook reference screenshots, compare future renders, review diffs, and fail CI when baselines are missing.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To configure Loki, install it as a development dependency, initialize its settings, start Storybook, capture baseline screenshots with loki update, then compare later renders with loki test. Loki does not start Storybook for you. Review every difference before approving updated references, and in CI test a built Storybook with --requireReference so missing baselines fail instead of being created silently.

What Loki does—and what it needs from your project

Loki renders Storybook stories and compares their screenshots with reference images. A changed screenshot is a signal to inspect, not proof by itself of a bug: the difference may be an intended UI change or a rendering fluctuation. Storybook describes visual testing as screenshot comparison in its visual testing documentation.

As an Amazon Associate I earn from qualifying purchases.

Loki’s project documentation lists Node.js 16 or later as a prerequisite. Docker is optional for the Chrome Docker target, and GraphicsMagick is optional if you choose Loki’s gm diff engine. These requirements and available targets can change, so check the installation guidance for the Loki version you adopt: Loki README and Getting started.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before installing, make sure you can run your project’s Storybook locally. Loki needs a reachable Storybook server or a static Storybook build; it does not start the server itself.

#1 Best Overall
Optical Elite Digital Visual Acuity Eye Chart for Optometry, Snellen & Tumbling E, Randomize/Mirror, Works with TV/Monitor, Plug & Play, No PC Required, Auto Calibration, RF Remote, Supports 4K
  • Universal Compatibility: Designed for use with any screen, this all-in-one visual acuity chart does not require a computer. Suitable for all monitors, it's compact and easy to install. Supports HDMI connection for direct plug-and-play use.
  • Comprehensive Testing: Includes all tests such as Ishihara, Cross Cylinder, Red Green Balance, Fixation, Astigmatism, Cross Grid, Coincidence, Schober, Worth 4 Dot, Red Green Panel, Traffic Lights and more. Allows continuous testing at varying distances from 1m to 7m with random sequencing of optotypes. Offers the option for Imperial or Metric standards, plus randomize and mirror functions.
  • Plug and Play Convenience: Smart calibration ensures compatibility with any monitor or TV set. Enjoy full functionality with multiple charts for seamless testing.
  • Compact and Versatile Design: The small-sized remote is perfect for one-handed control, ensuring convenience during testing. Display video, audio, and pictures with customizable storage options. Utilizes a 5G system storage for easy access. Offers optional power supply solutions via USB port or charger.
  • RF Wireless Remote Control: Features a fluorescent keypad with RF wireless technology for hassle-free control. With omnidirectional 2.4G RF remote control, no direct aiming is required, ensuring a longer working distance, faster response time, and reliable performance.

Install and initialize Loki

  1. From the project root, install Loki as a development dependency:

    yarn add loki --dev
  2. Initialize its configuration:

    yarn loki init

    Initialization detects the project and writes default configuration. Review the generated settings rather than assuming they match your Storybook location, desired browser target, or screenshot workflow.

  3. Start Storybook using the command your project already uses. Keep it running while you capture or test screenshots. For a static workflow, build Storybook first and point Loki at the generated files instead.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
    TopTes Guard-101 Gas Detector, 4 Gas Monitor for H2S, CO, LEL and O2, with Vibration, Visual and Audible Alarms, 14h Long Battery Life, Safety Explosion-Proof, for Work, Home - Orange
    • Quick Detection, Safety First: Guard-101 4 gas monitor multi gas detector is designed for rapid detection of 4 types of gases (H2S, CO, LEL, O2). The battery life lasts up to 14 hours, ensuring long-term monitoring of gas concentrations
    • User-Friendly Design: Guard-101 gas detector is made of high-strength ABS engineering plastic, which is waterproof, dustproof, and explosion-proof. Its back clip design makes it easy to carry in the workplace. Password protection prevents accidental operation, with an initial password of "69"
    • Triple Alarm, Data Storage: Guard-101 4 gas monitor multi gas detector utilizes three alarm modes: LED light, vibration, and sound. It responds within 0.5 seconds and continues to alarm until the gas concentration returns to normal. The Guard-101 also features an alarm record storage function, allowing you to check monitoring data at any time
    • Professional Certification: The Guard-101 4 Gas Monitor has passed rigorous safety tests conducted by internationally authorized institutions. It holds valid certification and meets industry standards, ensuring high reliability and accuracy in various environments
    • What You Get: Your purchase includes a Guard-101 gas detector, a packaging box, a user manual, a charging cable, and a standard gas hood. This device is suitable for a wide range of applications, including industrial manufacturing, mining, agriculture, emergency rescue, and home use

The documented install flow is in the Loki getting-started guide. Exact package compatibility and defaults depend on the versions in your project.

Create baselines and run visual checks

  1. With Storybook available, capture the initial reference images:

    yarn loki update
  2. Inspect the captured images to confirm that the stories rendered as expected, then commit the references with your code. Loki’s documentation notes Git LFS as an option if the image collection is large.

    Rank #3
    Camera Tester, WANLUTECH 8MP TVI CVI AHD CVBS Analog Camera Tester 4.3 inches Screen UTP Cable Test RS485 PTZ Control Audio Test 12V Power Output
    • WANLUTECH analog camera tester supports to test max 8MP AHD/8MP TVI/8MP CVI/Analog CVBS camera. Using HD app can automatically recognize AHD CVI TVI cameras and display resolution and frame rate on the screen, support coaxial PTZ & call OSD menu (PLEASE NOTE that this model doe not support test IP network camera)
    • UTP Cable Tester: UTP cable continuity test and display on the screen, support to detect the near-end fault point of the RJ45 cable plug on the tester, support for measuring network cable length (When testing the length of the network cable, one end of the network cable should be connected to the tester and the other end of the cable cannot be connected to other devices), test length max 3000 meters
    • CVBS video signal test, 1 channel BNC input, NTSC/PAL (Auto adapt), PTZ control, RS485 control, Baud 600-115200bps, compatible with more than 30 protocols. Support audio test, 1 channel audio signal input, test the audio whether is normal
    • Built-in 3.7V/4000mAh battery. LED flashlight provides light for dark work environments. Power output: DC12V/1A. Power input: DC5V/2A. 4.3 inches screen, 480*272 resolution. Package include: 1x cctv tester, 1x 5V 2A USB charging cable, 1x BNC cable, 1x RS485 cable, 1x audio cable
    • PLEASE NOTE: there is a paper piece isolating the battery. Before using the tester, open the battery cover and remove the paper sheet. We are the manufacturer. Any questions, please let us know, We'll get back to you within 12 hours
  3. After UI changes, run comparisons:

    yarn loki test
  4. Inspect the current screenshots and generated differences. Fix unintended changes or rendering instability. If a change is intentional, approve the affected references only after reviewing it.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    yarn loki approve

Loki can suggest a command to update only failed cases after a test run. Its approve command also has reference/output options and a --diffOnly option to limit approval to failed tests. Consult the CLI argument reference for the exact options supported by your installed version.

Choose a browser target and screenshot configuration

Loki documents local, Docker, AWS Lambda, iOS simulator, and Android emulator targets. For typical web projects, its README recommends Chrome in Docker; verify that the target you want is supported by the Loki version you install. The target affects the rendering environment, so use the same target locally and in CI when practical.

Rank #4
Anpviz 5 Inch 4 in 1 CCTV Monitor Tester, Coaxial Analog Video CCTV Tester
  • Support up to HD TVI video surveillance testing: Support 2MP, 3MP, 4MP, 5MP 8MP. When TVI signal input, the tester will display HD TVI camera image.
  • Portable multi-functions CCTV tester with 5 inch TFT-LCD Screen(Not touch screen), 800*480 resolution, make your job more easily with this professional CCTV tester.
  • The CCTV tester builts in 18650 2600mA battery, after charging 3-4 hours, working time lasts 11 hours, long standby time. Small body, portable and easier to carry.
  • This camera tester also features a multi-purpose testing unit that includes built-in PTZ tester/controller, UTP cable test, audio surveillance test, and power output.
  • Support VGA/HDMI 1.1 Compliant Digital input, can be used for debugging DVR/NVR recorder, also can be a display.

Configuration and command-line options cover the Storybook host and port, Storybook URI, reference directory, current screenshot output, difference output, and diff engine. The documented engines are pixelmatch, looks-same, and gm. Test and update share most arguments; approval has its own reference and output options. A static build can be supplied with a file: URI using --reactUri.

You can also configure which stories are included, screenshot selection or cropping, filename formatting, and handling of failed network requests. Loki’s documented default is to fail a test when a story makes a network request that fails; fetchFailIgnore can exempt matching URLs. Keep exemptions narrow so a request failure that changes the rendered UI does not disappear from the checks. See Loki configuration and command-line arguments.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you pass Loki arguments through an npm or Yarn package script, put -- before the arguments so the package manager forwards them to Loki. For example, the form is yarn loki test -- [Loki options]; replace the bracketed description with actual options from the CLI documentation.

Best Value
RM-60 Portable Radon Detector, High-Accuracy Sensor Radon Monitor, Long-Term Monitoring, Audible & Visual Alarms, Rechargeable Radon Tester with TFT Color Display, for Home, Basement, pCi/L or Bq/m³
  • ACCURATE DETECTION: This radon detector is equipped with a high-precision semiconductor sensor and vented housing. It detects radon from 0.09–1000 pCi/L (3.3–37000 Bq/m³) and supports switching between pCi/L and Bq/m³ units for efficient, efficiently and accurately detect radon for you
  • AUDIO & VISUAL ALARM: The detector has an alarm function, and when the radon concentration exceeds the preset limit, the flashing light and buzzer will alert you. Ideal for poorly ventilated basements, homes and construction sites. Alarm threshold and alpha particle sound are adjustable as needed
  • SHORT & LONG-TERM MONITORING: This radon monitor logs detailed data. The first reading appears after 12 hours and updates every 60 minutes. It records values for multiple time periods and peak values. Data auto-saves every 6 hours. Each log provides an overview of up to 504 days, and you can store up to 10 logs for reliable long-term radon monitoring
  • EASY TO USE & PORTABLE: Equipped with a color TFT 2.0 screen and graphical UI, it clearly displays radon levels for easy operation. Its portable design with an adjustable rear stand lets you easily place and view the device anywhere
  • LONG BATTERY LIFE: 2000 mAh rechargeable lithium battery, USB Type‑C charging; full charge in 3.5 hours (power‑off). Up to 45‑day runtime in standby mode with adjustable ECO standby time. It enables continuous monitoring even during travel for your peace of mind
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Run Loki against a static Storybook in CI

A static build avoids relying on a separately managed development server during the check. The documented CI pattern is to build Storybook and then run Loki against the output directory:

yarn build-storybook
 yarn loki test --requireReference --reactUri file:./storybook-static

Use your project’s actual Storybook build command and output directory if they differ. The important CI safeguard is --requireReference: it makes missing baselines fail the check instead of allowing a normal test run to establish them. Keep baseline updates as a reviewed code change, not an automatic side effect of routine CI. See the Loki CI guide.

Make captures repeatable

Screenshot comparison is sensitive to differences in browser, runtime, fonts, timing, and content. Keep the rendering target and runtime consistent between developer machines and CI where possible. Make stories deterministic by controlling animation, time-sensitive values, asynchronous state, and network-dependent content. Loki’s flaky-test guide calls out animation and time sensitivity as sources of varying screenshots.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Animation: disable or stabilize motion for visual checks where the project allows it.
  • Time-dependent UI: provide a fixed state or filter stories whose content changes with the clock.
  • Async and network content: make the displayed state predictable; do not broadly ignore failed requests that matter to the UI.
  • Unsuitable stories: filter them out deliberately or make their rendered state deterministic rather than approving unexplained differences.

Troubleshoot common Loki failures

  • Storybook connection or navigation fails: Loki does not launch the server. Start Storybook first, check that the configured host, port, and URI match it, or use the correct file: URI for a built Storybook.
  • CI reports missing references: With --requireReference, this is an intentional failure when a baseline is absent. Capture and review the reference in the appropriate workflow, commit it, and rerun CI.
  • Many screenshots differ unexpectedly: Check whether local and CI use different browser targets or runtimes, then look for animation, font-loading, time-based, asynchronous, or network-driven content.
  • A story fails because of a request: Loki’s documented default treats failed network requests as test failures. Fix the request or make the story independent of it; use fetchFailIgnore only for URLs whose failures do not affect the rendered result.
  • Arguments in a package script have no effect: Add the package-manager forwarding separator -- before Loki’s options and confirm the option name against the installed version’s CLI documentation.
  • Approval would overwrite an unexpected change: Do not approve yet. Inspect the current screenshot and diff, identify whether the change is intended or caused by unstable rendering, and only then update the relevant references.

When a hosted visual-testing workflow may fit better

Loki is a project dependency and its documented workflow stores reference images with the project. If you need a hosted review workflow, Storybook identifies Chromatic as its cloud visual testing service; its Storybook 8 visual-testing page documents an official addon for Storybook 7.6 or higher. Check current product requirements before choosing it, since that cited page describes Storybook 8. Evaluate hosting, CI integration, browser coverage, review process, and the maintenance your team is willing to own. Chromatic is an adjacent option, not a Loki dependency: Storybook visual testing.

Or skip the browser setup

For a one-off page capture—not a replacement for Loki’s Storybook regression checks—ScreenshotNeo can return a screenshot through one GET request. Its API accepts the page URL and can return PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo to get 1,000 free screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.