Просмотр исходного кода

ModifyDeviceAsync接口用例修改

jo 1 год назад
Родитель
Сommit
86b77ee191

+ 2 - 1
AllApi/ClientAPI/DeviceInformationApi/ModifyDeviceAsync.robot

@@ -9,7 +9,7 @@ ${modifyDeviceAsyncUrl}    IDeviceService
 
 *** Keywords ***
 ModifyDeviceAsyncPost
-    [Arguments]    ${token}    ${deviceCode}    ${name}    ${headPicUrl}    ${departmentCode}    ${isAutoShared}
+    [Arguments]    ${token}    ${deviceCode}    ${name}    ${headPicUrl}    ${departmentCode}    ${isAutoShared}    ${description}
     ${param}    Create Dictionary
     Set To Dictionary    ${param}    Token    ${token}
     Set To Dictionary    ${param}    DeviceCode    ${deviceCode}
@@ -18,6 +18,7 @@ ModifyDeviceAsyncPost
     Set To Dictionary    ${param}    DepartmentCode    ${departmentCode}
     ${isAutoShared1}    Convert To Boolean    ${isAutoShared}
     Set To Dictionary    ${param}    IsAutoShared    ${isAutoShared1}
+    Set To Dictionary    ${param}    Description    ${description}
     ${body}    Generate Params    ModifyDeviceAsync    ${param}
     Log    ${body}
     Log    ---开始断言验证---

+ 13 - 13
AllSuite/ClientSuite/DeviceInformationSuite/ModifyDeviceAsync.robot

@@ -15,7 +15,7 @@ Resource          ../../../AllApi/ClientAPI/PersonalInformationApi/GetShareDevic
 Resource          ../../../AllApi/ClientAPI/DeviceInformationApi/DeleteShareDeviceToUserAsync.robot
 
 *** Test Cases ***
-Class_001_修改设备信息,修改Name
+Class_001_修改设备信息,修改Description
     #登录,获取用户Token
     ${token}    GetCommonLoginAsyncToken    ${user_mao}[0]    ${EMPTY}    ${user_mao}[1]    ${3}    ${0}
     #超声设备连接云服务,获取超声设备Token、UniqueCode
@@ -30,15 +30,15 @@ Class_001_修改设备信息,修改Name
     Should Be True    ${flag}
     #获取设备的DeviceCode
     ${deviceCode}    GetDeviceByTokenAsyncPost_DeviceCode    ${usToken}
-    #修改设备信息,修改Name
-    ${deviceName1}    Set Variable    sonotest
-    ${res2}    ModifyDeviceAsyncPost    ${token}    ${deviceCode}    ${deviceName1}    ${EMPTY}    ${EMPTY}    false
+    #修改设备信息,修改name
+    ${deviceDescription1}    Set Variable    sonotest
+    ${res2}    ModifyDeviceAsyncPost    ${token}    ${deviceCode}    ${deviceName}    ${EMPTY}    ${EMPTY}    false    ${deviceDescription1}
     #校验
     ${flag}    Result Analysis    ${res2}    True    ${EMPTY}    ${EMPTY}
     Should Be True    ${flag}
     ${res3}    GetDeviceInfoAsyncPost    ${token}    ${deviceCode}
-    ${name}    Get From Dictionary    ${res3}[content]    Name
-    Should Be Equal As Strings    ${name}    ${deviceName1}
+    ${desc}    Get From Dictionary    ${res3}[content]    Description
+    Should Be Equal As Strings    ${desc}    ${deviceDescription1}
     [Teardown]    RemoveDeviceRelevancyAsyncPost    ${token}    ${organizationCode}    ${EMPTY}    ${deviceCode}
 
 Class_002_修改设备信息,修改HeadPicUrl
@@ -57,7 +57,7 @@ Class_002_修改设备信息,修改HeadPicUrl
     #获取设备的DeviceCode
     ${deviceCode}    GetDeviceByTokenAsyncPost_DeviceCode    ${usToken}
     #修改设备信息,修改HeadPicUrl
-    ${res2}    ModifyDeviceAsyncPost    ${token}    ${deviceCode}    ${deviceName}    ${image}[0]    ${EMPTY}    false
+    ${res2}    ModifyDeviceAsyncPost    ${token}    ${deviceCode}    ${deviceName}    ${image}[0]    ${EMPTY}    false    descr
     #校验
     ${flag}    Result Analysis    ${res2}    True    ${EMPTY}    ${EMPTY}
     Should Be True    ${flag}
