Use environment variables to test different environments:
Homepage.test.ts
// In your test file
test('Homepage loads', async ({ page }) => {
  const baseUrl = process.env.ENVIRONMENT_URL || 'https://example.com'
  await page.goto(baseUrl)
  // ... rest of your test
})
Run with environment variables:
Terminal
npx checkly test --env ENVIRONMENT_URL="https://staging.example.com"