SearchOrganizationsAsync.robot 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. *** Settings ***
  2. Documentation 客户端-搜索组织
  3. Suite Setup
  4. Resource ../../../CommonConfig/Config.robot
  5. Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
  6. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddOrganizationsAsync.robot
  7. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/SearchOrganizationsAsync.robot
  8. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveOrganizationsAsync.robot
  9. *** Variables ***
  10. *** Test Cases ***
  11. Class_001_获取组织信息,组织类型为医院
  12. [Template]
  13. #登录,获取用户Token
  14. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  15. #搜索组织,OrganizationType为0
  16. ${res} SearchOrganizationsAsyncPost ${token} ${EMPTY} ${EMPTY} ${organizationType}[0]
  17. #校验返回不为空
  18. ${content} Get From Dictionary ${res} content
  19. Should Not Be Empty ${content}
  20. Class_002_获取组织信息,组织类型为部门
  21. [Template]
  22. #随机生成组织名
  23. ${oranName} Random Characters
  24. #登录,获取用户Token
  25. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  26. #添加组织
  27. ${res} AddOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
  28. Log ${res}
  29. #校验添加组织返回
  30. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  31. Should Be True ${flag}
  32. #搜索组织,填写Keyword、OrganizationType为0
  33. ${response} SearchOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${organizationType}[1]
  34. #校验搜索组织返回
  35. ${content} Get From Dictionary ${response} content
  36. ${organizationName} Get From Dictionary ${content}[0] OrganizationName
  37. Should Be Equal As Strings ${organizationName} ${oranName}
  38. #搜索组织,返回OrganizationCode
  39. ${organizationCode} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName} ${organizationInfo_mao}[0] ${organizationType}[1]
  40. #删除组织
  41. ${res} RemoveOrganizationsAsyncPost ${token} ${organizationCode}
  42. Class_003_获取组织信息,填写OrganizationName中不包含的关键字
  43. [Template]
  44. #登录,获取用户Token
  45. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  46. #搜索组织,关键字输入组织中不存在部门名称
  47. ${res} SearchOrganizationsAsyncPost ${token} 88996677yayaya ${EMPTY} ${organizationType}[1]
  48. #校验返回为空
  49. ${content} Get From Dictionary ${res} content
  50. Should Be Empty ${content}
  51. Class_004_获取组织信息,填写不存在下级部门的父级编码
  52. [Template]
  53. #登录,获取用户Token
  54. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  55. #搜索组织,输入不存在的父级编码
  56. ${res} SearchOrganizationsAsyncPost ${token} ${EMPTY} 88996677yayaya ${organizationType}[0]
  57. #校验返回为空
  58. ${content} Get From Dictionary ${res} content
  59. Should Be Empty ${content}
  60. Class_005_获取组织信息,填写不存的组织类型
  61. [Template]
  62. #登录,获取用户Token
  63. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  64. #搜索组织,输入不存在的组织类型
  65. ${res} SearchOrganizationsAsyncPost ${token} ${EMPTY} ${EMPTY} 99
  66. #校验返回为空
  67. ${content} Get From Dictionary ${res} content
  68. Should Be Empty ${content}
  69. Exception_001_搜索组织,Token非空校验
  70. [Template]
  71. #搜索组织,Token传入空值
  72. ${res} SearchOrganizationsAsyncPost ${EMPTY} ${EMPTY} ${EMPTY} ${organizationType}[0]
  73. #返回error信息校验
  74. ${flag} Result Analysis ${res} false ${1} Permission validation error
  75. Should Be True ${flag}
  76. Exception_002_搜索组织,Token正确性校验
  77. [Template]
  78. #搜索组织,Token传入空值
  79. ${res} SearchOrganizationsAsyncPost 11223344 ${EMPTY} ${EMPTY} ${organizationType}[0]
  80. #返回error信息校验
  81. ${flag} Result Analysis ${res} false ${1} Permission validation error
  82. Should Be True ${flag}
  83. *** Keywords ***