@@ -99,7 +99,7 @@ Class_003_修改设备信息,修改DepartmentCode
     #搜索组织,返回OrganizationCode
     ${depCode}    SearchOrganizationsAsyncOrganizationCode    ${token}    ${oranName}    ${organizationInfo_mao}[0]    ${organizationType}[1]
     #修改设备信息,修改DepartmentCode
-    ${res2}    ModifyDeviceAsyncPost    ${token}    ${deviceCode}    ${deviceName}    ${EMPTY}    ${depCode}    false
+    ${res2}    ModifyDeviceAsyncPost    ${token}    ${deviceCode}    ${deviceName}    ${EMPTY}    ${depCode}    false    descr
     #校验
     ${flag3}    Result Analysis    ${res2}    True    ${EMPTY}    ${EMPTY}
     Should Be True    ${flag3}
@@ -134,7 +134,7 @@ Class_004_修改设备信息,修改IsAutoShared
     #获取设备的DeviceCode
     ${deviceCode}    GetDeviceByTokenAsyncPost_DeviceCode    ${usToken}
     #修改设备信息,修改isAutoShared
-    ${res2}    ModifyDeviceAsyncPost    ${token}    ${deviceCode}    ${deviceName}    ${EMPTY}    ${EMPTY}    true
+    ${res2}    ModifyDeviceAsyncPost    ${token}    ${deviceCode}    ${deviceName}    ${EMPTY}    ${EMPTY}    true    descr
     #校验
     ${flag}    Result Analysis    ${res2}    True    ${EMPTY}    ${EMPTY}
     Should Be True    ${flag}
@@ -171,7 +171,7 @@ Exception_001_修改设备信息,Token值正确性校验
     #获取设备的DeviceCode
     ${deviceCode}    GetDeviceByTokenAsyncPost_DeviceCode    ${usToken}
     #修改设备信息,传入错误的Token值
-    ${res2}    ModifyDeviceAsyncPost    111111    ${deviceCode}    ${deviceName}    ${EMPTY}    ${EMPTY}    false
+    ${res2}    ModifyDeviceAsyncPost    111111    ${deviceCode}    ${deviceName}    ${EMPTY}    ${EMPTY}    false    descr
     #校验
     ${flag2}    Result Analysis Code    ${res2}    false    ${1}
     Should Be True    ${flag2}
@@ -193,7 +193,7 @@ Exception_002_修改设备信息,Token值非空校验
     #获取设备的DeviceCode
     ${deviceCode}    GetDeviceByTokenAsyncPost_DeviceCode    ${usToken}
     #修改设备信息,Token传入空值
-    ${res2}    ModifyDeviceAsyncPost    ${EMPTY}    ${deviceCode}    ${deviceName}    ${EMPTY}    ${EMPTY}    false
+    ${res2}    ModifyDeviceAsyncPost    ${EMPTY}    ${deviceCode}    ${deviceName}    ${EMPTY}    ${EMPTY}    false    descr
     #校验
     ${flag2}    Result Analysis Code    ${res2}    false    ${1}
     Should Be True    ${flag2}
@@ -215,7 +215,7 @@ Exception_003_修改设备信息,DeviceCode值正确性校验
     #获取设备的DeviceCode
     ${deviceCode}    GetDeviceByTokenAsyncPost_DeviceCode    ${usToken}
     #修改设备信息,传入不存在的DeviceCode值
-    ${res2}    ModifyDeviceAsyncPost    ${token}    11111    ${deviceName}    ${EMPTY}    ${EMPTY}    false
+    ${res2}    ModifyDeviceAsyncPost    ${token}    11111    ${deviceName}    ${EMPTY}    ${EMPTY}    false    descr
     #校验
     ${flag2}    Result Analysis Code    ${res2}    false    ${2015}
     Should Be True    ${flag2}
@@ -238,7 +238,7 @@ Exception_004_修改设备信息,DeviceCode值非空校验
     ${deviceCode}    GetDeviceByTokenAsyncPost_DeviceCode    ${usToken}
     #修改设备信息,DeviceCode传入空值
     ${deviceName1}    Set Variable    sonotest
-    ${res2}    ModifyDeviceAsyncPost    ${token}    ${EMPTY}    ${deviceName}    ${EMPTY}    ${EMPTY}    false
+    ${res2}    ModifyDeviceAsyncPost    ${token}    ${EMPTY}    ${deviceName}    ${EMPTY}    ${EMPTY}    false    descr
     #校验
     ${flag2}    Result Analysis Code    ${res2}    false    ${9}
     Should Be True    ${flag2}

