前言:最近在B站刷到了柠檬班的httprunner教程,抱着复习httprunner框架的心态,把这门课程从头到尾看了一边,还真的学到了一些新的东西。废话不多数,开始正文。
测试用例内容:
- name: 001 添加用户成功
api: api/cmc/System_Manage/user_manage/cmc_user_add.yml
variables:
userId: "wpc02"
account: "wpc02"
name: "wpc02"
password: "LD9KcSQ1OOhzugl61qliMQ=="
sex: 'false'
phone: "010-1234567"
mobile: "18262144550"
email: "wpc02@qq.com"
company: "test"
remark: "this is a test"
validate:
- eq: [status_code, 200]
- eq: [content.success, true