123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- *** Settings ***
- Documentation 添加组织
- Resource ../../../CommonConfig/Config.robot
- Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddOrganizationsAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/SearchOrganizationsAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveOrganizationsAsync.robot
- *** Variables ***
- *** Test Cases ***
- Class_001_添加组织
- [Setup]
- [Template]
- #随机生成组织名
- ${oranName} Random Characters
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #添加组织
- ${res} AddOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- #搜索组织,返回OrganizationCode
- ${organizationCode} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName} ${organizationInfo_mao}[0] ${organizationType}[1]
- #删除组织
- ${response} RemoveOrganizationsAsyncPost ${token} ${organizationCode}
- #删除组织校验
- ${flag} Result Analysis ${response} True ${EMPTY} ${EMPTY}
- Exception_001_添加组织,OrganizationName非空校验
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #添加组织,OrganizationName传入空值
- ${res} AddOrganizationsAsyncPost ${token} ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6017} OrganizationName \ is Empty
- Should Be True ${flag}
- Exception_002_添加组织,OrganizationName重名校验
- [Template]
- #随机生成组织名
- ${oranName} Random Characters
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #添加组织
- ${res} AddOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- #搜索组织,返回OrganizationCode
- ${organizationCode} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName} ${organizationInfo_mao}[0] ${organizationType}[1]
- #添加重名组织
- ${res} AddOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6056} OrganizationName Duplicate
- Should Be True ${flag}
- #删除组织
- ${response} RemoveOrganizationsAsyncPost ${token} ${organizationCode}
- #删除组织校验
- ${flag} Result Analysis ${response} True ${EMPTY} ${EMPTY}
- Exception_003_添加组织,zh-CN语言编码下OrganizationName最大字符长度限制(20)
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #添加组织,OrganizationName传入空值
- ${res} AddOrganizationsAsyncPost ${token} 1234567890qazwsxedcrf ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6003} Name is too long less than 20
- Should Be True ${flag}
- Exception_004_添加组织,en-US语言编码下OrganizationName最大字符长度限制(50)
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #添加组织,OrganizationName传入空值
- ${res} AddOrganizationsAsyncPost ${token} 12345678901234567890qazwsxedcr1234567890qazwsxedcrf ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[1]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6003} Name is too long less than 50
- Should Be True ${flag}
- Exception_005_添加组织,PatientType特定值校验
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #添加组织,OrganizationName传入空值
- ${res} AddOrganizationsAsyncPost ${token} zzaaqq ${EMPTY} ${EMPTY} 99 ${languageCode}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${4041} PatientType code error
- Should Be True ${flag}
- Exception_006_添加组织,Token非空校验
- [Template]
- #添加组织,Token传入空值
- ${res} AddOrganizationsAsyncPost ${EMPTY} 测试测试呀 ${EMPTY} ${EMPTY} 99 ${languageCode}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${1} Permission validation error
- Should Be True ${flag}
- Exception_007_添加组织,Token正确性校验
- [Template]
- #添加组织,Token传入不正确的值
- ${res} AddOrganizationsAsyncPost 11111111 测试测试呀 ${EMPTY} ${EMPTY} 99 ${languageCode}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${1} Permission validation error
- Should Be True ${flag}
- *** Keywords ***
|