Shortest的安装流程分为三个关键步骤:
- Installation von Abhängigkeiten:通过npm/pnpm/yarn安装包(建议开发依赖):
npm install -D @antiwork/shortest
- Projekt-Konfiguration::
- 在.gitignore中添加
.shortest/
目录避免提交测试缓存 - einrichten.
shortest.config.ts
配置文件,需包含:headless
:是否无头模式运行baseUrl
:被测系统基础地址anthropicKey
:Claude API密钥(建议通过环境变量注入)
- 在.gitignore中添加
- 测试目录准备::
- 约定使用
**/*.test.ts
模式匹配测试文件 - 示例测试文件需导入
@antiwork/shortest
(in Form eines Nominalausdrucks)shortest
Methodologien
- 约定使用
注意运行时需要Node.js环境(建议v16+),首次配置后可通过npx shortest
命令验证安装。
Diese Antwort stammt aus dem ArtikelShortest: ein KI-Tool für automatisierte Tests, das natürliche Sprache für End-to-End-Tests verwendetDie