We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
github.com/sigoden/apitest
编写测试文件 httpbin.jsona
httpbin.jsona
{ test1: { req: { url: "https://httpbin.org/post", method: "post", header: { 'content-type': 'application/json', }, body: { v1: "bar1", v2: "Bar2", }, }, res: { status: 200, body: { @partial json: { v1: "bar1", v2: "bar2" } } } } }
运行测试
apitest httpbin.jsona module main unit test1 (0.944) ✘ main.test1.res.body.json.v2: bar2 ≠ Bar2 ...
用例测试失败,从Apitest打印的错误信息中可以看到, main.test1.res.body.json.v2 的实际值是 Bar2 而不是 bar2。
main.test1.res.body.json.v2
Bar2
bar2
我们修改 bar2 成 Bar2 后,再次执行 Apitest
apitest httpbin.jsona module main unit test1 (0.930) ✔
这次测试通过了。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
源码
github.com/sigoden/apitest
特性
快速开始
编写测试文件
httpbin.jsona
运行测试
用例测试失败,从Apitest打印的错误信息中可以看到,
main.test1.res.body.json.v2
的实际值是Bar2
而不是bar2
。我们修改
bar2
成Bar2
后,再次执行 Apitest这次测试通过了。
The text was updated successfully, but these errors were encountered: