clerk-testing

Automate Clerk authentication end-to-end tests with Playwright or Cypress.

7|3|Updated Jul 28, 2025
One-click install
npx skills add https://github.com/oaknational/oak-open-curriculum-ecosystem --skill clerk-testing-oaknational
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-testing
Source: https://github.com/oaknational/oak-open-curriculum-ecosystem/tree/main/.agents/skills/clerk-testing
Command: npx skills add https://github.com/oaknational/oak-open-curriculum-ecosystem --skill clerk-testing-oaknational

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clerk apps require reliable end-to-end tests for authentication flows. Without robust test automation, teams struggle to verify sign-in, sign-out, and session behavior as changes roll out.

Core Features & Use Cases

  • Setup and run E2E tests for Clerk authentication flows using Playwright or Cypress.
  • Manage test authentication state with storageState and reusable helpers to speed up test runs.
  • Validate common user journeys such as login, logout, and session persistence across page reloads.

Quick Start

Run your first Clerk authentication E2E test by configuring Playwright or Cypress and executing the example test provided in the kit.

Frequently Asked Questions about clerk-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate end-to-end testing for Clerk authentication flows?

You can automate Clerk authentication E2E testing using Playwright or Cypress by configuring the test environment, handling Clerk-specific tokens, and running the provided example tests for login and logout journeys.

How do I preserve Clerk authentication state across Playwright tests?

You preserve Clerk authentication state across Playwright tests by utilizing the storageState pattern and reusable helpers, which maintain consistent auth sessions and significantly speed up subsequent test runs.

Can I use Cypress instead of Playwright for Clerk E2E testing?

Yes, you can use Cypress instead of Playwright for Clerk E2E testing. The setup supports either framework to manage test authentication state, token handling, and session behavior validation.

What user journeys should I validate when testing Clerk authentication?

When testing Clerk authentication, you should validate common user journeys such as login, logout, and session persistence across page reloads to ensure reliable auth state behavior.

Why does my Clerk authentication test fail on session persistence after page reloads?

Clerk authentication tests fail on session persistence when test environments lack proper token handling or storageState setup, preventing the consistent auth state preservation needed across page reloads.

Do I need to manually handle Clerk tokens for Cypress E2E tests?

No, you do not need to manually handle Clerk tokens for Cypress tests. The testing setup automates Clerk-specific token management and storage patterns to ensure speed and reliability.