Web2Comics

Web2Comic Bot Testing Guide

Cross references:

Scope note:

Public Commands To Cover In Tests

Scope

This document covers local, integration, and remote validation for the Render webhook bot.

1) Fast Local Suite

Run core local checks:

npm run test:telegram:local

Run full render test suite:

npm run test:telegram

2) Focused Suites

npx vitest run -c telegram/vitest.config.js telegram/tests/interaction-suite.test.js
npx vitest run -c telegram/vitest.config.js telegram/tests/webhook-rest.test.js
npx vitest run -c telegram/vitest.config.js telegram/tests/generate.test.js
npx vitest run -c telegram/vitest.config.js telegram/tests/telegram-api.test.js

3) Real Provider Tests

Gemini live tests:

set RUN_RENDER_REAL_GEMINI=1
npm run test:telegram:gemini-real

Real local URL ingestion e2e (opt-in):

set RUN_RENDER_REAL_GEMINI=1
set RUN_WEBHOOK_URL_REAL=true
npx vitest run -c telegram/vitest.config.js telegram/tests/webhook-url-real.e2e.test.js

4) R2 Integration Tests

Requires valid R2_* env vars.

set RUN_R2_E2E=true
npm run test:telegram:r2-real

4.1) Post-Deploy Sanity E2E

Run the lightweight deploy sanity probe manually:

npm run telegram:deploy:sanity

This is executed automatically by npm run bot:deploy:auto unless --skip-sanity is set.

5) Full Remote Interface Test

Requires deployed bot URL and Telegram test routing values.

set RUN_FULL_STACK_E2E=true
npm run test:telegram:full-stack

Validated interfaces include:

6) Required Behavior to Verify

7) CI

Workflow:

Before tests run, CI enforces secret checks:

npm run secrets:validate:tests:ci