Seeding Test Students for Manual Testing
When implementing or testing a feature, seed students provide realistic test data with specific characteristics. This skill explains how to recommend and seed profiles appropriate for the feature being tested.
Your Job
After implementing a feature or fixing a bug, the user needs to manually test in the browser. Your job is to:
- •Read the profile definitions to find which existing profiles are relevant to the feature
- •If no existing profiles fit, create a new one
- •Tell the user how to seed and where to verify
Understanding Available Profiles
Do NOT memorize profile lists. Instead, read the source of truth:
- •Profile definitions:
apps/web/src/lib/seed/profiles.ts— theTEST_PROFILESarray. Each profile has anintentionNotesfield that explains what it tests and what UI behavior to expect. - •Profile types:
apps/web/src/lib/seed/types.ts— theSkillConfig,TestStudentProfile, and related interfaces. - •Tag derivation:
deriveTags()inprofiles.ts— shows how profiles are auto-tagged (e.g.,progressive-assistance,stale-skills,chart-test).
To find relevant profiles for a feature, grep intentionNotes or description fields in profiles.ts for keywords related to the feature.
Profile Categories
Profiles have a category field: 'bkt' (mastery scenarios), 'session' (session mode triggers), or 'edge' (edge cases and feature-specific tests).
Key SkillConfig Fields
Each skill in skillHistory can specify:
- •
targetClassification—'weak'|'developing'|'strong' - •
problems— number of practice problems to generate - •
responseTimeMsRange—{ min, max }in ms (default: 4-6s). Controls response time distribution for threshold calculations. - •
ageDays— how many days ago the skill was practiced (default: 1) - •
simulateLegacyData— omitshadHelpfield to test NaN handling
How to Seed
Via UI (recommended for manual testing)
- •Navigate to
/debug/practice - •Scroll to "Seed Test Students" section
- •Search or browse for the relevant profile(s)
- •Click "Show details" to verify the profile tests what you need
- •Select the profile(s) with checkboxes
- •Click "Seed Selected"
- •Wait for seeding to complete (shows real-time progress)
- •Click the dashboard link to view the seeded student
Via CLI
# From apps/web directory: # List all profiles npm run seed:test-students -- --list # Seed by name (substring match) npm run seed:test-students -- -n "Slow Struggling" # Seed by category npm run seed:test-students -- -c session # Seed multiple npm run seed:test-students -- -n "Slow Struggling" -n "High Variance" # Dry run (preview without creating) npm run seed:test-students -- -c edge --dry-run
After Seeding
Once seeded, the student appears in the teacher dashboard. To test:
- •Dashboard view: Go to the dashboard and switch to the seeded student
- •Practice session: Start a practice session as the seeded student
- •Family code: The seed UI shows a "Share" button to get the family access code — use this to log in as the student directly
Creating New Profiles
When no existing profile fits the feature being tested, add a new one to the TEST_PROFILES array in apps/web/src/lib/seed/profiles.ts:
- •Read the existing profiles for conventions (category, intentionNotes format, skill set constants at top of file)
- •Include detailed
intentionNotesexplaining what the profile tests and what UI behavior to expect - •Set
responseTimeMsRangeif response time distribution matters for the feature - •If the profile has a new tag-worthy property, add tag detection in
deriveTags() - •Run
npx tsc --noEmitto verify
Key Files
| File | Role |
|---|---|
apps/web/src/lib/seed/profiles.ts | Profile definitions, filtering, tags |
apps/web/src/lib/seed/types.ts | TypeScript types for profiles and skill configs |
apps/web/src/lib/seed/helpers.ts | generateSlotResults() — turns SkillConfig into problem history |
apps/web/src/lib/seed/create-student.ts | Creates student record + inserts into DB |
apps/web/src/lib/seed/bkt-simulation.ts | Generates correct/incorrect sequences for target classification |
apps/web/src/lib/seed/problem-generation.ts | Generates realistic problems for skills |
apps/web/scripts/seedTestStudents.ts | CLI entry point |
apps/web/src/app/api/debug/seed-students/route.ts | API for UI-based seeding |
apps/web/src/app/debug/practice/page.tsx | Debug practice page |