---
title: "How The New York Times is scaling Unit Test Coverage using AI Tools"
description: "The New York Times Web Platforms team used an AI coding agent to raise unit test coverage across its News monorepo, taking six projects from an average of 28% to 83% coverage and the Story template from 53% to 83%, with an estimated 70% reduction in effort."
url: "https://swe.quest/articles/how-the-new-york-times-is-scaling-unit-test-coverage-using-ai-tools-a3609468d4649a31"
canonical: "https://open.nytimes.com/how-the-new-york-times-is-scaling-unit-test-coverage-using-ai-tools-fa796bf9b8d2"
source: "NYT Open"
published: "2026-01-13"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["ai-coding","testing","ai-agents","developer-productivity"]
---

# How The New York Times is scaling Unit Test Coverage using AI Tools

A post on [NYT Open](https://swe.quest/sources/nyt.md), published 2026-01-13, 10 min read, Case study. Original: [https://open.nytimes.com/how-the-new-york-times-is-scaling-unit-test-coverage-using-ai-tools-fa796bf9b8d2](https://open.nytimes.com/how-the-new-york-times-is-scaling-unit-test-coverage-using-ai-tools-fa796bf9b8d2)

## Summary

The New York Times Web Platforms team used an AI coding agent to raise unit test coverage across its News monorepo, taking six projects from an average of 28% to 83% coverage and the Story template from 53% to 83%, with an estimated 70% reduction in effort. The workflow nests an AI loop (run a custom test-cov package, find gaps, generate and run tests, re-measure) inside a human review loop. It is constrained by two hard "walls": a rule never to touch source code, and a read-only coverage report the agent cannot game. A seven-page prompt covering role, targets, commands, success criteria, guardrails such as a 10-iteration cap, and a reporting template made the process reusable. Key lessons are to keep context minimal to avoid context rot, limit scope per run so diffs stay reviewable, and involve owning teams in formal review of AI-generated tests.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- unit testing and code coverage ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))
- Jest and React Testing Library ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))
- LLM coding agents ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

test-cov, Jest, React Testing Library, context rot, The New York Times

## Related posts

- [ClickGap: Autonomous QA for ClickHouse](https://swe.quest/articles/clickgap-autonomous-qa-for-clickhouse-c4c38e14d8c1feef.md): ClickHouse · 2026-08-25 · Medium · 18 min read · AI agents, Testing, LLMs, CI/CD, Databases
  ClickGap is an autonomous QA agent that reviews every pull request merged into ClickHouse, writes and runs tests against real builds, bisects regressions, and files issues and test-only PRs without human sign-off.
- [Everything We Talked About at O11yDay London 2026](https://swe.quest/articles/everything-we-talked-about-at-o11yday-london-2026-0f7b0e96a8f38f57.md): Honeycomb · 2026-10-16 · Medium · 11 min read · AI agents, Observability, AI for coding, Code review, Cost optimization
  Across ten sessions at O11yDay London, the recurring bottleneck was not writing code but reviewing it, operating agents in production, and proving the spend is worth it.
- [Autoresearch isn’t just for training models](https://swe.quest/articles/autoresearch-isn-t-just-for-training-models-00e59e41077ad95c.md): Shopify Engineering · 2026-04-15 · Easy · 8 min read · AI agents, Performance engineering, Build systems, CI/CD, Developer productivity
  Generalizing Karpathy's Autoresearch beyond model training, Shopify built pi-autoresearch, an extension for the Pi agent harness that runs an agent in an endless loop against a single measurable metric: establish a baseline, form a hypothesis, test it, keep improvements and discard crashes or regressions.
- [Agents, Randomness, and Receipts: Notes from trivago's QA Meetup](https://swe.quest/articles/agents-randomness-and-receipts-notes-from-trivago-s-qa-meetup-6bb8ef93642d84a1.md): trivago tech · 2026-08-12 · Easy · 5 min read · Testing, AI agents, AI for coding, Developer productivity
  Recap of three QA meetup talks on verifying testing and delivery.
- [Harness engineering: leveraging Codex in an agent-first world](https://swe.quest/articles/harness-engineering-leveraging-codex-in-an-agent-first-world-2c11ac81997bc6aa.md): OpenAI · 2026-02-11 · Medium · 14 min read · AI for coding, AI agents, Developer productivity, Static analysis, Observability
  A small OpenAI team built and shipped an internal product of roughly a million lines over five months with zero manually written code, merging about 1,500 Codex-authored PRs at around 3.5 PRs per engineer per day, an estimated 10x faster than writing it by hand.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
