Write your first test
Create a passing test using the Visual Builder, Playwright codegen, or writing TypeScript directly.
Check Studio supports three authoring modes. This guide covers all three so you can choose the best fit for your team.
Option 1: Visual Builder (no-code)
- 1Open the Check Studio dashboard and click "New Test"
- 2Enter your app URL and click "Start recording"
- 3Interact with your app normally — clicks, typing, navigation
- 4Add assertions by clicking elements and selecting checks (text visible, element exists, etc.)
- 5Save and run the test
Option 2: Playwright codegen
Start codegen
Use the built-in codegen to record interactions and output Playwright code.
checkstudio codegen https://your-app.combashEdit the generated script
The output is standard Playwright code. Add assertions and structure it into a test file.
import { test, expect } from '@playwright/test';
test('homepage loads', async ({ page }) => {
await page.goto('https://your-app.com');
await expect(page.locator('h1')).toContainText('Welcome');
});typescriptOption 3: Write from scratch
Create a .spec.ts file in your tests directory. Use role-based and label-based selectors for resilience.
test('user can sign in', async ({ page }) => {
await page.goto('/login');
await page.getByRole('textbox', { name: 'Email' }).fill('user@example.com');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page.getByText('Dashboard')).toBeVisible();
});typescriptBest practice
Always prefer getByRole and getByLabel over CSS selectors. They survive DOM changes and improve accessibility.
Was this article helpful?
Still have questions?
Our support team is here to help. Reach out directly or search the docs.