AddRanksAsync.robot 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. *** Settings ***
  2. Documentation 客户端-添加职称
  3. Resource ../../../CommonConfig/Config.robot
  4. Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
  5. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddRanksAsync.robot
  6. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetAllRanksAsync.robot
  7. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveRanksAsync.robot
  8. *** Variables ***
  9. *** Test Cases ***
  10. Class_001_添加职称信息
  11. #随机生成职称名
  12. ${raName} Random Characters
  13. #登录,获取用户Token
  14. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  15. #添加职称信息
  16. ${res} AddRanksAsyncPost ${token} ${raName} ${organizationInfo_mao}[0] ${EMPTY}
  17. Log ${res}
  18. #添加职称成功校验
  19. ${flag1} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  20. Should Be True ${flag1}
  21. #获取新添加职称信息记录的RankCode
  22. ${rankCode} GetAllRanksAsyncPost_RankCode ${token} ${EMPTY} ${organizationInfo_mao}[0]
  23. #删除职称
  24. ${response} RemoveRanksAsyncPost ${token} ${rankCode}
  25. #删除组织校验
  26. ${flag2} Result Analysis ${response} True ${EMPTY} ${EMPTY}
  27. Should Be True ${flag2}
  28. Exception_001_添加职称信息,Token非空校验
  29. #添加职称信息,Token传入空值
  30. ${res} AddRanksAsyncPost ${EMPTY} ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY}
  31. Log ${res}
  32. #返回error信息校验
  33. ${flag} Result Analysis ${res} false ${1} Permission validation error
  34. Should Be True ${flag}
  35. Exception_002_添加职称信息,Token正确性校验
  36. #添加职称信息,Token传入空值
  37. ${res} AddRanksAsyncPost 1111111 ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY}
  38. Log ${res}
  39. #返回error信息校验
  40. ${flag} Result Analysis ${res} false ${1} Permission validation error
  41. Should Be True ${flag}
  42. Exception_003_添加职称信息,RankName非空校验
  43. #登录,获取用户Token
  44. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  45. #添加职称信息
  46. ${res} AddRanksAsyncPost ${token} ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY}
  47. Log ${res}
  48. #返回error信息校验
  49. ${flag} Result Analysis ${res} false ${6023} RankName is Empty
  50. Should Be True ${flag}
  51. Exception_004_添加职称信息,RankName重名校验
  52. [Tags] inexecution
  53. #随机生成职称名
  54. ${raName} Random Characters
  55. #登录,获取用户Token
  56. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  57. #添加职称信息
  58. ${res} AddRanksAsyncPost ${token} ${raName} ${organizationInfo_mao}[0] ${EMPTY}
  59. Log ${res}
  60. #添加职称成功校验
  61. ${flag1} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  62. Should Be True ${flag1}
  63. #获取新添加职称信息记录的RankCode
  64. ${rankCode} GetAllRanksAsyncPost_RankCodeLi ${token} ${EMPTY} ${organizationInfo_mao}[0]
  65. #添加同名职称信息
  66. ${res1} AddRanksAsyncPost ${token} ${raName} ${organizationInfo_mao}[0] ${EMPTY}
  67. Log ${res1}
  68. #返回error信息校验
  69. ${flag2} Result Analysis ${res1} false ${6055} RankName Duplicate
  70. Should Be True ${flag2}
  71. #删除职称
  72. ${response} RemoveRanksAsyncPost ${token} ${rankCode}
  73. #删除组织校验
  74. ${flag3} Result Analysis ${response} True ${EMPTY} ${EMPTY}
  75. Should Be True ${flag3}
  76. Exception_005_添加职称信息,RankName最大字符长度校验
  77. [Tags] inexecution
  78. Exception_006_添加职称信息,OrganizationCode非空校验
  79. [Tags] inexecution
  80. #登录,获取用户Token
  81. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  82. #添加职称信息
  83. ${res} AddRanksAsyncPost ${token} 111111 ${EMPTY} ${EMPTY}
  84. Log ${res}
  85. #返回error信息校验
  86. ${flag} Result Analysis ${res} false ${6023} OrganizationCode is Empty
  87. Should Be True ${flag}
  88. Exception_007_添加职称信息,OrganizationCode正确性校验
  89. [Tags] inexecution
  90. #登录,获取用户Token
  91. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  92. #添加职称信息
  93. ${res} AddRanksAsyncPost ${token} 111111 111111 ${EMPTY}
  94. Log ${res}
  95. #返回error信息校验
  96. ${flag} Result Analysis ${res} false ${6023} ??????
  97. Should Be True ${flag}
  98. *** Keywords ***