Storybook test-runner "No tests found" in CI
The test-runner generates one test per story from the served Storybook's index. "No tests found" means it connected but the index was empty, or it looked in the wrong place, so there was nothing to run.
What this error means
The runner exits reporting "No tests found" even though Storybook builds and has stories.
test-runner
No tests found, exiting with code 1
Ran all test suites.Common causes
Testing a stale or empty static build
The runner points at a storybook-static that was built without stories, so its index.json lists none.
A URL pointing at the wrong Storybook
The --url reaches a server that is not the Storybook with your stories, so the index is empty.
How to fix it
Test a fresh build that includes stories
- Rebuild Storybook so
storybook-static/index.jsonincludes your stories. - Serve that build and point the runner at it.
- Re-run so the index yields tests.
Terminal
npm run build-storybook
npx http-server storybook-static --port 6006 --silent &
npx wait-on tcp:127.0.0.1:6006
npx test-storybook --url http://127.0.0.1:6006Confirm story globs are not empty
If the build has no stories, fix the stories glob first (see the no story files error).
How to prevent it
- Serve the same build you tested, freshly built with stories.
- Verify the runner URL matches the served Storybook.
- Fail CI if the story count is unexpectedly zero.
Related guides
Storybook "No story files found for the specified pattern" in CIFix Storybook "No story files found for the specified pattern" in CI - the glob in .storybook/main.js matched…
Storybook test-runner "Timeout waiting for Storybook to be ready" in CIFix @storybook/test-runner "Timeout waiting for Storybook to be ready" in CI - the runner needs a served Stor…
Storybook test-runner "Cannot connect to Storybook at http://127.0.0.1:6006" in CIFix @storybook/test-runner "Cannot connect to Storybook at http://127.0.0.1:6006" in CI - the runner reached…