提现接口用例

Posted zhang-ping1205

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了提现接口用例相关的知识,希望对你有一定的参考价值。

技术图片

 

case_id interface title method url request_data expected check_sql
1 withdraw 提现成功-整数 post member/withdraw {"member_id":"#member_id#","amount":"5000"} {"code": 0,"msg": "OK", "data": {"id": #member_id#,"leave_amount": #money#,} select CAST(member.leave_amount AS CHAR) as leave_amount from member where id=#member_id#;
2 withdraw 提现成功-1位小数 post member/withdraw {"member_id":"#member_id#","amount":"5000.1"} {"code": 0,"msg": "OK", "data": {"id": #member_id#,"leave_amount": #money#,} select CAST(member.leave_amount AS CHAR) as leave_amount from member where id=#member_id#;
3 withdraw 提现成功-2位小数 post member/withdraw {"member_id":"#member_id#","amount":"5002.22"} {"code": 0,"msg": "OK", "data": {"id": #member_id#,"leave_amount": #money#,} select CAST(member.leave_amount AS CHAR) as leave_amount from member where id=#member_id#;
4 withdraw 提现成功-50万 post member/withdraw {"member_id":"#member_id#","amount":"50000"} {"code": 0,"msg": "OK", "data": {"id": #member_id#,"leave_amount": #money#,} select CAST(member.leave_amount AS CHAR) as leave_amount from member where id=#member_id#;
5 withdraw 会员id为空 post member/withdraw {"member_id":"","amount":"5000"} {"code":1,"msg":"用户id为空"}
6 withdraw id不是当前登录的用户 post member/withdraw {"member_id":"95115411","amount":"5000"} {"code":1007,"msg":"无权限访问,请检查参数"}
7 withdraw 会员id为字符串 post member/withdraw {"member_id": "#member_id#","amount":5000} {"code": 2,"msg": "数值参数格式不正确",}
8 withdraw 会员id为小数 post member/withdraw {"member_id":"94555.12","amount":"5000"} {"code": 2,"msg": "数值参数格式不正确",}
9 withdraw 提现金额为0 post member/withdraw {"member_id":"#member_id#","amount":"0"} {"code": 0,"msg": "OK", "data": {"id": #member_id#,"leave_amount": #money#,} select CAST(member.leave_amount AS CHAR) as leave_amount from member where id=#member_id#;
10 withdraw 提现金额为负数 post member/withdraw {"member_id":"#member_id#","amount":"-50"} {"code":2,"msg":"金额必须大于0并且小于或者等于500000"}
11 withdraw 提现金额为空 post member/withdraw {"member_id":"#member_id#","amount":""} {"code":1,"msg":"提现金额为空"}
12 withdraw 提现金额-3位小数 post member/withdraw {"member_id":"#member_id#","amount":"5000.123"} {"code":2,"msg":"金额小数超过两位"}
13 withdraw 提现金额-大于50万 post member/withdraw {"member_id":"#member_id#","amount":"500001"} {"code":2,"msg":"金额必须大于0并且小于或者等于500000"}
14 withdraw 提现金额-非数字 post member/withdraw {"member_id":"#member_id#","amount":"5万"} {"code": 2,"msg": "数值参数格式不正确",}

以上是关于提现接口用例的主要内容,如果未能解决你的问题,请参考以下文章

9. 账务提现接口

小程序发红包 公众号发红包开发中遇到的问题 大并发 频繁提现 刷接口

Api看看PHP是如何实现微信提现功能的

如何简单设计接口测试用例

接口测试用例篇:如何编写app接口测试用例

测试面试题集-测试用例设计:登录购物车QQ收藏表情转账充值提现