各种用例格式的相互转换
1、转换测试用例格式的常用场景
(1)yaml转pytest用例
hrp convert add_case_test.yaml --to-pytest
(2)指定路径+指定header
hrp convert add_case_test.yaml --to-pytest --output-dir ../testcases/project1 --profile ../profile/profile_override.yaml
2、转换测试用例格式的其他场景
可转化生成用例格式有: json、yaml、go、py
可被转换的用例格式有:json、yaml
2.1 yaml用例格式转其他格式
- 转pytest:
hrp convert demo.yaml --to-pytest
- 转yaml:
hrp convert demo.yaml --to-yaml
- 转json:
hrp convert demo.yaml --to-json
- 转gotest【todo】
2.2 json用例格式转其他格式
- 转pytest:
hrp convert demo_with_funplugin.json --to-pytest
,好像有bug,暂时没转成功 - 转yaml:
hrp convert demo_with_funplugin.json --to-yaml
- 转json:
hrp convert demo_with_funplugin.json --to-json
- 转gotest【todo】