agentleFS
cin12211cin12211/orca-q/.claude/skills/testing-orcaq/SKILL.md

testing-orcaq

Skill224 starsChanged 5 months agoMITView on GitHub

OrcaQ-specific testing guide. Use when asked to run, debug, or write tests for OrcaQ. Covers all bun test:* scripts, fixture profiles, Vitest projects (unit / nuxt / integration), and Playwright DB projects. Load BEFORE suggesting any test command so the agent uses the correct script and profile.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run isolated by DB:

    line 91
  2. Very specific:

    All use ORCAQ_ prefix. Defaults are set by start-fixtures.sh automatically.

    line 126
  3. Distinctive:

    When iterating on integration or E2E tests, start fixtures once and reuse:

    line 141
  4. Very specific:

    Use ORCAQ_KEEP_FIXTURES=1: when debugging flaky tests so containers survive after failure.

    line 159

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OrcaQ Testing — Agent Skill

Read docs/TESTING_GUIDE.md for the full reference. This skill encodes the decision rules so you choose the right command without checking every time.


1. Decision Tree — Which Command?

Is the test purely logic / no DB / no browser?
  └─ YES → bun test:unit
  └─ NO →
      Is it a Vue component test (nuxt env)?
        └─ YES → bun test:nuxt
        └─ NO →
            Is it an API / server integration test?
              └─ YES →
                  Are fixtures already running?
                    └─ YES → bun test:api:raw
                    └─ NO  → bun test:api          ← auto-provisions + cleans up
              └─ NO →
                  It is a Playwright E2E test.
                  Do you need a specific DB only?
                    └─ YES → bash scripts/test-services/run-tests.sh --fixtures=<profile> -- playwright test --project <db>
                    └─ NO  → bun test:e2e          ← all fixtures, all projects

2. npm Script Reference

ScriptWhat it doesNeeds Docker?
bun test:allAll Vitest suites (unit + nuxt + integration)No
bun test:unitUnit tests only (test/unit/)No
bun test:nuxtNuxt component tests (test/nuxt/)No
bun test:apiIntegration tests — auto starts all fixturesYes
bun test:api:rawIntegration tests — fixtures must already be upYes
bun test:e2ePlaywright — auto starts all fixturesYes
bun test:e2e:rawPlaywright — fixtures must already be upYes
bun test:coverageFull coverage reportNo
bun test:watchWatch mode (development)No
bun test:fixtures:upStart all Docker fixturesYes
bun test:fixtures:downStop and remove all Docker fixturesYes

3. Vitest Projects

Project flagFilesNotes
--project unittest/unit/**/*.{test,spec}.tsPure logic, no framework
--project nuxttest/nuxt/**/*.{test,spec}.tsVue component tests
--project integrationtest/api/**/*.{test,spec}.tsRequires all DB fixtures

Run one file:

bun vitest --run test/unit/core/helpers/myHelper.spec.ts

4. Playwright Projects & Fixture Profiles

Playwright projectFixture profile to use
commonall
postgrespostgres
mysqlmysql
mariadbmariadb
redisredis
sqlitesqlite
oraclemanual (no Docker compose profile)

Run isolated by DB:

bash scripts/test-services/run-tests.sh --fixtures=postgres -- playwright test --project postgres
bash scripts/test-services/run-tests.sh --fixtures=redis   -- playwright test --project redis
bash scripts/test-services/run-tests.sh --fixtures=sqlite  -- playwright test --project sqlite

5. Fixture Profile Reference

ProfileContainers started
postgresPostgreSQL 16 only
mysqlMySQL 8.4 only
mariadbMariaDB 11.4 only
sqlPostgreSQL + MySQL + MariaDB
redisRedis 7.4 only
mongodbMongoDB 7 only
sqliteFile prep only (no Docker)
allAll of the above
noneNothing

Manual fixture control:

bash scripts/test-services/start-fixtures.sh --profile <profile>
bash scripts/test-services/stop-fixtures.sh  --profile <profile>

6. Key Env Vars

All use ORCAQ_ prefix. Defaults are set by start-fixtures.sh automatically.

ORCAQ_POSTGRES_PORT=5432      ORCAQ_POSTGRES_DATABASE=pagila
ORCAQ_MYSQL_PORT=3306         ORCAQ_MYSQL_DATABASE=sakila
ORCAQ_MARIADB_PORT=3307       ORCAQ_MARIADB_DATABASE=sakila
ORCAQ_REDIS_PORT=6379
ORCAQ_KEEP_FIXTURES=1         # keep containers alive after run
ORCAQ_FIXTURE_PROFILE=all     # override profile via env

7. Fast Iteration Pattern

When iterating on integration or E2E tests, start fixtures once and reuse:

bun test:fixtures:up           # 1× — start all containers
bun test:api:raw               # run repeatedly
# or
bun test:e2e:raw               # run repeatedly
bun test:fixtures:down         # done

8. Rules the Agent Must Follow

  1. Never run test:api or test:e2e when fixtures are already up — use the :raw variant to avoid double-provisioning.
  2. Never start all fixtures to test a single DB — use the matching profile.
  3. Always run bun test:unit after any source change to verify no regression before running heavier suites.
  4. Do not run bun test:all for a change scoped to one DB — pick the narrowest relevant suite.
  5. Use ORCAQ_KEEP_FIXTURES=1 when debugging flaky tests so containers survive after failure.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.