GetAllRanksAsync.robot 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. *** Settings ***
  2. Documentation 客户端-获取所有职称
  3. Suite Setup
  4. Resource ../../../CommonConfig/Config.robot
  5. Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
  6. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddRanksAsync.robot
  7. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetAllRanksAsync.robot
  8. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveRanksAsync.robot
  9. *** Variables ***
  10. *** Test Cases ***
  11. Class_001_获取所有职称信息,仅Token传值
  12. [Template]
  13. #随机生成职称名
  14. ${raName} Random Characters
  15. #登录,获取用户Token
  16. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  17. #添加职称信息
  18. ${res} AddRanksAsyncPost ${token} ${raName} ${organizationInfo_mao}[0] ${EMPTY}
  19. Log ${res}
  20. #添加职称成功校验
  21. ${flag1} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  22. Should Be True ${flag1}
  23. #获取所有职称信息
  24. ${res1} GetAllRanksAsyncPost ${token} ${EMPTY} ${EMPTY}
  25. Log ${res1}
  26. #获取所有职称信息非空校验
  27. ${content} Get From Dictionary ${res1} content
  28. Should Not Be Empty ${content}
  29. #获取新添加职称信息记录的RankCode
  30. ${rankCodes} GetAllRanksAsyncPost_RankCodeLi ${token} ${EMPTY} ${organizationInfo_mao}[0]
  31. #删除职称
  32. ${response} RemoveRanksAsyncPost_RankCodes ${token} ${rankCodes}
  33. #删除组织校验
  34. ${flag2} Result Analysis ${response} True ${EMPTY} ${EMPTY}
  35. Should Be True ${flag2}
  36. Class_002_获取所有职称信息,传入RankCodeOrganizationCode
  37. [Template]
  38. #随机生成职称名
  39. ${raName1} Random Characters
  40. ${raName2} Random Characters
  41. #登录,获取用户Token
  42. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  43. #添加职称信息1
  44. ${res1} AddRanksAsyncPost ${token} ${raName1} ${organizationInfo_mao}[0] ${EMPTY}
  45. Log ${res1}
  46. #添加职称1成功校验
  47. ${flag1} Result Analysis ${res1} True ${EMPTY} ${EMPTY}
  48. Should Be True ${flag1}
  49. #添加职称信息2
  50. ${res2} AddRanksAsyncPost ${token} ${raName2} ${organizationInfo_mao}[0] ${EMPTY}
  51. Log ${res2}
  52. #添加职称2成功校验
  53. ${flag2} Result Analysis ${res2} True ${EMPTY} ${EMPTY}
  54. Should Be True ${flag2}
  55. #获取所有职称信息非空校验
  56. ${rankCodes} GetAllRanksAsyncPost_RankCodeLi ${token} ${EMPTY} ${organizationInfo_mao}[0]
  57. Should Not Be Empty ${rankCodes}
  58. #删除新添加的职称信息
  59. ${response} RemoveRanksAsyncPost_RankCodes ${token} ${rankCodes}
  60. #删除组织校验
  61. ${flag2} Result Analysis ${response} True ${EMPTY} ${EMPTY}
  62. Should Be True ${flag2}
  63. Exception_001_获取所有职称信息,Token非空校验
  64. [Template]
  65. #获取所有职称信息
  66. ${res} GetAllRanksAsyncPost ${EMPTY} ${EMPTY} ${EMPTY}
  67. Log ${res}
  68. #返回error信息校验
  69. ${flag} Result Analysis ${res} false ${1} Permission validation error
  70. Should Be True ${flag}
  71. Exception_002_获取所有职称信息,Token正确性校验
  72. [Template]
  73. #获取所有职称信息
  74. ${res} GetAllRanksAsyncPost 11111 ${EMPTY} ${EMPTY}
  75. Log ${res}
  76. #返回error信息校验
  77. ${flag} Result Analysis ${res} false ${1} Permission validation error
  78. Should Be True ${flag}
  79. *** Keywords ***