*** Settings *** Documentation 客户端-添加职称 Resource ../../../CommonConfig/Config.robot Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddRanksAsync.robot Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetAllRanksAsync.robot Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveRanksAsync.robot *** Variables *** *** Test Cases *** Class_001_添加职称信息 #随机生成职称名 ${raName} Random Characters #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #添加职称信息 ${res} AddRanksAsyncPost ${token} ${raName} ${organizationInfo_mao}[0] ${EMPTY} Log ${res} #添加职称成功校验 ${flag1} Result Analysis ${res} True ${EMPTY} ${EMPTY} Should Be True ${flag1} #获取新添加职称信息记录的RankCode ${rankCode} GetAllRanksAsyncPost_RankCode ${token} ${EMPTY} ${organizationInfo_mao}[0] #删除职称 ${response} RemoveRanksAsyncPost ${token} ${rankCode} #删除组织校验 ${flag2} Result Analysis ${response} True ${EMPTY} ${EMPTY} Should Be True ${flag2} Exception_001_添加职称信息,Token非空校验 #添加职称信息,Token传入空值 ${res} AddRanksAsyncPost ${EMPTY} ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY} Log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${1} Permission validation error Should Be True ${flag} Exception_002_添加职称信息,Token正确性校验 #添加职称信息,Token传入空值 ${res} AddRanksAsyncPost 1111111 ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY} Log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${1} Permission validation error Should Be True ${flag} Exception_003_添加职称信息,RankName非空校验 #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #添加职称信息 ${res} AddRanksAsyncPost ${token} ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY} Log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${6023} RankName is Empty Should Be True ${flag} Exception_004_添加职称信息,RankName重名校验 [Tags] inexecution #随机生成职称名 ${raName} Random Characters #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #添加职称信息 ${res} AddRanksAsyncPost ${token} ${raName} ${organizationInfo_mao}[0] ${EMPTY} Log ${res} #添加职称成功校验 ${flag1} Result Analysis ${res} True ${EMPTY} ${EMPTY} Should Be True ${flag1} #获取新添加职称信息记录的RankCode ${rankCode} GetAllRanksAsyncPost_RankCodeLi ${token} ${EMPTY} ${organizationInfo_mao}[0] #添加同名职称信息 ${res1} AddRanksAsyncPost ${token} ${raName} ${organizationInfo_mao}[0] ${EMPTY} Log ${res1} #返回error信息校验 ${flag2} Result Analysis ${res1} false ${6055} RankName Duplicate Should Be True ${flag2} #删除职称 ${response} RemoveRanksAsyncPost ${token} ${rankCode} #删除组织校验 ${flag3} Result Analysis ${response} True ${EMPTY} ${EMPTY} Should Be True ${flag3} Exception_005_添加职称信息,RankName最大字符长度校验 [Tags] inexecution Exception_006_添加职称信息,OrganizationCode非空校验 [Tags] inexecution #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #添加职称信息 ${res} AddRanksAsyncPost ${token} 111111 ${EMPTY} ${EMPTY} Log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${6023} OrganizationCode is Empty Should Be True ${flag} Exception_007_添加职称信息,OrganizationCode正确性校验 [Tags] inexecution #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #添加职称信息 ${res} AddRanksAsyncPost ${token} 111111 111111 ${EMPTY} Log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${6023} ?????? Should Be True ${flag} *** Keywords ***