spachtholz/TestID-Generator
GitHub: spachtholz/TestID-Generator
一个 Angular 构建时工具链,自动生成并管理确定性的 data-testid 属性,同时为 Robot Framework 自动产出定位器文件。
Stars: 0 | Forks: 0
# testid-automation
[](https://github.com/spachtholz/TestID-Generator/releases)
[](LICENSE)
[](https://nodejs.org/)
[](https://angular.dev/)
[](https://www.typescriptlang.org/)
[](https://vitest.dev/)
Angular 构建时工具链。直接在模板中生成确定性的 `data-testid` 属性,在版本化注册表中对其进行跟踪,并根据注册表生成 Robot-Framework 定位器文件。开箱即支持原生 HTML、PrimeNG 和 Angular Material。
## 安装
```
npm install
npm run build
npm pack
# 全局
npm install -g ./testid-automation-0.5.1.tgz
# 或作为项目 dev dependency
npm install --save-dev ./testid-automation-0.5.1.tgz
```
## 快速入门
```
testid tag --verbose
testid diff testids.v1.json testids.v2.json --out-dir test-artifacts/testids
testid gen-locators testids.latest.json --out-dir tests/locators
```
所有这三个命令都读取一个包含 `tagger` / `differ` / `locators` 部分的 `testid.config.json` 文件。适用于常见配置的可复制配置示例位于 [`examples/configs/`](examples/configs/) 中。有关完整的选项参考,请参阅 [配置](https://github.com/spachtholz/TestID-Generator/wiki/Configuration) wiki 页面。
## 文档
- [功能](https://github.com/spachtholz/TestID-Generator/wiki/Features)
- [安装](https://github.com/spachtholz/TestID-Generator/wiki/Installation)
- [快速入门](https://github.com/spachtholz/TestID-Generator/wiki/Quick-Start)
- [配置](https://github.com/spachtholz/TestID-Generator/wiki/Configuration)
- [注册表格式](https://github.com/spachtholz/TestID-Generator/wiki/Registry-Format)
- [Robot Framework 集成](https://github.com/spachtholz/TestID-Generator/wiki/Robot-Framework-Integration)
- [示例](https://github.com/spachtholz/TestID-Generator/wiki/Examples)
- [退出代码](https://github.com/spachtholz/TestID-Generator/wiki/Exit-Codes)
- [开发](https://github.com/spachtholz/TestID-Generator/wiki/Development)
## 许可证
Apache 2.0 - 详见 [`LICENSE`](LICENSE)。
标签:Angular, Angular Material, data-testid, DNS解析, E2E测试, GNU通用公共许可证, Grype, HTML, MITM代理, Node.js, NPM包, OSV-Scalibr, PrimeNG, Robot Framework, TypeScript, UI测试, 代码生成器, 安全可观测性, 安全插件, 开源框架, 开源项目, 持续集成, 数据管道, 测试标识符, 测试自动化, 版本控制, 自动化攻击, 软件工程