Chuyển tới nội dung chính
E2E Test Compilerv2.2.3

AI writes tests.
Sungen compiles them.

Tell AI to explore your web app — it generates Gherkin scenarios, selectors, and test data. Sungen compiles them into Playwright tests. Deterministic. Repeatable. No code needed.

Works withClaude CodeGitHub CopilotMCP PlaywrightPlaywright
4
CLI Commands
70
Test Patterns
5
AI Skills
sungen
$ sungen init --base-url https://app.com Project initialized Playwright installed AI rules generated # AI explores page & generates files $ /sungen:make-tc login Visiting /auth/login... Taking accessibility snapshot... login.feature test-data/login.yaml # Compile & run with auto-fix $ /sungen:make-test login Compiled login.spec.ts 3 tests passed

Key Features

Everything you need to go from a web page to running Playwright tests

🎯
Deterministic Compiler

Same input always produces the same output. No AI at compile time — Gherkin + YAML in, Playwright .spec.ts out.

🧠
AI-Powered Workflow

AI explores your live page via MCP Playwright, generates test definitions, and auto-fixes failures up to 5 retries.

📝
Plain English Tests

Write Gherkin scenarios anyone can read. QA reviews test cases, not code. 18 pattern shapes cover all interactions.

🔧
Self-Healing Tests

When tests fail, AI reads the error, fixes selectors or test data, recompiles, and retries automatically.

🔌
Works with Your AI

Built-in commands and skills for Claude Code and GitHub Copilot. Just type a slash command to start.

🔐
Auth Support

Capture SSO/login state with sungen makeauth. Tag scenarios with @auth:role for authenticated tests.

Why Sungen?

See the difference between traditional E2E testing and Sungen

✗ Without Sungen
  • Write Playwright code by hand
    Every selector, every assertion, every test — manual
  • Debug selectors manually
    Inspect DOM, guess selectors, trial and error
  • QA needs coding skills
    Only developers can write and maintain tests
✓ With Sungen
  • AI generates everything
    Explores page, writes Gherkin + selectors + test data
  • Real selectors from live DOM
    AI maps accessibility roles and names automatically
  • QA reviews plain English
    Gherkin scenarios anyone can read and validate
70
Test patterns
18
Gherkin shapes
79
Code templates
100%
Deterministic

AI-Powered Workflow

4 steps from project setup to passing tests — AI handles the heavy lifting

🚀
Step 1
Init Project
sungen init
Scaffolds project, installs Playwright, generates AI rules
📁
Step 2
Add Screen
/sungen:add-screen
AI creates screen directory with empty templates
🧠
Step 3
AI Creates Tests
/sungen:make-tc
AI explores page (or Figma/image), generates .feature + test-data
Step 4
Compile & Run
/sungen:make-test
Compiles, runs tests, auto-fixes failures (up to 5x)
StepClaude CodeGitHub Copilot
Add Screen/sungen:add-screen login /login/sungen-add-screen login /login
Create Tests/sungen:make-tc login/sungen-make-tc login
Compile & Run/sungen:make-test login/sungen-make-test login

How It Works

Gherkin + YAML in, Playwright tests out — deterministic compilation

INPUT — Gherkin + Selectors
# login.feature Feature: Login Screen Path: /auth/login Scenario: User logs in Given User is on [Login] page When User fill [Email] field with {{valid_email}} And User fill [Password] field with {{valid_password}} And User click [Login] button Then User see [Dashboard] page # selectors/login.yaml email: type: 'role' value: 'textbox' name: 'Email'
OUTPUT — Playwright .spec.ts
import { test, expect } from '@playwright/test'; test.describe('Login Screen', () => { test('User logs in', async ({ page }) => { // Given User is on [Login] page await page.goto('/auth/login'); // When User fill [Email] field await page .getByRole('textbox', { name: 'Email' }) .fill('user@test.com'); // And User click [Login] button await page .getByRole('button', { name: 'Login' }) .click(); }); });

Ready to automate your E2E tests?

Install Sungen, run one command, and let AI handle the rest.