Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Test Wasn't Wrong. It Was Answering an Older Question.

The Test Wasn't Wrong. It Was Answering an Older Question. I shipped a change I had reviewed, simulated, and deployed. An hour later my acceptance suite was red. The obvious reading is that the change broke something. I've made that reading correct plenty of times, so I started where anyone starts: at the failure. And the failure was, in a narrow sense, true — an assertion had stopped holding. It…

The assertion that the test was inaccurate stemmed from the fact that it was evaluating data from three weeks prior. The source material outlines a scenario where a change was made and subsequently caused a failure in the acceptance suite. The initial assumption was that the change had introduced a bug, prompting an investigation that ultimately led to the discovery of different types of issues that could cause a test to fail.

Three distinct categories of red results were identified: a missing artifact, a stale expectation, and a genuine regression. Each of these scenarios presents a unique set of circumstances that can be misconstrued as a straightforward code error. The first type, a missing artifact, occurs when a fixture specified in the test suite cannot be located, resulting in a FileNotFoundError. This is typically an environment issue and is relatively straightforward to resolve.

The second category, a stale expectation, arises when a test asserts a specific value or shape that the product utilized previously, but that value or shape has since changed due to intentional updates. This type of failure indicates that the test is focused on verifying behavior from an older version of the code, which no longer holds true. Recognizing this requires comparing the test against the current codebase to identify discrepancies.

The third and most insidious failure type is a genuine regression, where the product's behavior deviates from what was expected, despite the test indicating success. This occurs when the test's expectations are no longer in sync with the current codebase, often due to historical snapshots being used as references without consideration for subsequent modifications.

The source material emphasizes the importance of correctly classifying these red failures to avoid misattributing issues to the codebase. It suggests a systematic approach to diagnosing the problem, starting with ruling out environment issues and stale expectations before considering genuine regressions. Additionally, it highlights the need for careful maintenance of test baselines and the potential pitfalls of reverting to older defaults or baselines, which can undermine the integrity of the testing process.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

WordPress Hooks Explained: How Plugins and Themes Extend Core Without Editing It

WordPress plugins and themes change what gets displayed and how data gets processed without ever touching WordPress core's own files (the code under wp-includes / wp-admin ).

  • WordPress plugins and themes use hooks to extend core functionality without altering source code.
  • Hooks come in two types: actions, for performing side effects, and filters, for altering data.

n8n-sync — Git-based version control for n8n Community Edition workflows

If you are self-hosting n8n Community Edition, you already know the pain: no built-in version control. Enterprise has Source Control at €667/mo, but for Community users, there is nothing.

  • n8n-sync offers Git-based version control for n8n Community Edition workflows
  • Features include pull, push, diff, and status commands for workflow management
  • Tool eliminates black box nature of self-hosted n8n workflows with Git integration

HELLO FRIENDS

I build crypto signal engines. My flagship system, USS (Unified Signal Scanner), combines momentum, multi-timeframe trend analysis, Smart Money Concepts, and dynamic risk management — 21 filters…

Quantified Self: How I Handled 100GB of Messy Biosensor Data with Polars and Dask

We live in the era of the "Quantified Self." Between my Oura ring, Apple Watch, and continuous glucose monitor (CGM), I’m generating more data than a mid-sized SaaS startup from 2010.

  • Process 100GB biosensor data using Polars Lazy API to avoid RAM overload
  • Align varying biosensor time series with Polars, resample, interpolate data
  • Scale processing with Dask and store results in efficient Parquet format

More from Monday 19 October →