Skip to main content
Checkly enables you to transform your existing Playwright tests into powerful synthetic monitors that run continuously across global locations. This guide will walk you through creating your first test, from setup to deployment.
  • Node.js 22.13+ installed
  • A Checkly account (sign up at checklyhq.com)
  • Basic familiarity with JavaScript/TypeScript

Step 1: Initialize Your Project

In your project folder, set up Checkly using the CLI:
Terminal
This command will:
  • Set up Checkly in your current folder, and offer to create a package.json if there isn’t one
  • Install the Checkly CLI and dependencies
  • Create a checkly.config.ts file
  • Optionally add example checks to get you started
You’ll first be asked whether your AI agent should set up Checkly. Answer yes to install the Checkly skill for your AI coding agent, or no to set up the project yourself and add the demo checks.

Step 2: Project Structure

After initialization, your project will have the following structure:

Step 3: Configure Your Project

Open checkly.config.ts to configure your monitoring setup:
checkly.config.ts

Step 4: Write Your First Test

Create a new Playwright test file in the __checks__ directory:
Playwright.test.ts

Step 5: Test Your Checks

Before deploying, run your checks on Checkly to make sure they pass:
Terminal
npx checkly test runs your checks from Checkly’s infrastructure, not on your machine. It will:
  • Execute your Playwright tests
  • Run API checks
  • Generate screenshots, videos, and traces
  • Provide detailed output and debugging information

Step 6: Deploy Your Checks

Deploy your checks so Checkly runs them on a schedule:
Terminal

Step 7: View Results

After deployment, you can:
  • View check results in the Checkly dashboard
  • Set up alert channels to get notified of failures
  • Access detailed traces and screenshots
  • Monitor performance trends over time

Advanced Check Configuration

For more control over your Browser checks:
__checks__/advanced-browser.check.ts

Best Practices

  1. Start Simple: Begin with basic page load tests before adding complex interactions
  2. Use Page Object Model: Organize your tests with reusable page objects
  3. Test Critical User Journeys: Focus on the most important user flows
  4. Set Appropriate Frequencies: Don’t over-monitor; balance coverage with costs
  5. Use Environment Variables: Keep sensitive data and URLs configurable
  6. Add Meaningful Assertions: Test both functionality and performance
  7. Take Screenshots: Helpful for debugging when tests fail
  8. Monitor APIs and UI: Combine browser and API checks for comprehensive coverage

Troubleshooting

Common Issues

Check fails locally but works in browser:
  • Verify selectors are stable
  • Add proper waits for dynamic content
  • Check for timing issues
Environment variable not found:
Terminal
Login required for testing:
Playwright.test.ts
Getting help:

Next Steps

Once you have your first test running:
  1. Add More Tests: Cover additional user journeys and API endpoints
  2. Set Up CI/CD: Integrate Checkly into your deployment pipeline
  3. Configure Alerts: Set up notifications for your team
  4. Explore Traces: Use OpenTelemetry integration for deeper insights
  5. Scale Your Monitoring: Add checks for different environments and regions
Congratulations! You’ve successfully created your first Checkly test. Your application is now being monitored continuously across global locations, helping you catch issues before your users do.