什么是 property-based-testing?
在编写序列化、验证、规范化或纯函数测试时使用 - 为基于属性的测试提供属性目录、模式检测和库参考 来源:ed3dai/ed3d-plugins。
在编写序列化、验证、规范化或纯函数测试时使用 - 为基于属性的测试提供属性目录、模式检测和库参考
通过命令行快速安装 property-based-testing AI 技能到你的开发环境
来源:ed3dai/ed3d-plugins。
Property-based testing (PBT) generates random inputs and verifies that properties hold for all of them. Instead of testing specific examples, you test invariants.
| Roundtrip | decode(encode(x)) == x | Serialization, conversion pairs | | Idempotence | f(f(x)) == f(x) | Normalization, formatting, sorting | | Invariant | Property holds before/after | Any transformation | | Commutativity | f(a, b) == f(b, a) | Binary/set operations | | Associativity | f(f(a,b), c) == f(a, f(b,c)) | Combining operations |
| Identity | f(x, identity) == x | Operations with neutral element | | Inverse | f(g(x)) == x | encrypt/decrypt, compress/decompress | | Oracle | newimpl(x) == reference(x) | Optimization, refactoring | | Easy to Verify | issorted(sort(x)) | Complex algorithms | | No Exception | No crash on valid input | Baseline (weakest) |
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/ed3dai/ed3d-plugins --skill property-based-testing在编写序列化、验证、规范化或纯函数测试时使用 - 为基于属性的测试提供属性目录、模式检测和库参考 来源:ed3dai/ed3d-plugins。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/ed3dai/ed3d-plugins --skill property-based-testing 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/ed3dai/ed3d-plugins