![]()
BugBug 语录
所需资源
- 节点.js v24 或以上
- BugBug 账户或 API 令牌
安装 CLI
npm install -g @bugbug-io/cli
bugbug --help
或者在没有全局安装的情况下运行它:
npx @bugbug-io/cli --help
CLI和MCP访问需要BugBug Pro计划或更高. 捆绑的 BugBug 在所有计划中都有技能.
签名并运行您的第一个测试
bugbug login
bugbug tests run <testId>
bugbug login 打开浏览器并存储 CLI 证书。 用于 CI 或脚本
,以 --token 或者说 BUGBUG_API_TOKEN。 。 。 .
自我托管的MCP客户端请参见 无记名符号设置。 。 。 .
将 repo 链接到 BugBug 项目
运行 bugbug init 在您的仓库中将目录绑入一个 BugBug
项目:
bugbug init
交互 它询问如何认证 - 浏览器登录, 或粘贴的项目
或组织 API 令牌 - 然后让您选择项目链接 。 这个
如果您已经运行, 认证步骤会被跳过 bugbug login在 CI 或任意
非交互 shell, 传递两个值 :
bugbug --token <api-token> --project-id <project-id> init
bugbug project init 是同一个命令.
Init 写着 projectId 改为 a bugbug.yaml 在当前目录和存储中
在全局配置中单独的符号 : ~/.bugbug/config.yaml键
那个项目 命令从该目录或任何子目录中运行
自行解决项目和象征,所以 bugbug tests list 需要没有
旗帜. bugbug.yaml 确是安全的,迹象绝不是写在它的上面的.
环境变量
| 变量 | 说明 |
|---|---|
BUGBUG_API_TOKEN | 用于认证请求的 API 令牌 |
BUGBUG_PROJECT_ID | 项目ID(非互动模式下的组织标志需要) |
BUGBUG_LOG_LEVEL | 日志级别; 设置为 debug 以启用动词记录 |
BUGBUG_TELEMETRY | 设定为 false 禁用遥测 |
DO_NOT_TRACK | 标准退出; 设置为 1编号 :true 禁用遥测 |
CI | 何时 true,部队平面(非互动)输出 |
图标
运行 bugbug 没有交互式导航参数,或 bugbug <command> --help
关于任何命令的细节.
认证
bugbug login # Authenticate and store a user token in the global config
bugbug logout # Clear the stored user token and current project
项目
bugbug init # Create bugbug.yaml pinning this directory to a project
bugbug project settings # Read project settings
bugbug project export # Export project as a ZIP (bugbug-project-export-<timestamp>.zip)
bugbug project export -o out.zip # Export to a specific file
bugbug project import out.zip # Import a project from a ZIP archive
测试
bugbug tests list # List tests
bugbug tests list -s "login" # Filter tests by name
bugbug tests show <testId> # Show test details
bugbug tests run <testId> # Run a test (waits for completion by default)
bugbug tests run <testId> --profile "Production"
bugbug tests run <testId> --tag smoke --tag critical
bugbug tests run <testId> --variable FOO=bar --variable BAZ=qux
bugbug tests run <testId> --no-wait # Queue the run and exit immediately
bugbug tests run <testId> --reporter junit --output-path report.xml
bugbug tests tags set <testId> --tag smoke # Replace test tags by name
bugbug tests tags set <testId> # Clear test tags
bugbug tests export <testId> --format yaml
bugbug tests export <testId> --format zip -o test.zip
bugbug tests import test.yaml # Import a test from YAML or ZIP (--folder-id <id> to choose a test folder)
测试运行
bugbug testruns show <runId> # Show the result of a test run
bugbug testruns logs <runId> # Get logs for a test run
bugbug testruns stop <runId> # Stop a running test run
bugbug testruns report <runId> -o out.xml # Get the JUnit XML report
bugbug testruns tags set <runId> --tag flaky
bugbug testruns tags set <runId> # Clear directly assigned run tags
bugbug testruns notes set <runId> "Retried successfully"
bugbug testruns notes set <runId> # Clear run notes
诉讼
bugbug suites list # List suites
bugbug suites list -s "checkout" # Filter suites by name
bugbug suites show <suiteId> # Show suite details
bugbug suites run <suiteId> # Run a suite (waits for completion by default)
bugbug suites run <suiteId> --profile "Production" --variable FOO=bar
bugbug suites run <suiteId> --tag smoke
bugbug suites run <suiteId> --no-wait
bugbug suites tags set <suiteId> --tag regression
bugbug suites tags set <suiteId> # Clear suite tags
套接字运行
bugbug suiteruns show <runId> # Show the result of a suite run (--compact: failed tests only)
bugbug suiteruns stop <runId> # Stop a running suite run
bugbug suiteruns report <runId> -o out.xml # Get the JUnit XML report
bugbug suiteruns tags set <runId> --tag nightly
bugbug suiteruns tags set <runId> # Clear directly assigned run tags
bugbug suiteruns notes set <runId> "Nightly follow-up"
bugbug suiteruns notes set <runId> # Clear run notes
简介
bugbug profiles list # List run profiles
标记
bugbug tags list # List tags in the active project
bugbug --json tags list # Emit tag details as JSON
AI 客户端( 插件: MCP + 技能)
bugbug plugin --agent=<agent>
bugbug plugin --agent=<agent> --dry-run # Show what would be installed, writing nothing
支助 --agent 值 : cursor, (中文(简体) ), claude, (中文(简体) ), vscode, (中文(简体) ), codex, (中文(简体) ), copilot。 。 。 .
简称
上方命名空格命令上的第一简指针地图 :
bugbug run test <testId>
bugbug run suite <suiteId>
bugbug list test
bugbug list suite
bugbug list profile
bugbug stop test <runId>
bugbug stop suite <runId>
bugbug report test <runId>
bugbug report suite <runId>
bugbug logs test <runId>
bugbug export project
bugbug export test <testId>
bugbug import project export.zip
bugbug import test test.yaml
全球选项
-t, --token <token>: BugBug 的 API 令牌( 覆盖配置)-p, --project-id <projectId>: 项目ID(仅用于非互动模式下的组织标志)-v, --verbose: 启用动词记录,包括 HTTP 请求--ci: CI 方便输出(平面日志,无交互UI,故障后出站1)--json: Emit JSON 输出( 表示非交互)--disable-telemetry: 禁用遥测-h, --help: 显示帮助信息
许可证
麻省理工学院