+ 32 - 2
AllSuite/ClientSuite/InspectionRecordSuite/RelevanceRecordAsync.robot

@@ -61,8 +61,23 @@ Exception_002_关联检查,Token正确性校验
 Exception_003_关联检查,ExamCode非空校验
     #登录,获取用户Token
     ${token}    GetCommonLoginAsyncToken    ${user_mao}[0]    ${EMPTY}    ${user_mao}[1]    ${3}    ${0}
+    ${name}    Random Characters8
+    ${enName}    Encode Base64    ${name}
+    #创建病人
+    ${PatientDatas}    patient_body    ${enName}    ae==c0==c0==bu==au==ae==a0==c0==be==bK==aK==    ${EMPTY}    ${EMPTY}    ${EMPTY}    ${EMPTY}    ${EMPTY}    ${EMPTY}    Year    ${EMPTY}    ${EMPTY}    ${EMPTY}    ${EMPTY}
+    log    ${PatientDatas}
+    ${patientCode}    CreatePatientAsyncPost_PatientCode    ${token}    ${PatientDatas}    ${EMPTY}
+    #创建检查记录
+    ${patientInfoExtList}    Create Record    Routine    60    165    1.66    22.04
+    ${res_createRecord}    CreateRecordInfoAsyncPost    ${token}    ${patientCode}    ${deviceCode_jopc}    ${patientInfoExtList}
+    #分页查找检查列表
+    ${res_getRecord}    GetRecordInfoPagesAsyncPost    ${token}    1    60    ${patientCode}    0    0
+    #获取RecordCode
+    ${pageData_record}    Get From Dictionary    ${res_getRecord}[content]    PageData
+    ${firstRecord_dit}    Set Variable    ${pageData_record[0]}
+    ${recordCode}    Get From Dictionary    ${firstRecord_dit}    RecordCode
     #ExamCode值传入空值
-    ${res}    RelevanceRecordAsyncPost    ${token}    ${EMPTY}    EEBC927973F1449C8FAE0D8372236BDE
+    ${res}    RelevanceRecordAsyncPost    ${token}    ${EMPTY}    ${recordCode}
     #校验
     ${flag}    Result Analysis Code    ${res}    false    ${9}
     Should Be True    ${flag}
@@ -70,8 +85,23 @@ Exception_003_关联检查,ExamCode非空校验
 Exception_004_关联检查,ExamCode正确性校验
     #登录,获取用户Token
     ${token}    GetCommonLoginAsyncToken    ${user_mao}[0]    ${EMPTY}    ${user_mao}[1]    ${3}    ${0}
+    ${name}    Random Characters8
+    ${enName}    Encode Base64    ${name}
+    #创建病人
+    ${PatientDatas}    patient_body    ${enName}    ae==c0==c0==bu==au==ae==a0==c0==be==bK==aK==    ${EMPTY}    ${EMPTY}    ${EMPTY}    ${EMPTY}    ${EMPTY}    ${EMPTY}    Year    ${EMPTY}    ${EMPTY}    ${EMPTY}    ${EMPTY}
+    log    ${PatientDatas}
+    ${patientCode}    CreatePatientAsyncPost_PatientCode    ${token}    ${PatientDatas}    ${EMPTY}
+    #创建检查记录
+    ${patientInfoExtList}    Create Record    Routine    60    165    1.66    22.04
+    ${res_createRecord}    CreateRecordInfoAsyncPost    ${token}    ${patientCode}    ${deviceCode_jopc}    ${patientInfoExtList}
+    #分页查找检查列表
+    ${res_getRecord}    GetRecordInfoPagesAsyncPost    ${token}    1    60    ${patientCode}    0    0
+    #获取RecordCode
+    ${pageData_record}    Get From Dictionary    ${res_getRecord}[content]    PageData
+    ${firstRecord_dit}    Set Variable    ${pageData_record[0]}
+    ${recordCode}    Get From Dictionary    ${firstRecord_dit}    RecordCode
     #ExamCode值传入空值
-    ${res}    RelevanceRecordAsyncPost    ${token}    123456    EEBC927973F1449C8FAE0D8372236BDE
+    ${res}    RelevanceRecordAsyncPost    ${token}    123456    ${recordCode}
     #校验
     ${flag}    Result Analysis Code    ${res}    false    ${4015}
     Should Be True    ${flag}