Features · Install · Usage · CLI · Platform
Report test results to Smoo AI and manage your test program from the command line or in code. Pipe CTRF reports straight from CI, or drive runs, cases, environments, and deployments programmatically.
- Report CTRF test results from any test runner, straight from CI
- Manage test runs, cases, environments, and deployments
- Use it as a CLI or as a typed TypeScript library
--jsonoutput on every command (auto-enabled when piped)- M2M auth via
loginor environment variables for CI/CD
npm install @smooai/testing
# or
pnpm add @smooai/testing# Authenticate
npx @smooai/testing login \
--client-id <M2M_CLIENT_ID> \
--client-secret <M2M_CLIENT_SECRET> \
--org-id <ORG_ID>
# Report CTRF test results
npx @smooai/testing runs report ctrf-report.json \
--environment production \
--name "PR #42 Tests"import { SmooTestingClient } from '@smooai/testing';
const client = new SmooTestingClient({
clientId: process.env.SMOOAI_CLIENT_ID,
clientSecret: process.env.SMOOAI_CLIENT_SECRET,
orgId: process.env.SMOOAI_ORG_ID,
});
// High-level: report CTRF file
const run = await client.report('ctrf-report.json', {
name: 'My Test Run',
environment: 'production',
});
// Or use individual methods
const runs = await client.listRuns({ status: 'failed' });
const envs = await client.listEnvironments();smooai-testing login --client-id <id> --client-secret <secret> --org-id <id>
smooai-testing logout
smooai-testing statussmooai-testing runs create --name "Run Name" [--environment prod] [--tool vitest]
smooai-testing runs list [--status passed] [--limit 10]
smooai-testing runs get <run-id>
smooai-testing runs update <run-id> --status completed
smooai-testing runs report <ctrf-file> [--name "Run"] [--environment prod]smooai-testing cases create --title "Test login flow" [--priority high] [--tags "auth,e2e"]
smooai-testing cases list [--tags auth] [--priority high]
smooai-testing cases get <case-id>
smooai-testing cases update <case-id> --title "Updated title"
smooai-testing cases delete <case-id>smooai-testing envs create --name "production" [--base-url https://app.example.com]
smooai-testing envs list
smooai-testing envs get <env-id>
smooai-testing envs update <env-id> --name "staging"smooai-testing deployments create --name "v1.2.3" [--source github] [--ref main]
smooai-testing deployments list [--status success]
smooai-testing deployments get <deployment-id>
smooai-testing deployments update <deployment-id> --status success
smooai-testing deployments delete <deployment-id>All commands support --json for machine-readable output:
smooai-testing runs list --json | jq '.data[].id'JSON mode is auto-enabled when output is piped (no TTY).
Set environment variables instead of using login:
export SMOOAI_CLIENT_ID=...
export SMOOAI_CLIENT_SECRET=...
export SMOOAI_ORG_ID=...
export SMOOAI_API_URL=https://api.production.smoo.ai
export SMOOAI_AUTH_URL=https://auth.production.smoo.ai/tokenGitHub Actions example:
- name: Report test results
run: npx @smooai/testing runs report ctrf-report.json --environment ci --name "${{ github.workflow }}"
env:
SMOOAI_CLIENT_ID: ${{ secrets.SMOOAI_CLIENT_ID }}
SMOOAI_CLIENT_SECRET: ${{ secrets.SMOOAI_CLIENT_SECRET }}
SMOOAI_ORG_ID: ${{ secrets.SMOOAI_ORG_ID }}pnpm install
pnpm build # Build lib + CLI
pnpm test # Run unit tests
pnpm typecheck # TypeScript checks
pnpm lint # Lint
pnpm format # Format code
pnpm check-all # All checks (CI parity)@smooai/testing is built and open-sourced by Smoo AI — the AI-powered business platform with AI built into every product: CRM, customer support, campaigns, field service, observability, and developer tools.
- 🚀 Testing on the platform — smoo.ai/platform/testing
- 🧰 More open source from Smoo AI — smoo.ai/open-source
- 🧩 Sibling packages — @smooai/utils, @smooai/logger, @smooai/fetch, @smooai/config
MIT
Built by Smoo AI — AI built into every product.
