2_登录成功测试用例.yaml 908 B

12345678910111213141516171819202122232425262728293031323334353637
  1. process: G0--P
  2. desc: T2-登录用例
  3. featureName: 登录模块
  4. storyName: 用户模块
  5. remark: 登录模块备注
  6. steps:
  7. - 发送Post请求:
  8. 关键字: request_post_form_urlencoded
  9. URL: "{{URL}}"
  10. PARAMS:
  11. s: /api/user/login
  12. application: app
  13. DATA:
  14. accounts: "{{username}}"
  15. pwd: "{{password}}"
  16. type: username
  17. - 通过JSONPATH提取数据-MSG:
  18. 关键字: ex_jsonData
  19. EXVALUE: $..msg
  20. INDEX: 0
  21. VARNAME: msg_success
  22. - 通过JSONPATH提取数据-TOKEN:
  23. 关键字: ex_jsonData
  24. EXVALUE: $..token
  25. INDEX: 0
  26. VARNAME: msg_token
  27. - 断言-文本断言-等于:
  28. 关键字: assert_text_comparators
  29. VALUE: "{{msg_success}}"
  30. EXPECTED: "{{expected}}"
  31. OP_STR: ==
  32. ddts:
  33. - username: zzh124
  34. password: '123456'
  35. expected: '登录成功'
  36. desc: "正确的用户名和密码"