# Upgrade a framework without breaking what users do

> A major Next.js or React upgrade builds, passes type checks and still changes behaviour, like caching. Run your saved user journeys against the upgrade's preview first.

By Jason Nguyen, Founder, Testsy. Published 2026-11-21. https://testsy.dev/blog/upgrade-a-framework-without-breaking-user-flows/

## It compiles. Does it still work?

Framework upgrades are the changes most likely to pass every check you have and still break something a user does. The build succeeds, the types check, the unit tests pass, and the behaviour underneath has moved.

Next.js shows it clearly, because its recent majors changed defaults on purpose:

- **Next.js 15** changed the caching default for `GET` route handlers and the client router cache [from cached to uncached](https://nextjs.org/15).
- **Next.js 16** replaced the App Router's implicit caching with explicit Cache Components, [a complete departure](https://www.infoq.com/news/2025/12/nextjs-16-release) from earlier versions. One team found their [Vercel costs spiked](https://community.vercel.com/t/why-vercel-costs-spiked-after-upgrading-next-js-from-version-15-to-16/36894) after the upgrade because pages that used to be cached were now served dynamically; another wrote up [four places Next.js 16 broke their app without an error](https://dev.to/shubhradev/nextjs-16-broke-my-app-in-4-places-and-none-of-them-threw-an-error-51mn).

Caching is the dangerous kind of change because it is invisible in code review. Data that is cached when it should not be shows one user's stale numbers, or worse, a page built for someone else. Data that is not cached when it should be costs money and time.

## What to test after an upgrade

Not everything. The journeys where behaviour, not layout, would change:

- **Save, then reload.** Create or edit something, reload, check the new value is shown, not the old one. Stale caches show up here first ([saved, then gone after a refresh](https://testsy.dev/blog/saved-then-gone-after-a-refresh/)).
- **Two people.** One person changes something, a second person in a separate browser must see it, and must not see the first person's private data ([two people, two browsers](https://testsy.dev/blog/test-that-one-user-cannot-see-another-users-data/)).
- **Sign-in and sign-out.** Middleware and route protection change between majors; check a signed-out visitor is sent to sign-in from a private page.
- **Forms that post.** Server actions and route handlers are where defaults moved.
- **Anything with a number that changes:** a cart total, a usage counter, a list after a delete ([numbers on screen](https://testsy.dev/blog/check-totals-prices-and-numbers-on-screen/)).

## Run them on the upgrade's preview

Do the upgrade on a branch, deploy a preview, and run your saved tests against the preview's address before you merge. A run can start at another address without changing the saved test, which is how [Vercel previews](https://testsy.dev/blog/test-every-vercel-preview-before-merge/) are tested; the same post shows how to do it on every push with GitHub Actions.

Then compare: a test that passed on production and fails on the preview points at the upgrade, with the step, what was expected and what was seen.

## Upgrades your coding agent makes

Coding agents upgrade dependencies too, often as a side effect of fixing something else. If your agent can run tests ([Claude Code](https://testsy.dev/blog/make-claude-code-test-what-it-built/), [Cursor](https://testsy.dev/blog/let-cursor-check-its-own-work-in-a-browser/), [Codex](https://testsy.dev/blog/let-codex-check-its-own-work-in-a-browser/)), ask it to run the saved journeys after any change to `package.json`, not only after features.

This post is part of [Release testing for product teams](https://testsy.dev/blog/release-testing-for-product-teams/).
