1. 通过har文件生成测试用例
1.1 使用 har文件生成 pytest 测试用例
har2case har/postman-echo-post-form.har
1.2 使用 har文件生成 json 格式的测试用例
har2case har/postman-echo-post-form.har -2j
1.3 使用 har文件生成 yaml 格式的测试用例
har2case har/postman-echo-post-form.har -2y
2. 运行测试用例的方法
2.1 运行 pytest 测试用例的方法(两个运行效果一致)
hrun testcases/postman_echo_post_form_test.py
pytest testcases/postman_echo_post_form_test.py
2.2 运行 json 测试用例的方法
hrun testcases/postman-echo-post-form.json
2.3 运行 yaml 测试用例的方法
hrun testcases/postman_echo_post_form.yaml
3. 测试用例格式转换
3.1 将yaml测试用例转换成为pytest测试用例
hmake testcases/demo_testcase_ref.yml
3.2 将json测试用例转换成为pytest测试用例
hmake testcases/demo_testcase_ref.json