*** Settings *** Library urllib3 Library Collections Library RequestsLibrary Library DatabaseLibrary *** Test Cases *** spu #尺寸换算 #获取盒型大类 Create Session factory ${yytClient} ${ClientHeader} ${reps} GET On Session factory printing-packaging-factory-service/user/page/spu-category-by params=enable=true&parentId=1&existFormula=true ${records} Get From Dictionary ${reps.json()['data']} records #盒型大类列表 ${Json} Evaluate random.choice(${records}) random #获取随机盒型 ${SpuCategoryId} Get From Dictionary ${Json} id #盒型大类id ${SpuCategoryName} Get From Dictionary ${Json} name #盒型大类名称 #获取盒型分类数据 ${reps} GET On Session factory printing-packaging-factory-service/user/page/spu-category-by params=enable=true&parentId=${SpuCategoryId}&level=3&existFormula=true ${records} Get From Dictionary ${reps.json()['data']} records #获取盒型分类列表 FOR ${items} IN @{records} ${id} Get From Dictionary ${items} id #盒型分类id ${name} Get From Dictionary ${items} name #盒型分类name Exit For Loop If '${name}'=='双插盒' END #盒型分类详情 ${reps} GET On Session \ printing-packaging-factory-service/user/get/spu-category-unfolding-size-calculation-detail/796099526745264128