@xoxoai/checkmate 0.4.28 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +259 -224
- package/bin/checkmate.js +1 -1
- package/dist/ai/client.d.ts +45 -30
- package/dist/ai/client.d.ts.map +1 -1
- package/dist/ai/client.js +198 -129
- package/dist/ai/client.js.map +1 -1
- package/dist/ai/message-handler.d.ts +5 -7
- package/dist/ai/message-handler.d.ts.map +1 -1
- package/dist/ai/message-handler.js +38 -21
- package/dist/ai/message-handler.js.map +1 -1
- package/dist/ai/message-history.d.ts +4 -6
- package/dist/ai/message-history.d.ts.map +1 -1
- package/dist/ai/message-history.js +18 -21
- package/dist/ai/message-history.js.map +1 -1
- package/dist/ai/rate-limit-policy.d.ts +5 -3
- package/dist/ai/rate-limit-policy.d.ts.map +1 -1
- package/dist/ai/rate-limit-policy.js +24 -7
- package/dist/ai/rate-limit-policy.js.map +1 -1
- package/dist/ai/tool-response-handler.d.ts +11 -16
- package/dist/ai/tool-response-handler.d.ts.map +1 -1
- package/dist/ai/tool-response-handler.js +59 -28
- package/dist/ai/tool-response-handler.js.map +1 -1
- package/dist/ai/turn-processor.d.ts +34 -0
- package/dist/ai/turn-processor.d.ts.map +1 -0
- package/dist/ai/turn-processor.js +107 -0
- package/dist/ai/turn-processor.js.map +1 -0
- package/dist/api/allocate-run-identity.d.ts +8 -0
- package/dist/api/allocate-run-identity.d.ts.map +1 -0
- package/dist/api/allocate-run-identity.js +10 -0
- package/dist/api/allocate-run-identity.js.map +1 -0
- package/dist/api/execute-prepared-run.d.ts +22 -0
- package/dist/api/execute-prepared-run.d.ts.map +1 -0
- package/dist/api/execute-prepared-run.js +160 -0
- package/dist/api/execute-prepared-run.js.map +1 -0
- package/dist/api/index.d.ts +25 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +69 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/prepare-run.d.ts +44 -0
- package/dist/api/prepare-run.d.ts.map +1 -0
- package/dist/api/prepare-run.js +261 -0
- package/dist/api/prepare-run.js.map +1 -0
- package/dist/cli/diagnostic-relay.d.ts +6 -0
- package/dist/cli/diagnostic-relay.d.ts.map +1 -0
- package/dist/cli/diagnostic-relay.js +6 -0
- package/dist/cli/diagnostic-relay.js.map +1 -0
- package/dist/cli/main.d.ts +21 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +166 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/protocol.d.ts +57 -0
- package/dist/cli/protocol.d.ts.map +1 -0
- package/dist/cli/protocol.js +116 -0
- package/dist/cli/protocol.js.map +1 -0
- package/dist/cli/reconcile-result.d.ts +13 -0
- package/dist/cli/reconcile-result.d.ts.map +1 -0
- package/dist/cli/reconcile-result.js +300 -0
- package/dist/cli/reconcile-result.js.map +1 -0
- package/dist/cli/run-parent.d.ts +37 -0
- package/dist/cli/run-parent.d.ts.map +1 -0
- package/dist/cli/run-parent.js +491 -0
- package/dist/cli/run-parent.js.map +1 -0
- package/dist/cli/signals.d.ts +36 -0
- package/dist/cli/signals.d.ts.map +1 -0
- package/dist/cli/signals.js +85 -0
- package/dist/cli/signals.js.map +1 -0
- package/dist/cli/static-commands.d.ts +11 -0
- package/dist/cli/static-commands.d.ts.map +1 -0
- package/dist/cli/static-commands.js +83 -0
- package/dist/cli/static-commands.js.map +1 -0
- package/dist/cli/worker-stream-guard.d.ts +20 -0
- package/dist/cli/worker-stream-guard.d.ts.map +1 -0
- package/dist/cli/worker-stream-guard.js +41 -0
- package/dist/cli/worker-stream-guard.js.map +1 -0
- package/dist/cli/worker.d.ts +3 -0
- package/dist/cli/worker.d.ts.map +1 -0
- package/dist/cli/worker.js +111 -0
- package/dist/cli/worker.js.map +1 -0
- package/dist/config/ingestion.d.ts +58 -0
- package/dist/config/ingestion.d.ts.map +1 -0
- package/dist/config/ingestion.js +283 -0
- package/dist/config/ingestion.js.map +1 -0
- package/dist/config/manifest.d.ts +20 -0
- package/dist/config/manifest.d.ts.map +1 -0
- package/dist/config/manifest.js +91 -0
- package/dist/config/manifest.js.map +1 -0
- package/dist/config/model-egress.d.ts +10 -0
- package/dist/config/model-egress.d.ts.map +1 -0
- package/dist/config/model-egress.js +62 -0
- package/dist/config/model-egress.js.map +1 -0
- package/dist/config/package-resolution.d.ts +4 -0
- package/dist/config/package-resolution.d.ts.map +1 -0
- package/dist/config/package-resolution.js +24 -0
- package/dist/config/package-resolution.js.map +1 -0
- package/dist/config/policy.d.ts +44 -0
- package/dist/config/policy.d.ts.map +1 -0
- package/dist/config/policy.js +141 -0
- package/dist/config/policy.js.map +1 -0
- package/dist/config/record.d.ts +4 -0
- package/dist/config/record.d.ts.map +1 -0
- package/dist/config/record.js +10 -0
- package/dist/config/record.js.map +1 -0
- package/dist/config/secrets.d.ts +11 -0
- package/dist/config/secrets.d.ts.map +1 -0
- package/dist/config/secrets.js +42 -0
- package/dist/config/secrets.js.map +1 -0
- package/dist/contracts/diagnostics.d.ts +4 -0
- package/dist/contracts/diagnostics.d.ts.map +1 -0
- package/dist/contracts/diagnostics.js +31 -0
- package/dist/contracts/diagnostics.js.map +1 -0
- package/dist/contracts/serialize.d.ts +2 -0
- package/dist/contracts/serialize.d.ts.map +1 -0
- package/dist/contracts/serialize.js +90 -0
- package/dist/contracts/serialize.js.map +1 -0
- package/dist/contracts/types.d.ts +316 -0
- package/dist/contracts/types.d.ts.map +1 -0
- package/dist/contracts/types.js +74 -0
- package/dist/contracts/types.js.map +1 -0
- package/dist/contracts/validator.d.ts +8 -0
- package/dist/contracts/validator.d.ts.map +1 -0
- package/dist/contracts/validator.js +71 -0
- package/dist/contracts/validator.js.map +1 -0
- package/dist/driver.d.ts +97 -0
- package/dist/driver.d.ts.map +1 -0
- package/dist/driver.js +24 -0
- package/dist/driver.js.map +1 -0
- package/dist/drivers/descriptor.d.ts +15 -0
- package/dist/drivers/descriptor.d.ts.map +1 -0
- package/dist/drivers/descriptor.js +122 -0
- package/dist/drivers/descriptor.js.map +1 -0
- package/dist/drivers/loader.d.ts +18 -0
- package/dist/drivers/loader.d.ts.map +1 -0
- package/dist/drivers/loader.js +97 -0
- package/dist/drivers/loader.js.map +1 -0
- package/dist/drivers/web/checkmate-driver.json +44 -0
- package/dist/drivers/web/index.d.ts +6 -0
- package/dist/drivers/web/index.d.ts.map +1 -0
- package/dist/drivers/web/index.js +27 -0
- package/dist/drivers/web/index.js.map +1 -0
- package/dist/drivers/web/session.d.ts +22 -0
- package/dist/drivers/web/session.d.ts.map +1 -0
- package/dist/drivers/web/session.js +130 -0
- package/dist/drivers/web/session.js.map +1 -0
- package/dist/drivers/web/tools/network-request-recorder.d.ts +46 -0
- package/dist/drivers/web/tools/network-request-recorder.d.ts.map +1 -0
- package/dist/drivers/web/tools/network-request-recorder.js +164 -0
- package/dist/drivers/web/tools/network-request-recorder.js.map +1 -0
- package/dist/{tools/browser → drivers/web/tools}/screenshot-service.d.ts +1 -1
- package/dist/drivers/web/tools/screenshot-service.d.ts.map +1 -0
- package/dist/drivers/web/tools/screenshot-service.js.map +1 -0
- package/dist/drivers/web/tools/snapshot-filter/index.d.ts.map +1 -0
- package/dist/drivers/web/tools/snapshot-filter/index.js.map +1 -0
- package/dist/drivers/web/tools/snapshot-filter/semantic-scorer.d.ts.map +1 -0
- package/dist/drivers/web/tools/snapshot-filter/semantic-scorer.js.map +1 -0
- package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.d.ts +5 -0
- package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.d.ts.map +1 -0
- package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.js +56 -0
- package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.js.map +1 -0
- package/dist/drivers/web/tools/snapshot-filter/tree-reconstructor.d.ts.map +1 -0
- package/dist/drivers/web/tools/snapshot-filter/tree-reconstructor.js.map +1 -0
- package/dist/drivers/web/tools/snapshot-service.d.ts +31 -0
- package/dist/drivers/web/tools/snapshot-service.d.ts.map +1 -0
- package/dist/{tools/browser → drivers/web/tools}/snapshot-service.js +36 -7
- package/dist/drivers/web/tools/snapshot-service.js.map +1 -0
- package/dist/drivers/web/tools/tool.d.ts +76 -0
- package/dist/drivers/web/tools/tool.d.ts.map +1 -0
- package/dist/drivers/web/tools/tool.js +562 -0
- package/dist/drivers/web/tools/tool.js.map +1 -0
- package/dist/drivers/web/tools/transient-state-tracker.d.ts +26 -0
- package/dist/drivers/web/tools/transient-state-tracker.d.ts.map +1 -0
- package/dist/{tools/browser → drivers/web/tools}/transient-state-tracker.js +54 -19
- package/dist/drivers/web/tools/transient-state-tracker.js.map +1 -0
- package/dist/drivers/web/tools/types.d.ts +11 -0
- package/dist/drivers/web/tools/types.d.ts.map +1 -0
- package/dist/drivers/web/tools/types.js +2 -0
- package/dist/drivers/web/tools/types.js.map +1 -0
- package/dist/evidence/atomic-file.d.ts +23 -0
- package/dist/evidence/atomic-file.d.ts.map +1 -0
- package/dist/evidence/atomic-file.js +104 -0
- package/dist/evidence/atomic-file.js.map +1 -0
- package/dist/evidence/layout.d.ts +30 -0
- package/dist/evidence/layout.d.ts.map +1 -0
- package/dist/evidence/layout.js +152 -0
- package/dist/evidence/layout.js.map +1 -0
- package/dist/evidence/retention.d.ts +5 -0
- package/dist/evidence/retention.d.ts.map +1 -0
- package/dist/evidence/retention.js +10 -0
- package/dist/evidence/retention.js.map +1 -0
- package/dist/evidence/store.d.ts +101 -0
- package/dist/evidence/store.d.ts.map +1 -0
- package/dist/evidence/store.js +375 -0
- package/dist/evidence/store.js.map +1 -0
- package/dist/evidence/terminal-finalizer.d.ts +19 -0
- package/dist/evidence/terminal-finalizer.d.ts.map +1 -0
- package/dist/evidence/terminal-finalizer.js +56 -0
- package/dist/evidence/terminal-finalizer.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/logging/invocation-logger.d.ts +4 -0
- package/dist/logging/invocation-logger.d.ts.map +1 -0
- package/dist/logging/invocation-logger.js +25 -0
- package/dist/logging/invocation-logger.js.map +1 -0
- package/dist/logging/types.d.ts +8 -0
- package/dist/logging/types.d.ts.map +1 -0
- package/dist/logging/types.js +7 -0
- package/dist/logging/types.js.map +1 -0
- package/dist/redaction/diagnostic-sanitizer.d.ts +7 -0
- package/dist/redaction/diagnostic-sanitizer.d.ts.map +1 -0
- package/dist/redaction/diagnostic-sanitizer.js +42 -0
- package/dist/redaction/diagnostic-sanitizer.js.map +1 -0
- package/dist/redaction/redactor.d.ts +40 -0
- package/dist/redaction/redactor.d.ts.map +1 -0
- package/dist/redaction/redactor.js +176 -0
- package/dist/redaction/redactor.js.map +1 -0
- package/dist/redaction/scrub.d.ts +29 -0
- package/dist/redaction/scrub.d.ts.map +1 -0
- package/dist/redaction/scrub.js +54 -0
- package/dist/redaction/scrub.js.map +1 -0
- package/dist/runtime/config.d.ts +15 -0
- package/dist/runtime/config.d.ts.map +1 -0
- package/dist/runtime/config.js +2 -0
- package/dist/runtime/config.js.map +1 -0
- package/dist/runtime/driver-boundary.d.ts +16 -0
- package/dist/runtime/driver-boundary.d.ts.map +1 -0
- package/dist/runtime/driver-boundary.js +71 -0
- package/dist/runtime/driver-boundary.js.map +1 -0
- package/dist/runtime/driver-session.d.ts +9 -0
- package/dist/runtime/driver-session.d.ts.map +1 -0
- package/dist/runtime/driver-session.js +64 -0
- package/dist/runtime/driver-session.js.map +1 -0
- package/dist/runtime/internal-step-evidence.d.ts +30 -0
- package/dist/runtime/internal-step-evidence.d.ts.map +1 -0
- package/dist/runtime/internal-step-evidence.js +82 -0
- package/dist/runtime/internal-step-evidence.js.map +1 -0
- package/dist/runtime/result-adapter.d.ts +9 -0
- package/dist/runtime/result-adapter.d.ts.map +1 -0
- package/dist/runtime/result-adapter.js +77 -0
- package/dist/runtime/result-adapter.js.map +1 -0
- package/dist/runtime/runner.d.ts +35 -88
- package/dist/runtime/runner.d.ts.map +1 -1
- package/dist/runtime/runner.js +60 -74
- package/dist/runtime/runner.js.map +1 -1
- package/dist/runtime/scenario-control.d.ts +40 -0
- package/dist/runtime/scenario-control.d.ts.map +1 -0
- package/dist/runtime/scenario-control.js +94 -0
- package/dist/runtime/scenario-control.js.map +1 -0
- package/dist/runtime/scenario-runner.d.ts +39 -0
- package/dist/runtime/scenario-runner.d.ts.map +1 -0
- package/dist/runtime/scenario-runner.js +273 -0
- package/dist/runtime/scenario-runner.js.map +1 -0
- package/dist/runtime/scenario-state.d.ts +55 -0
- package/dist/runtime/scenario-state.d.ts.map +1 -0
- package/dist/runtime/scenario-state.js +128 -0
- package/dist/runtime/scenario-state.js.map +1 -0
- package/dist/runtime/step-execution.d.ts +24 -14
- package/dist/runtime/step-execution.d.ts.map +1 -1
- package/dist/runtime/step-execution.js +130 -36
- package/dist/runtime/step-execution.js.map +1 -1
- package/dist/runtime/text.d.ts +10 -0
- package/dist/runtime/text.d.ts.map +1 -0
- package/dist/runtime/text.js +25 -0
- package/dist/runtime/text.js.map +1 -0
- package/dist/runtime/types.d.ts +50 -76
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime/usage-tracker.d.ts +37 -0
- package/dist/runtime/usage-tracker.d.ts.map +1 -0
- package/dist/runtime/usage-tracker.js +110 -0
- package/dist/runtime/usage-tracker.js.map +1 -0
- package/dist/tools/define-agent-tool.d.ts +3 -28
- package/dist/tools/define-agent-tool.d.ts.map +1 -1
- package/dist/tools/define-agent-tool.js +3 -28
- package/dist/tools/define-agent-tool.js.map +1 -1
- package/dist/tools/dispatcher.d.ts +11 -3
- package/dist/tools/dispatcher.d.ts.map +1 -1
- package/dist/tools/dispatcher.js +50 -8
- package/dist/tools/dispatcher.js.map +1 -1
- package/dist/tools/registry.d.ts +8 -10
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +19 -11
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/step/result-tool.d.ts.map +1 -1
- package/dist/tools/step/result-tool.js +8 -6
- package/dist/tools/step/result-tool.js.map +1 -1
- package/dist/tools/tool-contract.d.ts +1 -1
- package/dist/tools/tool-contract.d.ts.map +1 -1
- package/dist/tools/tool-contract.js.map +1 -1
- package/dist/tools/types.d.ts +77 -6
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js.map +1 -1
- package/docs/CLI.md +59 -0
- package/docs/CONFIGURATION.md +91 -0
- package/docs/DRIVERS.md +75 -0
- package/docs/EVIDENCE.md +62 -0
- package/package.json +51 -59
- package/schemas/checkmate-config.v1.json +176 -0
- package/schemas/describe-result.v1.json +414 -0
- package/schemas/driver-descriptor.v1.json +66 -0
- package/schemas/run-request.v1.json +67 -0
- package/schemas/run-result.v1.json +333 -0
- package/schemas/validation-result.v1.json +86 -0
- package/dist/ai/response-processor.d.ts +0 -20
- package/dist/ai/response-processor.d.ts.map +0 -1
- package/dist/ai/response-processor.js +0 -62
- package/dist/ai/response-processor.js.map +0 -1
- package/dist/ai/token-pricing.d.ts +0 -13
- package/dist/ai/token-pricing.d.ts.map +0 -1
- package/dist/ai/token-pricing.js +0 -348
- package/dist/ai/token-pricing.js.map +0 -1
- package/dist/ai/token-tracker.d.ts +0 -33
- package/dist/ai/token-tracker.d.ts.map +0 -1
- package/dist/ai/token-tracker.js +0 -138
- package/dist/ai/token-tracker.js.map +0 -1
- package/dist/cli/create-examples.d.ts +0 -21
- package/dist/cli/create-examples.d.ts.map +0 -1
- package/dist/cli/create-examples.js +0 -116
- package/dist/cli/create-examples.js.map +0 -1
- package/dist/cli.d.ts +0 -15
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -69
- package/dist/cli.js.map +0 -1
- package/dist/config/runtime-config.d.ts +0 -21
- package/dist/config/runtime-config.d.ts.map +0 -1
- package/dist/config/runtime-config.js +0 -98
- package/dist/config/runtime-config.js.map +0 -1
- package/dist/core.d.ts +0 -8
- package/dist/core.d.ts.map +0 -1
- package/dist/core.js +0 -4
- package/dist/core.js.map +0 -1
- package/dist/integrations/salesforce/authenticator.d.ts +0 -27
- package/dist/integrations/salesforce/authenticator.d.ts.map +0 -1
- package/dist/integrations/salesforce/authenticator.js +0 -27
- package/dist/integrations/salesforce/authenticator.js.map +0 -1
- package/dist/integrations/salesforce/cli-handler.d.ts +0 -14
- package/dist/integrations/salesforce/cli-handler.d.ts.map +0 -1
- package/dist/integrations/salesforce/cli-handler.js +0 -50
- package/dist/integrations/salesforce/cli-handler.js.map +0 -1
- package/dist/logging/index.d.ts +0 -2
- package/dist/logging/index.d.ts.map +0 -1
- package/dist/logging/index.js +0 -4
- package/dist/logging/index.js.map +0 -1
- package/dist/logging/logger.d.ts +0 -5
- package/dist/logging/logger.d.ts.map +0 -1
- package/dist/logging/logger.js +0 -15
- package/dist/logging/logger.js.map +0 -1
- package/dist/playwright.d.ts +0 -102
- package/dist/playwright.d.ts.map +0 -1
- package/dist/playwright.js +0 -116
- package/dist/playwright.js.map +0 -1
- package/dist/runtime/extension.d.ts +0 -274
- package/dist/runtime/extension.d.ts.map +0 -1
- package/dist/runtime/extension.js +0 -171
- package/dist/runtime/extension.js.map +0 -1
- package/dist/salesforce.d.ts +0 -71
- package/dist/salesforce.d.ts.map +0 -1
- package/dist/salesforce.js +0 -73
- package/dist/salesforce.js.map +0 -1
- package/dist/tools/browser/screenshot-service.d.ts.map +0 -1
- package/dist/tools/browser/screenshot-service.js.map +0 -1
- package/dist/tools/browser/snapshot-filter/index.d.ts.map +0 -1
- package/dist/tools/browser/snapshot-filter/index.js.map +0 -1
- package/dist/tools/browser/snapshot-filter/semantic-scorer.d.ts.map +0 -1
- package/dist/tools/browser/snapshot-filter/semantic-scorer.js.map +0 -1
- package/dist/tools/browser/snapshot-filter/snapshot-filter.d.ts +0 -4
- package/dist/tools/browser/snapshot-filter/snapshot-filter.d.ts.map +0 -1
- package/dist/tools/browser/snapshot-filter/snapshot-filter.js +0 -57
- package/dist/tools/browser/snapshot-filter/snapshot-filter.js.map +0 -1
- package/dist/tools/browser/snapshot-filter/tree-reconstructor.d.ts.map +0 -1
- package/dist/tools/browser/snapshot-filter/tree-reconstructor.js.map +0 -1
- package/dist/tools/browser/snapshot-service.d.ts +0 -19
- package/dist/tools/browser/snapshot-service.d.ts.map +0 -1
- package/dist/tools/browser/snapshot-service.js.map +0 -1
- package/dist/tools/browser/tool.d.ts +0 -34
- package/dist/tools/browser/tool.d.ts.map +0 -1
- package/dist/tools/browser/tool.js +0 -226
- package/dist/tools/browser/tool.js.map +0 -1
- package/dist/tools/browser/transient-state-tracker.d.ts +0 -16
- package/dist/tools/browser/transient-state-tracker.d.ts.map +0 -1
- package/dist/tools/browser/transient-state-tracker.js.map +0 -1
- package/dist/tools/salesforce/login-tool.d.ts +0 -7
- package/dist/tools/salesforce/login-tool.d.ts.map +0 -1
- package/dist/tools/salesforce/login-tool.js +0 -25
- package/dist/tools/salesforce/login-tool.js.map +0 -1
- package/docs/EXTENSIONS.md +0 -232
- package/docs/GUIDE.md +0 -465
- package/docs/ROADMAP.md +0 -47
- package/playwright.config.ts +0 -39
- package/test/examples/salesforce/trial-dev-org.spec.ts +0 -82
- package/test/examples/web/website-testing.spec.ts +0 -281
- /package/dist/{tools/browser → drivers/web/tools}/screenshot-service.js +0 -0
- /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/index.d.ts +0 -0
- /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/index.js +0 -0
- /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/semantic-scorer.d.ts +0 -0
- /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/semantic-scorer.js +0 -0
- /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/tree-reconstructor.d.ts +0 -0
- /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/tree-reconstructor.js +0 -0
package/docs/GUIDE.md
DELETED
|
@@ -1,465 +0,0 @@
|
|
|
1
|
-
# **_checkmate_** docs
|
|
2
|
-
|
|
3
|
-
Technical documentation for **_checkmate_** - AI test automation with Playwright.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
- [Core Concepts](#core-concepts)
|
|
8
|
-
- [Configuration Reference](#configuration-reference)
|
|
9
|
-
- [Writing Effective Tests](#writing-effective-tests)
|
|
10
|
-
- [Cost Management](#cost-management)
|
|
11
|
-
- [Web Extension](#web-extension)
|
|
12
|
-
- [Salesforce Extension](#salesforce-extension)
|
|
13
|
-
- [Test Reports](#test-reports)
|
|
14
|
-
- [Troubleshooting](#troubleshooting)
|
|
15
|
-
- [Architecture](#architecture)
|
|
16
|
-
- [Advanced Topics](#advanced-topics)
|
|
17
|
-
|
|
18
|
-
## Core Concepts
|
|
19
|
-
|
|
20
|
-
**_checkmate_** is an AI-driven test runner. You describe a step in natural language, **_checkmate_** runs a tool loop, and the step passes or fails based on the observed result.
|
|
21
|
-
|
|
22
|
-
Main building blocks:
|
|
23
|
-
|
|
24
|
-
- **Runner**: The object that executes steps. The main API entry point is `createRunner()` from `@xoxoai/checkmate/core`.
|
|
25
|
-
- **Step**: A plain object with `action` and `expect`. This is the main unit of execution.
|
|
26
|
-
- **Extensions**: Composable modules that add tools and runtime behavior. Built-ins include `web()` and `salesforce()`.
|
|
27
|
-
- **Fixtures**: Convenience [Playwright](https://playwright.dev/docs/test-fixtures) entry points that provide an `ai` runner in tests.
|
|
28
|
-
|
|
29
|
-
Published entry points:
|
|
30
|
-
|
|
31
|
-
- `@xoxoai/checkmate/core`: Build your own runner with extensions.
|
|
32
|
-
- `@xoxoai/checkmate/playwright`: Use the built-in web extension with Playwright `test` and `expect`.
|
|
33
|
-
- `@xoxoai/checkmate/salesforce`: Use the built-in web + Salesforce extensions with the same `ai` fixture shape.
|
|
34
|
-
|
|
35
|
-
Most users start here:
|
|
36
|
-
|
|
37
|
-
```typescript
|
|
38
|
-
import { test } from '@xoxoai/checkmate/playwright'
|
|
39
|
-
|
|
40
|
-
test('search flow', async ({ ai }) => {
|
|
41
|
-
await ai.run({
|
|
42
|
-
action: `Type 'documentation' in the search bar and press Enter`,
|
|
43
|
-
expect: `At least 5 search results are displayed`,
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Configuration Reference
|
|
49
|
-
|
|
50
|
-
Tests are managed in [Playwright's](https://playwright.dev/docs/test-configuration) standard [config](playwright.config.ts).
|
|
51
|
-
|
|
52
|
-
### AI API Settings
|
|
53
|
-
|
|
54
|
-
| Variable | Default | Description |
|
|
55
|
-
| --------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
|
|
56
|
-
| `OPENAI_API_KEY` | - | **Required** - Your OpenAI API key (or compatible provider) |
|
|
57
|
-
| `OPENAI_BASE_URL` | - | Optional - Override for compatible providers (Claude, Gemini, local LLMs) |
|
|
58
|
-
| `OPENAI_MODEL` | `gpt-5-mini` | Model: gpt-5, gemini-2.5-flash, claude-4-5-sonnet etc. |
|
|
59
|
-
| `OPENAI_TEMPERATURE` | `1.0` | Creativity (below 0.5 = deterministic, above 0.5 = creative) |
|
|
60
|
-
| `OPENAI_REASONING_EFFORT` | - | Optional - Reasoning effort for models: low, medium, high |
|
|
61
|
-
| `OPENAI_TIMEOUT_SECONDS` | `60` | API request timeout in seconds |
|
|
62
|
-
| `OPENAI_API_RATE_LIMIT_DELAY_SECONDS` | `0` | Optional fixed delay before each API call, useful when your provider is sensitive to burst traffic |
|
|
63
|
-
| `OPENAI_RETRY_MAX_ATTEMPTS` | `3` | Max retries with backoff (1s, 10s, 60s) for rate limits and server errors |
|
|
64
|
-
| `OPENAI_TOOL_CHOICE` | `required` | Tool choice: auto, required, none |
|
|
65
|
-
| `OPENAI_ALLOWED_TOOLS` | - | Comma-separated list of allowed tools (if not set, all tools available) |
|
|
66
|
-
| `OPENAI_INCLUDE_SCREENSHOT_IN_SNAPSHOT` | `false` | Include compressed screenshots in snapshot responses |
|
|
67
|
-
| `OPENAI_API_TOKEN_BUDGET_USD` | - | Optional - USD budget for total OpenAI API spend per test run. Only positive decimal values are enforced. |
|
|
68
|
-
| `OPENAI_API_TOKEN_BUDGET_COUNT` | - | Optional - Token count limit for total tokens per test run. Only positive integers are enforced. |
|
|
69
|
-
| `OPENAI_LOOP_MAX_REPETITIONS` | `5` | Number of repetitive tool call patterns to detect before triggering loop recovery with random temperature |
|
|
70
|
-
| `CHECKMATE_LOG_LEVEL` | `off` | Logging verbosity: debug, info, warn, error, off |
|
|
71
|
-
| `CHECKMATE_SNAPSHOT_FILTERING` | `false` | Enable semantic page snapshot filtering before requests are sent to the model |
|
|
72
|
-
|
|
73
|
-
## Writing Effective Tests
|
|
74
|
-
|
|
75
|
-
### Best Practices
|
|
76
|
-
|
|
77
|
-
1. **Be Specific** - Clear expectations help the AI validate success
|
|
78
|
-
2. **One Action Per Step** - Break complex flows into discrete steps
|
|
79
|
-
3. **Include Context** - Mention relevant UI elements and expected behavior
|
|
80
|
-
4. **Add Timing Hints** - For slow operations, mention expected wait times
|
|
81
|
-
5. **Handle Popups** - Explicitly mention consent dialogs or modals
|
|
82
|
-
|
|
83
|
-
### Basic Example
|
|
84
|
-
|
|
85
|
-
```typescript
|
|
86
|
-
import { expect, test } from '@xoxoai/checkmate/playwright'
|
|
87
|
-
|
|
88
|
-
test('search for playwright documentation', async ({ page, ai }) => {
|
|
89
|
-
await test.step('Navigate to Google', async () => {
|
|
90
|
-
await ai.run({
|
|
91
|
-
action: `Open the browser and navigate to google.com`,
|
|
92
|
-
expect: `google.com is loaded and the search bar is visible`,
|
|
93
|
-
})
|
|
94
|
-
})
|
|
95
|
-
|
|
96
|
-
await test.step('Search for Playwright', async () => {
|
|
97
|
-
await ai.run({
|
|
98
|
-
action: `Type 'playwright test automation' in the search bar and press Enter`,
|
|
99
|
-
expect: `Search results contain the playwright.dev link`,
|
|
100
|
-
})
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
await expect(page.getByRole('link', { name: /playwright/i }).first()).toBeVisible()
|
|
104
|
-
})
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Complex Interactions
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
await test.step('Fill form and submit', async () => {
|
|
111
|
-
await ai.run({
|
|
112
|
-
action: `
|
|
113
|
-
Wait for the newsletter popup (takes ~30 seconds),
|
|
114
|
-
then close it by clicking the X button.
|
|
115
|
-
Scroll to the comment section and click to activate it.
|
|
116
|
-
Type 'Great article!' into the comment textarea.
|
|
117
|
-
Click the Submit button.
|
|
118
|
-
`,
|
|
119
|
-
expect: `
|
|
120
|
-
The comment is submitted,
|
|
121
|
-
and either a success message appears
|
|
122
|
-
or a login form is displayed if not authenticated.
|
|
123
|
-
`,
|
|
124
|
-
})
|
|
125
|
-
})
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Programmatic Composition
|
|
129
|
-
|
|
130
|
-
Use `@xoxoai/checkmate/core` when you want to build your own runner explicitly:
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
import { createRunner } from '@xoxoai/checkmate/core'
|
|
134
|
-
import { web } from '@xoxoai/checkmate/playwright'
|
|
135
|
-
import { jira, notion, database } from 'your-own-extension-examples'
|
|
136
|
-
|
|
137
|
-
const ai = createRunner({
|
|
138
|
-
extensions: [web({ page }), jira(), notion(), database()],
|
|
139
|
-
})
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Cost Management
|
|
143
|
-
|
|
144
|
-
**_checkmate_** includes built-in token usage monitoring:
|
|
145
|
-
|
|
146
|
-
```json
|
|
147
|
-
{
|
|
148
|
-
"response input": "2543 @ $0.00$",
|
|
149
|
-
"response output": "456 @ $0.00$",
|
|
150
|
-
"history (estimated)": 45234,
|
|
151
|
-
"step input": "5123 @ $0.00$",
|
|
152
|
-
"step output": "892 @ $0.00$",
|
|
153
|
-
"test input": "25678 @ $0.01$",
|
|
154
|
-
"test output": "4521 @ $0.01$"
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Cost Optimization Features
|
|
159
|
-
|
|
160
|
-
1. **Smart Snapshots** - Instead of full HTML, only the ARIA accessibility tree is sent to the AI
|
|
161
|
-
2. **History Filtering** - Continuously filters old page snapshots (reduces token usage by up to 50%)
|
|
162
|
-
3. **Snapshot Minification** - Removes unnecessary whitespace and quotes from ARIA snapshots
|
|
163
|
-
4. **Snapshot Filtering** - Local semantic filtering of page snapshots using the current step description (reduces token usage by up to 90%)
|
|
164
|
-
5. **Screenshots** - Normalized and compressed locally, helps vision models understand UI better
|
|
165
|
-
6. **Chat Recycling** - New session per step to prevent context bloat and isolation
|
|
166
|
-
7. **Token Counting** - Real-time usage tracking per step and test with budgets
|
|
167
|
-
8. **Loop Detection** - Detects and mitigates repetitive tool call patterns, preventing AI runaway costs
|
|
168
|
-
|
|
169
|
-
### Budgeting & Cost Limits
|
|
170
|
-
|
|
171
|
-
You can set one or both token budget environment variables to enforce limits during a single test run.
|
|
172
|
-
|
|
173
|
-
- `OPENAI_API_TOKEN_BUDGET_USD` — Sets a USD budget (e.g. 0.50) per test execution. The framework checks the current estimated cost (input+output tokens) and throws an error if the budget is exceeded.
|
|
174
|
-
- `OPENAI_API_TOKEN_BUDGET_COUNT` — Sets a token limit (e.g. 100000). The framework tracks input and output tokens across the test and throws an error when the total exceeds this limit.
|
|
175
|
-
|
|
176
|
-
Notes:
|
|
177
|
-
|
|
178
|
-
- Only positive numbers are enforced; `0` or non-positive values are effectively treated as disabled.
|
|
179
|
-
- If the env var is unset or invalid (non-number), it is ignored.
|
|
180
|
-
|
|
181
|
-
### Using Snapshot Filtering for Token Optimization
|
|
182
|
-
|
|
183
|
-
When snapshot filtering is enabled, **_checkmate_** scores the page snapshot locally with a semantic embedding model and keeps the most relevant branches of the accessibility tree.
|
|
184
|
-
|
|
185
|
-
Default behavior:
|
|
186
|
-
|
|
187
|
-
- Build one query from `action + expect`
|
|
188
|
-
- Score snapshot keys and string leaves against that query
|
|
189
|
-
- If `search` is provided on the step, use those keywords instead of semantic `action + expect`
|
|
190
|
-
- Keep the top `10%` of scored elements by default
|
|
191
|
-
- If top-percent selection yields nothing, fall back to hard threshold `0.3`
|
|
192
|
-
|
|
193
|
-
**This feature significantly reduces the payload size, minimizing costs while improving AI determinism, reliability and speed.**
|
|
194
|
-
|
|
195
|
-
```typescript
|
|
196
|
-
await ai.run({
|
|
197
|
-
action: `Click on the link that leads to playwright.dev`,
|
|
198
|
-
expect: `The playwright.dev homepage is displayed`,
|
|
199
|
-
|
|
200
|
-
// optional snapshot filtering override
|
|
201
|
-
topPercent: 20,
|
|
202
|
-
})
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
debug: Scored 107 elements
|
|
207
|
-
debug: Filtered to 21 elements from top 20%
|
|
208
|
-
debug: Reduced snapshot from 4283 to 326 chars (92% reduction)
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
Feature is controlled by the `CHECKMATE_SNAPSHOT_FILTERING` environment variable (default: `false`). Set it explicitly to `true` to enable filtering. `search` is now an explicit keyword query override, and `topPercent` lets you tune how much of the scored snapshot should be kept for a specific step.
|
|
212
|
-
|
|
213
|
-
The model can still request a full snapshot with the browser snapshot tool if the filtered tree is insufficient, so steps should not fail just because the initial snapshot was compact.
|
|
214
|
-
|
|
215
|
-
For optimal results, write concrete `action` and `expect` text. Use `topPercent` as a real percentage from `1` to `100` when you need to keep more or less of the scored snapshot. Optional `search` terms still help when you want direct keyword control.
|
|
216
|
-
|
|
217
|
-
**Tips for effective step text:**
|
|
218
|
-
|
|
219
|
-
- Include relevant UI element types (button, input, link, checkbox, etc.)
|
|
220
|
-
- Include key text that appears on the page
|
|
221
|
-
- Include action-related terms (search, filter, submit, etc.)
|
|
222
|
-
- Keep the step focused on one user intent
|
|
223
|
-
- Use `topPercent` only when you need to tune how aggressively snapshot content is pruned
|
|
224
|
-
|
|
225
|
-
### Estimated Costs
|
|
226
|
-
|
|
227
|
-
**Gemini-2.5-flash / GPT-5-mini**:
|
|
228
|
-
|
|
229
|
-
- Simple test (~5 steps): ~$0.01 - $0.05
|
|
230
|
-
- Complex test (~20 steps): ~$0.10 - $0.40
|
|
231
|
-
- Full E2E suite (~50 complex tests): ~$5.00 - $20.00
|
|
232
|
-
|
|
233
|
-
**GPT-OSS-20B via groq**:
|
|
234
|
-
|
|
235
|
-
- Simple test (~5 steps): ~$0.001 - $0.01
|
|
236
|
-
- Complex test (~20 steps): ~$0.01 - $0.05
|
|
237
|
-
- Full E2E suite (~50 complex tests): ~$1.00 - $2.00
|
|
238
|
-
|
|
239
|
-
_Costs vary based on model, screenshot size and count, and page complexity_
|
|
240
|
-
|
|
241
|
-
## Web Extension
|
|
242
|
-
|
|
243
|
-
`@xoxoai/checkmate/playwright` is the pre-built web entry point. It composes the core runner with the built-in `web()` extension and exposes a Playwright-friendly `ai` fixture.
|
|
244
|
-
|
|
245
|
-
What it adds:
|
|
246
|
-
|
|
247
|
-
- browser tools for navigation and interaction
|
|
248
|
-
- initial page snapshots and optional screenshots
|
|
249
|
-
- `test`, `expect`, `web()`, and `createPlaywrightRunner(page)` exports
|
|
250
|
-
|
|
251
|
-
```typescript
|
|
252
|
-
import { test } from '@xoxoai/checkmate/playwright'
|
|
253
|
-
|
|
254
|
-
test('search flow', async ({ ai }) => {
|
|
255
|
-
await ai.run({
|
|
256
|
-
action: 'Search for playwright documentation',
|
|
257
|
-
expect: 'Search results are displayed',
|
|
258
|
-
})
|
|
259
|
-
})
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
## Salesforce Extension
|
|
263
|
-
|
|
264
|
-
`@xoxoai/checkmate/salesforce` builds on the web extension. It adds Salesforce-specific tools and keeps the same `ai` fixture shape as the Playwright entry point.
|
|
265
|
-
|
|
266
|
-
What it adds:
|
|
267
|
-
|
|
268
|
-
- the built-in `salesforce()` extension
|
|
269
|
-
- `test`, `expect`, and `createSalesforceRunner(page)` exports
|
|
270
|
-
- the `login_to_salesforce_org` tool backed by the Salesforce CLI
|
|
271
|
-
|
|
272
|
-
Prerequisites:
|
|
273
|
-
|
|
274
|
-
```bash
|
|
275
|
-
# Install Salesforce CLI
|
|
276
|
-
npm install -g @salesforce/cli
|
|
277
|
-
|
|
278
|
-
# Authenticate to your org and set is as default
|
|
279
|
-
sf org login web --alias my-checkmate-org --set-default
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
```typescript
|
|
283
|
-
import { test } from '@xoxoai/checkmate/salesforce'
|
|
284
|
-
|
|
285
|
-
test('create and configure itinerary', async ({ ai }) => {
|
|
286
|
-
await test.step('Login to Salesforce', async () => {
|
|
287
|
-
await ai.run({
|
|
288
|
-
action: 'Login to Salesforce org and open Test QA Application',
|
|
289
|
-
expect: 'Test QA homepage is displayed',
|
|
290
|
-
})
|
|
291
|
-
})
|
|
292
|
-
})
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
The `login_to_salesforce_org` tool handles the authentication flow by retrieving a front-door URL from the authenticated SF CLI session and navigating the browser for you.
|
|
296
|
-
|
|
297
|
-
## Test Reports
|
|
298
|
-
|
|
299
|
-
Multiple report formats are generated after each run:
|
|
300
|
-
|
|
301
|
-
- **HTML Report**: `test-reports/html/index.html` (interactive - no screenshots/video yet though)
|
|
302
|
-
- **JUnit XML**: `test-reports/junit/results.xml` (CI/CD integration)
|
|
303
|
-
- **Console Output**: Real-time step results and token usage
|
|
304
|
-
|
|
305
|
-
```bash
|
|
306
|
-
# Open HTML report in browser
|
|
307
|
-
npx playwright show-report test-reports/html
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## Troubleshooting
|
|
311
|
-
|
|
312
|
-
### AI makes incorrect decisions
|
|
313
|
-
|
|
314
|
-
**Symptoms**: The AI clicks wrong elements, misinterprets the page, or fails to complete actions correctly.
|
|
315
|
-
|
|
316
|
-
**Solutions**:
|
|
317
|
-
|
|
318
|
-
- Provide more precise descriptions in `action` and more focused assertions in `expect`
|
|
319
|
-
- Reference specific element identifiers and roles (for example: text, label, button, list)
|
|
320
|
-
- Break complex workflows into single-action steps; use a step-by-step approach
|
|
321
|
-
|
|
322
|
-
### Tests loop during step execution
|
|
323
|
-
|
|
324
|
-
**Symptoms**: The AI repeats the same actions or gets stuck in a loop, consuming tokens unnecessarily.
|
|
325
|
-
|
|
326
|
-
**Solutions**:
|
|
327
|
-
|
|
328
|
-
- Increase `OPENAI_TEMPERATURE` to encourage exploration
|
|
329
|
-
- Use a reasoning/thinking model (if available) to improve planning and avoid repetitive loops
|
|
330
|
-
|
|
331
|
-
### High token costs
|
|
332
|
-
|
|
333
|
-
**Symptoms**: Tests consume more tokens than expected, leading to high API costs.
|
|
334
|
-
|
|
335
|
-
**Solutions**:
|
|
336
|
-
|
|
337
|
-
- Set a lower reasoning effort: `OPENAI_REASONING_EFFORT`
|
|
338
|
-
- Consider disabling `OPENAI_INCLUDE_SCREENSHOT_IN_SNAPSHOT`
|
|
339
|
-
- Use a cheaper model, lower-end models often perform well (e.g., `gemini-2.5-flash-lite` or `gpt-5-nano`)
|
|
340
|
-
|
|
341
|
-
### Rate limiting errors
|
|
342
|
-
|
|
343
|
-
**Symptoms**: API calls fail with 429 errors or rate limit messages.
|
|
344
|
-
|
|
345
|
-
**Solutions**:
|
|
346
|
-
|
|
347
|
-
- The framework automatically retries with backoff (1s, 10s, 60s)
|
|
348
|
-
- Upgrade your API plan with your provider
|
|
349
|
-
- Reduce concurrent test execution
|
|
350
|
-
- Increase `OPENAI_TIMEOUT_SECONDS` if needed
|
|
351
|
-
|
|
352
|
-
### Timeout errors
|
|
353
|
-
|
|
354
|
-
**Symptoms**: Tests fail with timeout errors before completing actions.
|
|
355
|
-
|
|
356
|
-
**Solutions**:
|
|
357
|
-
|
|
358
|
-
- Increase `OPENAI_TIMEOUT_SECONDS` in your `.env` file
|
|
359
|
-
- Mention expected wait times in your action descriptions
|
|
360
|
-
- Break long-running actions into smaller steps
|
|
361
|
-
|
|
362
|
-
## Architecture
|
|
363
|
-
|
|
364
|
-
**_checkmate_** combines multiple components to enable AI-driven test automation:
|
|
365
|
-
|
|
366
|
-
```
|
|
367
|
-
@xoxoai/checkmate/core
|
|
368
|
-
│
|
|
369
|
-
├── createRunner({ extensions })
|
|
370
|
-
├── runtime/
|
|
371
|
-
│ ├── CheckmateRunner
|
|
372
|
-
│ ├── StepExecution
|
|
373
|
-
│ └── ExtensionHost
|
|
374
|
-
│
|
|
375
|
-
├── ai/
|
|
376
|
-
│ ├── AiClient
|
|
377
|
-
│ ├── ResponseProcessor
|
|
378
|
-
│ ├── MessageHistory
|
|
379
|
-
│ └── TokenTracker
|
|
380
|
-
│
|
|
381
|
-
├── tools/
|
|
382
|
-
│ └── step/
|
|
383
|
-
│ └── StepResultTools
|
|
384
|
-
│
|
|
385
|
-
├── @xoxoai/checkmate/playwright
|
|
386
|
-
│ └── web()
|
|
387
|
-
│ ├── BrowserToolRuntime
|
|
388
|
-
│ ├── SnapshotService
|
|
389
|
-
│ └── Browser tools
|
|
390
|
-
│
|
|
391
|
-
└── @xoxoai/checkmate/salesforce
|
|
392
|
-
└── salesforce()
|
|
393
|
-
├── SalesforceTools
|
|
394
|
-
└── Salesforce CLI integration
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
### Key Components
|
|
398
|
-
|
|
399
|
-
**Test Layer**
|
|
400
|
-
|
|
401
|
-
- Playwright Test framework manages test execution, reporting, and fixtures
|
|
402
|
-
- Tests written in natural language via `ai.run()` fixtures
|
|
403
|
-
|
|
404
|
-
**Core Engine**
|
|
405
|
-
|
|
406
|
-
- **createRunner**: Public composition entry point for building runners from extensions
|
|
407
|
-
- **CheckmateRunner**: Runtime instance returned by `createRunner`
|
|
408
|
-
- **AiClient**: Manages model interactions, retries, and tool-calling requests
|
|
409
|
-
- **Response Processor**: Handles tool responses, append-only history, and retries through the step loop
|
|
410
|
-
- **ExtensionHost**: Registers tools, instructions, step context builders, and post-tool hooks from extensions
|
|
411
|
-
- **Tool Registry**: Owns Zod-defined tool declarations and explicit tool resolution
|
|
412
|
-
|
|
413
|
-
**Tools**
|
|
414
|
-
|
|
415
|
-
- **Core Tools**: Step control (pass/fail step assertions)
|
|
416
|
-
- **Web Extension**: Playwright-powered browser tools, snapshots, and screenshots
|
|
417
|
-
- **Salesforce Extension**: SF CLI login flow layered on top of the web extension
|
|
418
|
-
|
|
419
|
-
**Cost Optimization**
|
|
420
|
-
|
|
421
|
-
- Token tracking with budget enforcement
|
|
422
|
-
- History filtering (removes old snapshots)
|
|
423
|
-
- Snapshot minification and screenshot compression
|
|
424
|
-
- Loop detection and mitigation
|
|
425
|
-
|
|
426
|
-
**Configuration**
|
|
427
|
-
|
|
428
|
-
- Test, Reporting and Browser settings: [playwright.config.ts](../playwright.config.ts)
|
|
429
|
-
- API & AI settings: `.env` file
|
|
430
|
-
|
|
431
|
-
## Advanced Topics
|
|
432
|
-
|
|
433
|
-
### Custom Tool Integration
|
|
434
|
-
|
|
435
|
-
For custom tools, extensions, built-in extension composition, and custom runners, see the dedicated [Extensions guide](./EXTENSIONS.md).
|
|
436
|
-
|
|
437
|
-
### Performance Optimization
|
|
438
|
-
|
|
439
|
-
For large test suites:
|
|
440
|
-
|
|
441
|
-
- Use faster models for simple tests (e.g., `gemini-3-flash-preview` or `gpt-5-mini`)
|
|
442
|
-
- Set token budgets to prevent runaway costs
|
|
443
|
-
- Disable screenshots in snapshots when visual context isn't needed
|
|
444
|
-
- Consider parallel test execution with Playwright's workers
|
|
445
|
-
|
|
446
|
-
### CI/CD Integration
|
|
447
|
-
|
|
448
|
-
**_checkmate_** generates JUnit XML reports compatible with most CI/CD systems:
|
|
449
|
-
|
|
450
|
-
```yaml
|
|
451
|
-
# Example GitHub Actions
|
|
452
|
-
- name: Run Tests
|
|
453
|
-
run: npm test
|
|
454
|
-
|
|
455
|
-
- name: Upload Reports
|
|
456
|
-
uses: actions/upload-artifact@v3
|
|
457
|
-
with:
|
|
458
|
-
name: test-reports
|
|
459
|
-
path: test-reports/
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
## See Also
|
|
463
|
-
|
|
464
|
-
- [EXTENSIONS](./EXTENSIONS.md)
|
|
465
|
-
- [README](../README.md)
|
package/docs/ROADMAP.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Roadmap
|
|
2
|
-
|
|
3
|
-
## Current State:
|
|
4
|
-
|
|
5
|
-
- ✅ Extension-composed runtime via `createRunner({ extensions })`
|
|
6
|
-
- ✅ Clear top-level module boundaries: `runtime`, `ai`, `tools`, `integrations`, `config`, `logging`
|
|
7
|
-
- ✅ Explicit tool registration and dispatch
|
|
8
|
-
- ✅ Browser snapshot filtering with semantic scoring
|
|
9
|
-
- ✅ Token tracking, retry handling, loop detection, and screenshot support
|
|
10
|
-
- ✅ Salesforce login integration through the SF CLI
|
|
11
|
-
- ✅ Published subpath entry points for `@xoxoai/checkmate/core`, `@xoxoai/checkmate/playwright`, and `@xoxoai/checkmate/salesforce`
|
|
12
|
-
|
|
13
|
-
## Near Term
|
|
14
|
-
|
|
15
|
-
Focus: Stability, extension points, and better contributor ergonomics.
|
|
16
|
-
|
|
17
|
-
- ✅ Custom tool registration API for external integrations
|
|
18
|
-
- ✅ Better public examples for programmatic runner usage
|
|
19
|
-
- ✅ Publishable npm package layout with dedicated `core`, `playwright`, and `salesforce` entry points
|
|
20
|
-
- [ ] Visual interactions (click, drag, etc.) in the Playwright extension
|
|
21
|
-
- [ ] Snapshot filtering tuning hooks beyond top-percent selection
|
|
22
|
-
- [ ] Better reporting around filtered snapshot size and selected branches
|
|
23
|
-
|
|
24
|
-
## Mid Term
|
|
25
|
-
|
|
26
|
-
Focus: Product usability and broader workflow support.
|
|
27
|
-
|
|
28
|
-
- [ ] UI layer for recording, editing, and replaying AI-driven steps
|
|
29
|
-
- [ ] Flow-level execution mode for multi-step business journeys
|
|
30
|
-
- [ ] Richer debugging output for model/tool reasoning failures
|
|
31
|
-
- [ ] Better parallel execution support across large suites
|
|
32
|
-
|
|
33
|
-
## Long Term
|
|
34
|
-
|
|
35
|
-
Focus: Production hardening and ecosystem.
|
|
36
|
-
|
|
37
|
-
- [ ] Stronger observability and explainable AI
|
|
38
|
-
- [ ] Test generation from specs and recorded user behavior
|
|
39
|
-
- [ ] Advanced reporting with AI-assisted failure summaries
|
|
40
|
-
- [ ] Enterprise-focused environment and secret management support
|
|
41
|
-
|
|
42
|
-
## Ongoing Research
|
|
43
|
-
|
|
44
|
-
- 🔄 Faster local retrieval/filtering for very large page snapshots
|
|
45
|
-
- 🔄 Hybrid semantic plus structural ranking for element selection
|
|
46
|
-
- 🔄 Multi-agent execution models for planning and validation
|
|
47
|
-
- 🔄 Confidence signals for tool selection and assertions
|
package/playwright.config.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from '@playwright/test'
|
|
2
|
-
import { config as envConfig } from 'dotenv'
|
|
3
|
-
|
|
4
|
-
envConfig({ quiet: true })
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
projects: [
|
|
8
|
-
{
|
|
9
|
-
name: 'salesforce',
|
|
10
|
-
testDir: './test/examples/salesforce',
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'web',
|
|
14
|
-
testDir: './test/examples/web',
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
outputDir: process.env.CI ? undefined : './test-reports/results',
|
|
18
|
-
reporter: [
|
|
19
|
-
['junit', { outputFile: './test-reports/junit/results.xml' }],
|
|
20
|
-
['html', { outputFolder: './test-reports/html' }],
|
|
21
|
-
['list'],
|
|
22
|
-
],
|
|
23
|
-
timeout: 10 * 60000,
|
|
24
|
-
repeatEach: 1,
|
|
25
|
-
retries: 1,
|
|
26
|
-
workers: 1,
|
|
27
|
-
expect: {
|
|
28
|
-
timeout: 1 * 10000,
|
|
29
|
-
},
|
|
30
|
-
use: {
|
|
31
|
-
viewport: { width: 1360, height: 768 },
|
|
32
|
-
browserName: 'chromium',
|
|
33
|
-
actionTimeout: 1 * 5000,
|
|
34
|
-
navigationTimeout: 1 * 30000,
|
|
35
|
-
screenshot: 'only-on-failure',
|
|
36
|
-
trace: 'retain-on-failure',
|
|
37
|
-
video: 'on',
|
|
38
|
-
},
|
|
39
|
-
})
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview
|
|
3
|
-
* Playwright E2E test for Salesforce Developer org.
|
|
4
|
-
*
|
|
5
|
-
* @summary
|
|
6
|
-
* Example of a multi-step test that creates a new Account record in the Sales app.
|
|
7
|
-
*
|
|
8
|
-
* @description
|
|
9
|
-
* This test automates the following user journey in a Salesforce Developer or trial org:
|
|
10
|
-
* 1. Log in to the Salesforce org.
|
|
11
|
-
* 2. Open the Sales app via the App Launcher.
|
|
12
|
-
* 3. Navigate to the Accounts tab.
|
|
13
|
-
* 4. Create a new Account with a random name.
|
|
14
|
-
* 5. Save the new Account record.
|
|
15
|
-
*
|
|
16
|
-
* @preconditions
|
|
17
|
-
* - A Salesforce Developer or trial org is required. Sign-up: https://www.salesforce.com/form/developer-signup/
|
|
18
|
-
* - Salesforce CLI is recommended for authorizing the org: https://developer.salesforce.com/tools/salesforcecli
|
|
19
|
-
* - The org must be authorized (for example: `sf org login web --set-default`) before running the test.
|
|
20
|
-
* - The user executing the test should have access to the Sales app and the Accounts tab in Lightning Experience.
|
|
21
|
-
*
|
|
22
|
-
* @see {@link https://developer.salesforce.com/tools/salesforcecli} - Salesforce CLI installation and documentation.
|
|
23
|
-
* @see {@link https://www.salesforce.com/form/developer-signup/} - Sign up for a Salesforce Developer org.
|
|
24
|
-
*
|
|
25
|
-
* @note
|
|
26
|
-
* All tests use the `ai` fixture and call `ai.run({ action, expect })`
|
|
27
|
-
* to describe actions and assert visible outcomes.
|
|
28
|
-
*/
|
|
29
|
-
import { test } from '@xoxoai/checkmate/salesforce'
|
|
30
|
-
|
|
31
|
-
test.describe('trial dev org', async () => {
|
|
32
|
-
test('creating new account in sales app', async ({ ai }) => {
|
|
33
|
-
await test.step('Login to Salesforce Org', async () => {
|
|
34
|
-
await ai.run({
|
|
35
|
-
action: `
|
|
36
|
-
Login to Salesforce org`,
|
|
37
|
-
expect: `
|
|
38
|
-
Salesforce org loads successfully and user is authenticated/not on the login page.`,
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
await test.step('Open Sales App from App Launcher', async () => {
|
|
43
|
-
await ai.run({
|
|
44
|
-
action: `
|
|
45
|
-
Click the App Launcher icon (nine dots) in the top left corner.
|
|
46
|
-
Type 'Sales' into the App Launcher 'Search apps and items' search bar.
|
|
47
|
-
Click on the app that is named exactly the 'Sales' app from the results.`,
|
|
48
|
-
expect: `
|
|
49
|
-
Sales app opens successfully in Lightning context.`,
|
|
50
|
-
})
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
await test.step('Switch to Accounts tab', async () => {
|
|
54
|
-
await ai.run({
|
|
55
|
-
action: `
|
|
56
|
-
Click the 'Accounts' tab within the Sales app.`,
|
|
57
|
-
expect: `
|
|
58
|
-
The Accounts tab is active and a list of accounts is displayed.`,
|
|
59
|
-
})
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
await test.step('Start creating a new Account', async () => {
|
|
63
|
-
await ai.run({
|
|
64
|
-
action: `
|
|
65
|
-
Click the 'New' button on the Accounts tab to create a new Account record.
|
|
66
|
-
Fill 'Account Name' field with 'Agentic Test Account' followed by space and some random alphanumeric string
|
|
67
|
-
Don't save the record or fill any other fields.`,
|
|
68
|
-
expect: `
|
|
69
|
-
'New Account' form is displayed and filled with random data`,
|
|
70
|
-
})
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
await test.step('Save new Account record', async () => {
|
|
74
|
-
await ai.run({
|
|
75
|
-
action: `
|
|
76
|
-
Click the 'Save' button on the 'New Account' form.`,
|
|
77
|
-
expect: `
|
|
78
|
-
Account record was saved successfully and details view is displayed.`,
|
|
79
|
-
})
|
|
80
|
-
})
|
|
81
|
-
})
|
|
82
|
-
})
|