devassure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDevAssure Skill
DevAssure技能
This skill helps you set up, configure, and use the DevAssure CLI () — a command-line tool for running end-to-end UI tests from natural language instructions and YAML/CSV files. DevAssure uses an AI agent to execute browser-based tests described in plain English.
@devassure/cliUse this skill whenever the user asks about DevAssure, DevAssure CLI, DevAssure Invisible Agent, or wants to set up, configure, write, or run end-to-end UI tests using the DevAssure CLI tool ( npm package). Trigger this skill for any mention of: devassure, devassure cli, devassure init, devassure run, devassure tests, .devassure folder, DevAssure test cases, DevAssure YAML test files, DevAssure CSV tests, DevAssure CI/CD integration, DevAssure actions, DevAssure tools, DevAssure test data, DevAssure personas, DevAssure preferences, or natural-language UI test automation with DevAssure. Also trigger when the user wants to write YAML test cases for DevAssure, configure DevAssure projects, set up DevAssure in a CI/CD pipeline, filter or run DevAssure tests by tag/priority/folder, view DevAssure reports, or manage DevAssure sessions. Even if the user just says "set up e2e tests with devassure" or "write devassure test cases" or "run end to ene tests", "set up e2e tests", "run e2e tests", "execute the tests", "execute the tests from csv", use this skill.
@devassure/cli本技能可帮助你设置、配置和使用DevAssure CLI()——这是一款命令行工具,支持通过自然语言指令和YAML/CSV文件运行端到端UI测试。DevAssure使用AI Agent执行以简明英语描述的浏览器端测试。
@devassure/cli当用户询问DevAssure、DevAssure CLI、DevAssure Invisible Agent,或者想要使用DevAssure CLI工具( npm包)设置、配置、编写或运行端到端UI测试时,请使用本技能。当提及以下任意内容时触发本技能:devassure、devassure cli、devassure init、devassure run、devassure tests、.devassure文件夹、DevAssure测试用例、DevAssure YAML测试文件、DevAssure CSV测试、DevAssure CI/CD集成、DevAssure actions、DevAssure工具、DevAssure测试数据、DevAssure personas、DevAssure偏好设置,或是基于DevAssure的自然语言UI测试自动化。当用户想要为DevAssure编写YAML测试用例、配置DevAssure项目、在CI/CD流水线中搭建DevAssure、按标签/优先级/文件夹筛选或运行DevAssure测试、查看DevAssure报告,或是管理DevAssure会话时也需要触发本技能。即使用户仅提到“用devassure搭建e2e测试”、“编写devassure测试用例”、“运行端到端测试”、“搭建e2e测试”、“运行e2e测试”、“执行测试”、“从csv执行测试”,也请使用本技能。
@devassure/cliQuick Reference
快速参考
For full CLI command reference, configuration file formats, actions, tools, and advanced examples, read:
- — Complete command list, all config file formats, actions, tools, library tools, FAQ, and examples.
references/cli-reference.md - — Web app login issues ("Something went wrong"), VPN/host allowlist, and links to official troubleshooting docs.
references/cli-troubleshooting.md
Always consult the reference file before answering detailed questions about specific commands, flags, or config file schemas. Use the troubleshooting reference for login, VPN, and connectivity problems.
如需完整的CLI命令参考、配置文件格式、actions、工具和高级示例,请阅读:
- —— 完整命令列表、所有配置文件格式、actions、工具、库工具、常见问题及示例。
references/cli-reference.md - —— Web应用登录问题(“出现未知错误”)、VPN/主机白名单,以及官方故障排查文档链接。
references/cli-troubleshooting.md
在回答有关特定命令、参数标志或配置文件模式的详细问题前,请始终查阅参考文件。遇到登录、VPN和连接问题时请使用故障排查参考文档。
Prerequisites
前置要求
- Node.js 18+
- A DevAssure account (free trial available at https://app.devassure.io/sign_up)
- Node.js 18+
- 一个DevAssure账号(可访问https://app.devassure.io/sign_up 获取免费试用)
Installation
安装
bash
npm install -g @devassure/cliVerify:
bash
devassure versionNote: The package requires global installation.(local) will fail.npm install
bash
npm install -g @devassure/cli验证安装:
bash
devassure version注意: 该包需要全局安装。(本地安装)会失败。npm install
Core Workflow
核心工作流
1. Authenticate
1. 身份验证
bash
undefinedbash
undefinedInteractive (opens browser for OAuth2)
交互式(打开浏览器走OAuth2认证)
devassure login
devassure login
Token-based (for CI/CD)
令牌模式(用于CI/CD场景)
devassure add-token <your-token>
undefineddevassure add-token <your-token>
undefined2. Initialize a project
2. 初始化项目
bash
devassure initThis creates a folder with:
.devassure/- — App description and rules
app.yaml - — URLs, credentials, test data per environment
test_data.yaml - — User personas
personas.yaml - — Browser and execution settings
preferences.yaml - — Folder for YAML test case files
tests/ - — Reusable action definitions
actions/
bash
devassure init该命令会创建一个文件夹,包含以下内容:
.devassure/- —— 应用描述和规则
app.yaml - —— 各环境对应的URL、凭证、测试数据
test_data.yaml - —— 用户角色(personas)
personas.yaml - —— 浏览器和执行设置
preferences.yaml - —— 存放YAML测试用例文件的文件夹
tests/ - —— 可复用的action定义
actions/
3. Write test cases
3. 编写测试用例
Test cases are YAML files in .
.devassure/tests/Single test — one case per file as a mapping:
yaml
summary: Login and verify dashboard
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify dashboard loads and shows admin menu
- Log out
priority: P0
tags:
- smoke
- loginMultiple tests — several cases in the same file when they belong to the same group or feature. Use a top-level list (each item is one test):
yaml
- summary: Login and verify dashboard
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify dashboard loads and shows admin menu
- Log out
priority: P0
tags: [smoke, login]
- summary: Login and verify user name with welcome message
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify dashboard the welcome message contains the user name
priority: P2
tags: [login]Only and are required. Steps are written in natural language — the DevAssure AI agent interprets and executes them in a browser.
summarysteps测试用例是存放在下的YAML文件。
.devassure/tests/单测试 —— 单个文件对应一个用例,以映射形式编写:
yaml
summary: Login and verify dashboard
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify dashboard loads and shows admin menu
- Log out
priority: P0
tags:
- smoke
- login多测试 —— 当多个用例属于同一分组或功能时,可以放在同一个文件中。使用顶层列表(每一项对应一个测试):
yaml
- summary: Login and verify dashboard
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify dashboard loads and shows admin menu
- Log out
priority: P0
tags: [smoke, login]
- summary: Login and verify user name with welcome message
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify dashboard the welcome message contains the user name
priority: P2
tags: [login]仅和为必填项。步骤使用自然语言编写 —— DevAssure AI Agent会解析这些步骤并在浏览器中执行。
summarysteps4. Run tests
4. 运行测试
bash
undefinedbash
undefinedRun all tests
运行所有测试
devassure run-tests
devassure run-tests
Filter by tags, priority, or folder
按标签、优先级或文件夹筛选
devassure run-tests --tag=smoke,regression --priority=P0,P1
devassure run-tests --tag=smoke,regression --priority=P0,P1
Run from CSV file
从CSV文件运行测试
devassure run-tests --csv=test-cases.csv
devassure run-tests --csv=test-cases.csv
Archive reports after run
运行后归档报告
devassure run-tests --archive=./reports
undefineddevassure run-tests --archive=./reports
undefined5. View reports
5. 查看报告
bash
devassure open-report --last
devassure summary --last --jsonbash
devassure open-report --last
devassure summary --last --jsonKey Concepts
核心概念
Test Data (test_data.yaml
)
test_data.yaml测试数据(test_data.yaml
)
test_data.yamlDefine URLs, user credentials, and custom data per environment (default, uat, staging, etc.). The environment is used when is not specified.
default--environment定义各环境(默认、uat、预发等)对应的URL、用户凭证和自定义数据。未指定参数时会使用环境。
--environmentdefaultActions (.devassure/actions/
)
.devassure/actions/Actions(.devassure/actions/
)
.devassure/actions/Reusable step sequences. Define an action in a YAML file with , , and . Reference actions by name in test steps.
namedescriptionsteps可复用的步骤序列。在YAML文件中定义带有、和的action,在测试步骤中可通过名称引用对应的action。
namedescriptionstepsTools (.devassure/tools/index.yaml
)
.devassure/tools/index.yamlTools(.devassure/tools/index.yaml
)
.devassure/tools/index.yamlCustom commands/scripts that the agent can invoke during test execution. Supports args, output markers, timeouts, and environment variables.
Agent在测试执行过程中可以调用的自定义命令/脚本。支持参数、输出标记、超时设置和环境变量。
Library Tools (library.yaml
)
library.yaml库工具(library.yaml
)
library.yamlBuilt-in tools like (synthetic data) and (TOTP codes).
fakerauthenticator内置工具,例如(生成模拟数据)和(生成TOTP验证码)。
fakerauthenticatorPreferences (preferences.yaml
)
preferences.yaml偏好设置(preferences.yaml
)
preferences.yamlConfigure browser (chromium/chrome/edge), resolution, headless mode, and worker count.
配置浏览器(chromium/chrome/edge)、分辨率、无头模式和并发worker数量。
CI/CD Integration
CI/CD集成
bash
undefinedbash
undefinedAuthenticate with token (no browser needed)
使用令牌认证(无需浏览器)
devassure add-token $DEVASSURE_TOKEN
devassure add-token $DEVASSURE_TOKEN
Run tests with filters and archive results
带筛选条件运行测试并归档结果
devassure run-tests --tag=regression --priority=P0 --archive=./test-reports
devassure run-tests --tag=regression --priority=P0 --archive=./test-reports
Get JSON summary for CI parsing
获取JSON格式的汇总结果供CI解析
devassure summary --last --json
devassure summary --last --json
Clean up old sessions
清理旧的会话
devassure cleanup --retain-days 7
Supports proxy via `HTTP_PROXY` / `HTTPS_PROXY` environment variables.devassure cleanup --retain-days 7
支持通过`HTTP_PROXY` / `HTTPS_PROXY`环境变量配置代理。When Helping Users
帮助用户时的注意事项
- Setting up a new project: Walk them through →
login→ writing test cases →init.run-tests - Writing test cases: Help write YAML test files with natural language steps. Keep steps clear and action-oriented.
- CI/CD setup: Help configure token-based auth, test filtering, report archiving, and cleanup.
- Troubleshooting: Check Node.js version (18+), global install, authentication status. For web login errors, HTTPS/mixed content, firewall, and VPN host allowlists, see .
references/cli-troubleshooting.md - Advanced config: Refer to for tools, actions, library tools, and full config schemas.
references/cli-reference.md
- 搭建新项目:引导用户按→
login→ 编写测试用例 →init的流程操作。run-tests - 编写测试用例:帮助编写带有自然语言步骤的YAML测试文件,保持步骤清晰、面向操作。
- CI/CD搭建:帮助配置令牌认证、测试筛选、报告归档和清理逻辑。
- 故障排查:检查Node.js版本(18+)、是否全局安装、认证状态。遇到网页登录错误、HTTPS/混合内容、防火墙和VPN主机白名单问题,请查阅。
references/cli-troubleshooting.md - 高级配置:有关工具、actions、库工具和完整配置模式的内容,请参考。
references/cli-reference.md