E2E Smoke Testing Guide
Use this guide to verify the core path:
- create a job
- run the initial qualification attempt on 5 new items
- verify job enablement transitions around that initial run
- delete job and related analytics
One-Command Smoke Test
npm run e2e:smoke
The script:
- validates required OpenRouter credentials exist
- creates a temporary job in disabled state
- runs the same initial-run orchestration used by
job add - verifies the job is enabled after the initial run attempt and that a run row exists
- deletes the job in cleanup
Implementation path:
src/scripts/e2eSmoke.ts
Prerequisites
Before running smoke test:
snoopy settingshas valid OpenRouter API key- optional: configure Reddit OAuth fallback credentials for environments where unauthenticated Reddit JSON access is blocked
Check quickly:
snoopy doctor
Optional Environment Variables
SNOOPY_E2E_LIMITdefault5SNOOPY_E2E_SUBREDDITSdefaultstartups,entrepreneurSNOOPY_E2E_KEEP_JOBdefaultfalse
Example:
SNOOPY_E2E_LIMIT=5 SNOOPY_E2E_SUBREDDITS=startups,entrepreneur npm run e2e:smoke
Keep job for inspection:
SNOOPY_E2E_KEEP_JOB=true npm run e2e:smoke
Manual Equivalent Flow
If you need full manual control:
- Create job:
snoopy job add
- Run 5-item test:
snoopy job run <jobRef> --limit 5
- Inspect history:
snoopy job runs <jobRef>
- Delete and cascade cleanup:
snoopy delete <jobRef>
What Good Output Looks Like
- Run completes without errors.
- Exactly 5 new items are processed when
--limit 5is used. - Qualification reasons are concise and aligned with job prompt.
- No repeated fallback reason such as
Model output invalid; marked unqualified.
Troubleshooting
If smoke test fails:
- Run
snoopy doctor. - Verify OpenRouter API key in
settings. - If Reddit access is denied in your environment, configure Reddit OAuth fallback credentials in
settings. - Check daemon state if relevant (
daemon status). - Review logs at
<root>/logs/snoopy.log. - Re-run with
SNOOPY_E2E_KEEP_JOB=trueto inspect persisted data.