CtrlK
BlogDocsLog inGet started
Tessl Logo

testing-workflow

Generates test plans, writes unit/integration/E2E test files, identifies coverage gaps, and flags common testing anti-patterns. Use when writing tests, creating test suites, planning test strategies, mocking dependencies, measuring code coverage, or test planning.

100

Quality

100%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Testing Workflow

Workflow

  1. Plan — Write a test plan using the Pre-Implementation categories below.
  2. Implement — Write unit/integration tests; run and verify passing.
  3. E2E — Run E2E tests in browser via the e2e-testing capability slot.
  4. Validate — Run the Post-Implementation Checklist.
  5. Fix loop — If any step fails → fix → re-run from step 2.

Core Rules

  • Validate every feature: happy paths, edge cases, error conditions, interactions.
  • Mandatory: Test in browser via the e2e-testing capability slot before marking complete.

E2E Context Limits

RuleDetail
One suite per sessionNever run all suites in one conversation
Max 3 screenshotsPer session
evaluate_script() over take_snapshot()Returns less data
Reload between flowsClears state
Log resultsAppend to .opencastle/logs/e2e-results.md

Suite files: see .opencastle/project.instructions.md.

Pre-Implementation Test Plan

CategoryWhat to cover
Initial statePage loads with defaults; components in expected state
User interactionsButtons, dropdowns, filters (URL params + refetch), form validation
State transitionsFilter changes produce different results; loading states; backend sync
Edge casesEmpty results, min/max boundaries, invalid input, network errors
IntegrationData flow server→UI, URL params↔state, server vs client filtering
Responsive (MANDATORY for UI)All breakpoints per browser-testing skill / validation-gates Gate 3

Coverage Requirements

LayerMinimum
Unit (functions, components, hooks)95%
Integration (boundaries, URL sync)All boundaries
E2E (journeys, interactions, errors)All critical paths

Anti-Patterns

Anti-PatternCorrect Approach
Testing only initial page loadTest filter changes and different results
Assuming filters work because they renderVerify each option changes results
Client-side onlyVerify server requests are triggered
Single scenarioTest urban, rural, edge, out-of-range
Visual inspection onlyVerify data values programmatically

Post-Implementation Checklist

  • Dev server running; app opened in browser
  • All interactive elements tested
  • Data changes verified (not just visual)
  • Edge cases: empty states, max/min values, errors
  • All project-defined responsive breakpoints checked (no overflow/breakage)
  • URL parameters correct
  • Screenshots taken of key scenarios

Commands

# Unit / integration
npx vitest run --coverage          # all tests + coverage
npx vitest run src/utils.test.ts   # single file

# E2E (Playwright)
npx playwright test                # all E2E suites
npx playwright test --ui           # interactive mode
// Unit test with mock
import { describe, it, expect, vi } from 'vitest';
import { fetchItems } from './api';

describe('fetchItems', () => {
  it('returns filtered results', async () => {
    vi.spyOn(global, 'fetch').mockResolvedValue(
      new Response(JSON.stringify([{ id: 1, name: 'test' }]))
    );
    const items = await fetchItems({ category: 'active' });
    expect(items).toHaveLength(1);
    expect(fetch).toHaveBeenCalledWith(expect.stringContaining('category=active'));
  });
});
// E2E test (Playwright)
import { test, expect } from '@playwright/test';

test('filter updates results and URL', async ({ page }) => {
  await page.goto('/items');
  await page.getByRole('combobox', { name: 'Category' }).selectOption('active');
  await expect(page).toHaveURL(/category=active/);
  await expect(page.getByRole('listitem')).not.toHaveCount(0);
});

References

ResourcePurpose
browser-testing skillChrome DevTools automation for E2E
validation-gates Gate 3Responsive breakpoint checks
project.instructions.mdSuite files, project-specific test config
Repository
monkilabs/opencastle
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.