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 20.19+ or 22.12+ installed
  • A Checkly account (sign up at checklyhq.com)
  • Basic familiarity with JavaScript/TypeScript

Step 1: Initialize Your Project

Start by creating a new Checkly project using the CLI:
Terminal
This command will:
  • Create a new project directory
  • Install the Checkly CLI and dependencies
  • Set up a basic project structure
  • Generate example checks to get you started
You’ll be prompted to:
  • Choose your project name
  • Select your preferred language (JavaScript or TypeScript)
  • Configure basic project settings

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 Locally

Before deploying, test your checks locally:
Terminal
The local test runner will:
  • Execute your Playwright tests
  • Run API checks
  • Generate screenshots, videos, and traces
  • Provide detailed output and debugging information

Step 6: 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:
Checkly.config.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.