*** Settings *** Documentation 客户端-获取职称信息 Suite Setup Test Setup 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 Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetRankByCodeAsync.robot *** Variables *** *** Test Cases *** Class_001_获取职称信息 [Template] #随机生成职称名 ${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] #获取职称信息 ${res1} GetRankByCodeAsyncPost ${token} ${rankCode} ${content1} Get From Dictionary ${res1} content ${rankName} Get From Dictionary ${content1} RankName Should Be Equal As Strings ${rankName} ${raName} #删除职称 ${response} RemoveRanksAsyncPost ${token} ${rankCode} #删除组织校验 ${flag2} Result Analysis ${response} True ${EMPTY} ${EMPTY} Should Be True ${flag2} Exception_001_获取职称信息,Token非空校验 [Template] #获取职称信息 ${res} GetRankByCodeAsyncPost ${EMPTY} 111111 Log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${1} Permission validation error Should Be True ${flag} Exception_002_获取职称信息,Token正确性校验 [Template] #获取职称信息 ${res} GetRankByCodeAsyncPost 111111 111111 Log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${1} Permission validation error Should Be True ${flag} Exception_003_获取职称信息,RankCode不存在 [Template] #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #获取职称信息 ${res} GetRankByCodeAsyncPost ${token} 111111 Log ${res} #校验返回,result返回null ${content} Get From Dictionary ${res} content Should Be Empty ${content} Exception_004_获取职称信息,RankCode非空校验 [Template] #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #获取职称信息 ${res} GetRankByCodeAsyncPost ${token} ${EMPTY} Log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${9} Code can't be null Should Be True ${flag} *** Keywords ***