Supercheck LogoSupercheck

Playground

Interactive test editor with AI assistanceEdit

Write, run, and debug test scripts in the Playground. Review AI suggestions before applying them.

Playground Editor

Editor Features

Use the editor to write and check your script:

  • Syntax Highlighting — Full TypeScript/JavaScript support with Playwright API recognition
  • Auto-completion — IntelliSense for Playwright methods, selectors, and assertions
  • Error Detection — Real-time syntax validation before you run
  • Code Formatting — Automatic formatting for clean, readable code
  • Variable Access — Use getVariable() and getSecret() for project configuration

Running Tests

Use the Playground to check a script before adding it to an automated job or monitor.

  1. Click Run.
  2. Watch the run status and live logs in the results panel.
  3. Open the report when the run finishes. Review errors and available screenshots or traces.
  4. Update the script and run it again until it checks the expected behavior.
  5. Save the test to reuse it in a job or synthetic monitor.

Use Cancel to stop a running test. Review the cancellation details in its result.

You can save a draft at any time, including before the test has run or while it is failing. Run and validate the test before relying on it in a job or monitor.

Scroll horizontally to view the full diagram.

Loading diagram...

AI Create

Describe the behavior you want to test. AI Create suggests a script for you to review, edit, and run.

Beta Feature: AI-generated browser tests may require refinement. For best results, record your test first using the Supercheck Recorder Extension or Playwright's codegen, then use AI Create to enhance or modify it. Review all generated code before running.

AI Create Prompt

How to Use AI Create

  1. Click the AI Create button (purple gradient)
  2. Describe what you want to test in natural language
  3. Click Generate to start streaming the code
  4. Review the generated script in the diff viewer
  5. Click Apply to Editor to use the code, or Discard to close it

AI Create Result

Writing Effective Prompts

Good prompts are specific and include:

  • The user action you want to test
  • Expected outcomes or assertions
  • Any specific elements or data to interact with

Example prompts:

PromptIntended Check
"Test login with email [email protected] and password test123, verify dashboard loads"Complete login flow with form filling, submission, and URL assertion
"Check that the /api/health endpoint returns 200 and includes status: ok"API test with fetch, status check, and JSON body validation
"Verify user can add a product to cart, view cart, and see correct total"Multi-step e-commerce flow with navigation and assertions
"Test that the contact form validates required fields and shows error messages"Form validation test with empty submission and error checking

Review Generated Code

Check the target URL, selectors, credentials, waits, and assertions. Run the script to confirm it tests the expected behavior.

AI Fix

After a failed run, use AI Fix to review suggested changes. Apply only changes you understand, then run the test again.

AI Fix Button

Use AI Fix

  1. Run a test that fails
  2. Click the AI Fix button (appears after failure)
  3. AI analyzes the error report and your code
  4. A diff viewer shows original vs. suggested fix
  5. Review changes, edit if needed, then Accept & Apply or Reject

AI Fix Result

What AI Fix Can Repair

AI Fix is effective for code-level issues that can be resolved by modifying your test:

Issue TypeExampleAI Fix Action
Selector IssuesElement not found, wrong selectorUpdates selector to match current DOM
Timing ProblemsElement not visible, timeoutAdds appropriate waits or increases timeout
Assertion FailuresExpected value mismatchCorrects assertion or expected value
Navigation ErrorsPage not loading, wrong URLFixes URL or adds navigation waits

Review the suggested diff before applying it, then run the test again to verify the change.

Templates

Start with pre-built templates for common testing scenarios. Templates provide working code that you can customize for your application.

Code Templates

Available Templates

CategoryTemplates
Browser FundamentalsUI Smoke (navigation), Browser selection with tags, Comprehensive Browser Test
Auth FlowsAuth flow (login + logout)
Responsive & DevicesMobile / responsive layout, Device emulation (geo, locale, timezone)
Data-DrivenData-Driven Test (File Variable)
DiagnosticsFailure Diagnostics
AuthenticationPasskey Registration and Sign-In
AI ApplicationsWebMCP Tools (Experimental, Chromium)
ReliabilityShared Resource Lock

Using Templates

  1. Click Templates in the editor toolbar
  2. Browse categories or search for specific scenarios
  3. Click a template to preview the code
  4. Click Apply Template to insert it into the editor
  5. Customize URLs, selectors, and test data for your app

Test Reports

Every test run generates a detailed report with artifacts for debugging:

Playground Report

Report Contents

ArtifactDescriptionUse For
ScreenshotsCaptured at each step and on failureVisual verification, debugging UI issues
TraceInteractive step-by-step replayUnderstanding test flow, timing issues
Console LogsBrowser console outputJavaScript errors, debug messages
NetworkAll HTTP requests and responsesAPI debugging, performance analysis

Viewing Traces

The Playwright Trace Viewer lets you:

  • Step through each action in your test
  • See the page state before and after each step
  • Inspect DOM elements and their properties
  • View network requests with timing
  • Debug timing and selector issues

Using Variables

Access project-level configuration, secrets, and file-backed test data in your tests:


// Regular variables (logged normally)
const baseUrl = getVariable('BASE_URL');
const timeout = getVariable('TIMEOUT');

// Secrets are resolved at runtime and redacted from logs
const apiKey = getSecret('API_KEY');
const password = getSecret('DB_PASSWORD');

// File-backed test data
const usersCsv = readFile('USERS_CSV');

// Using in Playwright
await page.goto(baseUrl);
await page.fill('#password', password);

Keep credentials in Secrets and use File variables for non-sensitive fixtures and datasets. Avoid logging secret values.

See Variables for setup instructions.

Learn More

For deeper understanding of the testing frameworks used in Supercheck:

On this page