Supercheck LogoSupercheck

Quick Start

Edit on GitHub

Run your first test in 5 minutes

Prerequisites

  • A Supercheck instance (cloud or self-hosted)
  • A URL to test

Create Account

Sign up at your Supercheck instance and create an organization.

Create a Test

Go to Create and select a test type:

/**
 * Playwright browser test.
 * 
 * Purpose:
 * - Verify that the application loads correctly
 * - Check that critical UI elements are visible
 * - Perform basic user interactions
 * 
 * @requires @playwright/test
 */

import { expect, test } from '@playwright/test';

test('homepage loads and renders UI', async ({ page }) => {
  // Navigate to your application
  await page.goto('https://demo.playwright.dev/todomvc');

  // Verify page title
  await expect(page).toHaveTitle(/TodoMVC/);
  
  // Verify input is visible
  await expect(page.getByPlaceholder('What needs to be done?')).toBeVisible();

  // Perform interaction
  await page.getByPlaceholder('What needs to be done?').fill('Test task');
  await page.keyboard.press('Enter');
  
  // Verify task was added
  await expect(page.getByRole('listitem').first()).toContainText('Test task');
});
/**
 * API health check with contract validation.
 * 
 * Purpose:
 * - Verify API is up and running (status 200)
 * - Check response headers
 * - Validate JSON structure and data types
 * 
 * @requires @playwright/test
 */

import { expect, test } from '@playwright/test';

test('API returns expected response', async ({ request }) => {
  // Send GET request
  const response = await request.get('https://jsonplaceholder.typicode.com/posts/1');

  // Verify status and headers
  expect(response.ok()).toBeTruthy();
  expect(response.status()).toBe(200);
  expect(response.headers()['content-type']).toContain('application/json');

  // Validate JSON structure
  const body = await response.json();
  expect(body).toMatchObject({ id: 1 });
  expect(typeof body.title).toBe('string');
});
/**
 * PostgreSQL database health check.
 * 
 * Purpose:
 * - Verify database connectivity
 * - Check table structure and columns
 * - Execute basic read operations
 * 
 * @requires @playwright/test, pg
 */

import { expect, test } from '@playwright/test';
import { Pool } from 'pg';

const pool = new Pool({
  connectionString: 'postgres://user:password@localhost:5432/dbname',
});

test.afterAll(async () => {
  await pool.end();
});

test('database returns expected data', async () => {
  // Execute SELECT query
  const result = await pool.query('SELECT id, email FROM users LIMIT 1');
  
  // Verify results
  expect(result.rowCount).toBeGreaterThan(0);
  expect(result.rows[0]).toHaveProperty('email');
});
/**
 * k6 performance test.
 * 
 * Purpose:
 * - Verify system availability (uptime)
 * - Check basic latency performance
 * - Ensure system is ready for production load
 * 
 * Configuration:
 * - VUs: 3 virtual users
 * - Duration: 30 seconds
 * - Thresholds: Error rate <1%, p95 latency <800ms
 * 
 * @requires k6 binary
 */

import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = {
  vus: 3,           // 3 concurrent users
  duration: '30s',  // Run for 30 seconds
  thresholds: {
    http_req_failed: ['rate<0.01'],      // Error rate < 1%
    http_req_duration: ['p(95)<800'],    // 95% of requests < 800ms
  },
};

export default function () {
  const response = http.get('https://test-api.k6.io/public/crocodiles/1/');

  // Validate response
  check(response, {
    'status is 200': (res) => res.status === 200,
    'body is not empty': (res) => res.body && res.body.length > 0,
  });

  sleep(1);
}
/**
 * Custom test with fixtures and page objects.
 * 
 * Purpose:
 * - Create reusable test components
 * - Implement Page Object Model (POM)
 * - Abstract common actions into fixtures
 * 
 * @requires @playwright/test
 */

import { test as base, expect } from '@playwright/test';

// Define custom fixture
class TodoPage {
  constructor(private page: any) {}

  async goto() {
    await this.page.goto('https://demo.playwright.dev/todomvc');
  }

  async addTodo(text: string) {
    await this.page.getByPlaceholder('What needs to be done?').fill(text);
    await this.page.keyboard.press('Enter');
  }

  async getTodoText(index: number) {
    return this.page.getByRole('listitem').nth(index).textContent();
  }
}

// Extend base test with fixture
const test = base.extend<{ todoPage: TodoPage }>({
  todoPage: async ({ page }, use) => {
    const todoPage = new TodoPage(page);
    await use(todoPage);
  },
});

test('custom fixture example', async ({ todoPage }) => {
  await todoPage.goto();
  await todoPage.addTodo('Custom fixture task');
  expect(await todoPage.getTodoText(0)).toContain('Custom fixture task');
});

Run Test

Click Run in the playground. View results with screenshots and logs.

Create Job

Group tests into a job for scheduling:

  1. Go to Jobs → Create Job
  2. Add your tests
  3. Set schedule (cron)
  4. Enable alerts

Set Up Alerts

Connect notification providers:

  1. Go to Alerts → Add Provider
  2. Choose Slack, email, or webhook
  3. Test the connection

Next Steps