VARIANCE AUTHORITY
BrowseSupported frameworks

Your test suite

Supported frameworks

Variance Authority records which tests ran each line of your code under Vitest 4.1+, Jest 30, Rstest, Playwright, Storybook, node:test, a JVM on the JUnit Platform, Cargo, pytest, and any other runner you wrap by hand. This page lists what each of them does with that record, when a test file it leaves out could still have failed, and where each capability is turned on. Each runner named in the first table has a page of its own that takes every capability in turn.

What each runner does

Your tests run underRecords which tests ranLeaves out unreached testsSkips unreached casesShards by recorded timeTest storiesVisual review starts from
Vitest 4.1+each case; each file in browser modeitselfyesyesyesjsdom or browser mode
Jest 30each caseitselfyesyesyesjsdom
Rstesteach case; each file in browser modeitselfnonoyesjsdom or @rstest/playwright
Playwrighteach testitselfnoyesyesthe spec
Storybookeach storyvariance run --since skips themn/a: a story is a casevariance run --shardyesthe story
A JVM on the JUnit Platformeach test classvariance select prints themnononono
Cargoeach testvariance select prints themnononono
pytesteach testvariance select prints themnononono
node:testeach caseitselfnonoyesno
bun testnot recorded: no hook to attachnonononono
XCTest and Swift Testingnot recorded: variance reach answers for Swift by targetnonononono
Any other runnereach case you hand to observer.casevariance select prints themnonoyes, in Nodea custom collector

"Itself" means the runner reads VARIANCE_AUTHORITY_SINCE and never starts the files it leaves out. "variance select prints them" means the same list comes out of the CLI, one path per line, for the script that starts your runner to leave out.

When you can rely on what was left out

Every runner keeps one rule: a test file is left out only when its last whole run covered none of the code you changed. When the record cannot answer, the run skips nothing, unless you ask for --local, which keeps only the tests that import a changed file. What a skipped test promises states the rule and every case where it runs more.

What differs between runners is what the recorder can see, and that depends on one thing: whether each test file runs in a process or module graph of its own. When it does, everything the file needs runs again for it and is recorded under it. When several test files share one process, work done once for all of them is recorded under the first file that ran it. A later file that only uses the result has nothing recorded for it, so a change to that work can leave the later file out.

A test file left out this way is not a silent pass forever. When your main branch runs and records the whole suite, that run includes it, and that run is where it fails. Until then, a pull request can be green without it. When main fails that way, the failing test names the file, and the fix is on the page the table links for your runner. Many close with before: a list of files in a suite's entry in variance.config.json, and a change to any of them runs every test.

A function that returns a result it cached in an earlier case can leave out a later case of the same file, under a runner that skips cases, or a later file, where files share one module graph or page: a result a cache returned says what closes it.

Your tests run underEach test file runs inWhere a needed test file can be left out, and what closes it
Vitestits own module graph, unless isolate is falsea record needs a module graph per test file; under case grain, a later case of the same file: a result a cache returned
Rstestits own module graph, unless isolate is falsea record needs a module graph per test file
Jest 30its own module registrya later case of the same file: a result a cache returned
Playwrighta new page per test, unless you keep onea page you keep across tests: a result a cache returned
Storybookone preview for every storya later story: a result a cache returned
node:testits own processnone known: a kept file runs whole
A JVM on the JUnit Platformone JVM for every test class it runswhat a row holds
Cargoits own process, one per testfiles every target depends on
pytestone process for the whole suitewhen a left-out test could still have failed
Any other runnerwhatever your harness gives itwork of one case outside the body you hand to observer.case: Sense

bun test and Swift's runners record nothing, so they leave nothing out: every test runs. For Swift, variance reach lists what a diff can reach at target grain, and an import graph is the safe half says how far to trust it.

Record which tests ran each line

Every other capability reads this record, so it is the first thing a suite sets up. It is one wrap in the configuration your runner already reads:

Your tests run underInstallWrap
Vitest@variance-authority/sensewithTestSelection from @variance-authority/sense/vitest, around defineConfig
Jest 30@variance-authority/sensewithTestSelection from @variance-authority/sense/jest, around the configuration you export
Rstest@variance-authority/sensewithTestSelection from @variance-authority/sense/rstest, inside defineConfig
Playwright@variance-authority/playwright-testwithTestSelection from @variance-authority/playwright-test, inside defineConfig
Storybook@variance-authority/storybook-collectortests: true in storybookCollector
A JVM on the JUnit Platformthe agent and listener jarsthe agent on the test JVM
Cargo@variance-authority/clinone: variance cargo runs cargo test
pytest@variance-authority/clinone: variance python runs pytest
node:test@variance-authority/senserunNodeTest from @variance-authority/sense/node-test, in place of node --test
Any other runner@variance-authority/senseobserver.case around the body of each case

What each host records says what the record holds under each of them.

Leave out the tests a change did not reach

Under Vitest, Jest, Rstest, Playwright and node:test, VARIANCE_AUTHORITY_SINCE on the run you already call leaves out the test files the record proves a change did not reach. variance run --since leaves out the stories a change did not reach. Under a JVM, Cargo, pytest and any other runner, variance select prints the same list for the run to skip. The runner says what it kept before it starts:

selected 12 of 340

Run the tests an edit needs walks through both.

Skip the cases a change did not reach

Under Vitest and Jest, VARIANCE_AUTHORITY_GRAIN=case also skips the cases of a kept file that entered nothing the change touched. Every other runner runs a kept file whole. Skip the cases your edit did not reach says when a file still runs whole.

Split a run across CI jobs

Vitest, Jest and Playwright place test files on shards by the time each took on the mainline's last run, and variance run --shard places Storybook stories by the same rule. Split a test suite across CI jobs sets it up.

Record a test story

VARIANCE_AUTHORITY_STORY=1 records what one test did, in order, under every runner above but a JVM, Cargo and pytest. Record one lists each runner's setup.

Add visual review

Visual review captures what a test or a story renders and compares it with the approved image. Each link in the table's last column is the first page for that runner; your first run covers the choice when more than one applies.