Test your app against a real Zitadel server
zitadel tests add adds end-to-end tests to a Next.js app that zitadel setup wired up: a Playwright config on @zitadel/testing, a test of the sign-in, a test that starts signed in, and a test:e2e script. Each run boots its own Zitadel server. setup itself still installs no test tooling.
npx @zitadel/cli@latest tests add
@zitadel/testing/vitestruns backend tests without a browser.zitadelGlobalSetup()boots an instance for the Vitest project that lists it and stops it when the run ends or is interrupted, andinjectZitadel()gives each test the same seeding helpers asconnectZitadel(), includingseedSession()to call your API with a real session.- In React, Vue, Solid, Svelte and Qwik apps, the Vite dev proxy that
setupwrites reads the server's address fromZITADEL_URL, so a test run can point the app at its own server. Runzitadel doctor --fixin an app set up before 0.7.0; aZITADEL_URLthat your shell or CI exports now applies. - The guide shows how to sign seeded users in, start tests signed in and test passkeys.