{ "lyid": "1", "membershipid": "162", "tpid": "1", "bid": "2543344839898898", "taskid": "T-162-C1-01", "inserttime": "2023-05-05 12:20:20" }针对这个入参编写测试用例
时间: 2023-07-12 17:01:36 浏览: 83
1. 测试用例名称:测试lyid为正整数的情况
输入数据:{ "lyid": "123", "membershipid": "162", "tpid": "1", "bid": "2543344839898898", "taskid": "T-162-C1-01", "inserttime": "2023-05-05 12:20:20" }
预期输出:程序正常执行,不报错,返回结果符合要求。
2. 测试用例名称:测试lyid为负整数的情况
输入数据:{ "lyid": "-123", "membershipid": "162", "tpid": "1", "bid": "2543344839898898", "taskid": "T-162-C1-01", "inserttime": "2023-05-05 12:20:20" }
预期输出:程序报错,提示lyid必须是正整数。
3. 测试用例名称:测试lyid为0的情况
输入数据:{ "lyid": "0", "membershipid": "162", "tpid": "1", "bid": "2543344839898898", "taskid": "T-162-C1-01", "inserttime": "2023-05-05 12:20:20" }
预期输出:程序报错,提示lyid必须是正整数。
4. 测试用例名称:测试membershipid为字符串的情况
输入数据:{ "lyid": "1", "membershipid": "abc", "tpid": "1", "bid": "2543344839898898", "taskid": "T-162-C1-01", "inserttime": "2023-05-05 12:20:20" }
预期输出:程序报错,提示membershipid必须是正整数。
5. 测试用例名称:测试tpid为null的情况
输入数据:{ "lyid": "1", "membershipid": "162", "tpid": null, "bid": "2543344839898898", "taskid": "T-162-C1-01", "inserttime": "2023-05-05 12:20:20" }
预期输出:程序报错,提示tpid不能为空。
6. 测试用例名称:测试bid为空字符串的情况
输入数据:{ "lyid": "1", "membershipid": "162", "tpid": "1", "bid": "", "taskid": "T-162-C1-01", "inserttime": "2023-05-05 12:20:20" }
预期输出:程序报错,提示bid不能为空。
7. 测试用例名称:测试taskid为特殊字符的情况
输入数据:{ "lyid": "1", "membershipid": "162", "tpid": "1", "bid": "2543344839898898", "taskid": "!@#$%^&*()", "inserttime": "2023-05-05 12:20:20" }
预期输出:程序报错,提示taskid只能包含字母、数字和下划线。
8. 测试用例名称:测试inserttime格式不正确的情况
输入数据:{ "lyid": "1", "membershipid": "162", "tpid": "1", "bid": "2543344839898898", "taskid": "T-162-C1-01", "inserttime": "2023/05/05 12:20:20" }
预期输出:程序报错,提示inserttime格式不正确,应为yyyy-mm-dd HH:MM:SS。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)