Testing¶
Test layers¶
The project uses three complementary test layers:
- local Node correctness harness (
tests/local) - local Node performance harness (
tests/perf) - Apps Script runtime suite (
apps_script_tools/testing)
Local correctness checks¶
Local performance checks¶
Report run:
Threshold gate:
Refresh baseline snapshot:
Docs checks¶
Apps Script integration checks¶
Run via reusable workflow:
.github/workflows/integration-gas.yml
PR CI runs suite=functional through the gas-functional job (internal PRs and branch pushes) when clasp secrets are configured.
Dispatch options:
suite=functional-> runsrunAllTestssuite=perf-> runsrunPerformanceBenchmarks- functional suite includes AI, RAG, and Storage namespace smoke tests
Or locally with configured clasp auth:
Optional live-provider smoke workflow:
.github/workflows/integration-ai-live.yml(manual dispatch only)- executes
runAiLiveSmoke(provider, prompt, model)against configured provider credentials (runtime config or script properties)
Production backend posture¶
For app workloads with concurrent users:
- prefer
ASTX.Cachebackendstorage_json - use
ASTX.JobswithcheckpointStore='storage'and provider URI (gcs://,s3://, ordbfs:/) - keep telemetry sink on
loggerfor low overhead unless a storage-backed sink is configured - treat
drive_jsonandscript_propertiescache backends as low-scale options
Consumer smoke test¶
Before release, validate from a clean consumer project:
- add library by script ID
- select target version
- run smoke tests covering:
- namespace + version
ASTX.UtilsDataFrametransformsGroupBySeries.queryfunction-only contractASTX.AI.toolsguardrails (timeoutMs, payload caps, retries, idempotency replay)ASTX.StorageCRUD contract checks (mocked or sandbox buckets/paths)ASTX.RAGbuild/search/answer grounding behavior
CI expectations¶
Pull requests should pass:
CIworkflow checks:lint-and-local-testsperf-gate(npm run test:perf:check)docs-buildgas-functional(Apps Script runtime functional suite for internal PRs, when clasp secrets are available)
perf-report remains informational and publishes benchmark artifacts.
Release validation requires:
- lint
- local tests
- performance threshold check (
npm run test:perf:check) - docs strict build