diff --git a/httprunner.rar b/httprunner.rar index cfaefd8..e56de41 100644 Binary files a/httprunner.rar and b/httprunner.rar differ diff --git a/zhitongbao/200 b/zhitongbao/200 new file mode 100644 index 0000000..e69de29 diff --git a/zhitongbao/api/Employees/ldap_Employee_details.yml b/zhitongbao/api/Employees/ldap_Employee_details.yml new file mode 100644 index 0000000..a5b6519 --- /dev/null +++ b/zhitongbao/api/Employees/ldap_Employee_details.yml @@ -0,0 +1,16 @@ +name: 员工详情 +base_url: ${ENV(BURL)} +variables: + token: ${ENV(LDAPTOKEN)} +request: + url: /recycle-service/admin/employee/get/detail/498985728471076864 + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "470236309865238555" + Authorization: $token +# 498985728471076864/原纸事业部/时亚龙 +# json: + +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/Employees/ldap_Employees_list.yml b/zhitongbao/api/Employees/ldap_Employees_list.yml new file mode 100644 index 0000000..9a057ee --- /dev/null +++ b/zhitongbao/api/Employees/ldap_Employees_list.yml @@ -0,0 +1,15 @@ +name: 员工列表 +base_url: ${ENV(BURL)} +variables: + token: ${ENV(LDAPTOKEN)} +request: + url: /recycle-service/admin/employee/get/list + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "470236309865238555" + Authorization: $token +# json: + +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/Employees/ldap_Employees_update.yml b/zhitongbao/api/Employees/ldap_Employees_update.yml new file mode 100644 index 0000000..0511b1f --- /dev/null +++ b/zhitongbao/api/Employees/ldap_Employees_update.yml @@ -0,0 +1,15 @@ +name: 修改员工角色 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/employee/update/positions + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} + json: + adminId: 498985713002483712 + positionIdList: ["500764395257860096"] +#角色id 测试人员;员工id 夏华成 +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/Menu/ldap_Menu_add.yml b/zhitongbao/api/Menu/ldap_Menu_add.yml new file mode 100644 index 0000000..1848a5c --- /dev/null +++ b/zhitongbao/api/Menu/ldap_Menu_add.yml @@ -0,0 +1,15 @@ +name: 新增菜单 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/menu/add + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} + json: + menuCode: "1010001" + name: "员工管理" + parentId: 0 +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/Menu/ldap_Menu_delete.yml b/zhitongbao/api/Menu/ldap_Menu_delete.yml new file mode 100644 index 0000000..789bdbc --- /dev/null +++ b/zhitongbao/api/Menu/ldap_Menu_delete.yml @@ -0,0 +1,13 @@ +name: 删除菜单 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/menu/delete-batch + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} + json: + idList: [$id] +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/Menu/ldap_Menu_list.yml b/zhitongbao/api/Menu/ldap_Menu_list.yml new file mode 100644 index 0000000..0d181a4 --- /dev/null +++ b/zhitongbao/api/Menu/ldap_Menu_list.yml @@ -0,0 +1,11 @@ +name: 菜单列表 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/menu/get/list + method: GET + headers: + Content-Type: application/json + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} +validate: + - eq: ["status_code", 200] diff --git a/zhitongbao/api/Menu/ldap_Menu_update.yml b/zhitongbao/api/Menu/ldap_Menu_update.yml new file mode 100644 index 0000000..74875b9 --- /dev/null +++ b/zhitongbao/api/Menu/ldap_Menu_update.yml @@ -0,0 +1,16 @@ +name: 编辑菜单 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/menu/update + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} + json: + id: $id + menuCode: "1010001" + name: "企业管理" + parentId: 0 +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/login/app_login.yml b/zhitongbao/api/login/app_login.yml new file mode 100644 index 0000000..ad229e1 --- /dev/null +++ b/zhitongbao/api/login/app_login.yml @@ -0,0 +1,19 @@ +name: app账号密码登录 +variables: + account: 13288889434 + accountType: MOBILE + password: 9602bf7a8c5feab91385d1bb9ea70df0 +base_url: ${ENV(URL)} +request: + url: /recycle-service/authorize/by-password + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + json: + account: $account + accountType: $accountType + password: $password +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "contains", "expect": "successful"} \ No newline at end of file diff --git a/zhitongbao/api/login/ldap_login.yml b/zhitongbao/api/login/ldap_login.yml new file mode 100644 index 0000000..06f4516 --- /dev/null +++ b/zhitongbao/api/login/ldap_login.yml @@ -0,0 +1,14 @@ +name: ldap登录 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/login + method: POST + headers: + Content-Type: application/x-www-form-urlencoded + X-APP-ID: "470236309865238555" + data: + username: zhangshan@qniao.cn + password: qn123456 +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "eq", "expect": "登陆成功"} diff --git a/zhitongbao/api/login/ldap_logout.yml b/zhitongbao/api/login/ldap_logout.yml new file mode 100644 index 0000000..3530cf4 --- /dev/null +++ b/zhitongbao/api/login/ldap_logout.yml @@ -0,0 +1,13 @@ +name: ldap退出登录 +base_url: ${ENV(BURL)} +variables: + token: ${ENV(LDAPTOKEN)} +request: + url: /recycle-service/admin/logout + method: POST + headers: + Content-Type: application/x-www-form-urlencoded + X-APP-ID: "470236309865238555" + Authorization: $token +validate: + - eq: ["status_code", 200] diff --git a/zhitongbao/api/notification.yml b/zhitongbao/api/notification.yml new file mode 100644 index 0000000..11592d8 --- /dev/null +++ b/zhitongbao/api/notification.yml @@ -0,0 +1,11 @@ +name: 账期过期钉钉提醒相关人员 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/proxy-sell/test/schedule + method: GET + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/product/product_add.yml b/zhitongbao/api/product/product_add.yml new file mode 100644 index 0000000..7be8ffb --- /dev/null +++ b/zhitongbao/api/product/product_add.yml @@ -0,0 +1,28 @@ +name: 创建采购商品 +variables: + description: 采购商品描述哈哈哈 + firstCategoryId: 12 + imgList: + locDistrictId: 440106 + num: 100 + secondCategoryId: 1 + unitPrice: 1000 +base_url: ${ENV(URL)} + +request: + url: /recycle-service/purchase/create/product + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "38555" + Authorization: QNT ${ENV(APPTOKEN)} + json: + description: $description + firstCategoryId: $firstCategoryId + imgList: $imgList + locDistrictId: $locDistrictId + num: $num + secondCategoryId: $secondCategoryId + unitPrice: $unitPrice +validate: + - eq: ["status_code", 200] diff --git a/zhitongbao/api/product/product_delete.yml b/zhitongbao/api/product/product_delete.yml new file mode 100644 index 0000000..98d9435 --- /dev/null +++ b/zhitongbao/api/product/product_delete.yml @@ -0,0 +1,13 @@ +name: 删除采购商品接口 +base_url: ${ENV(URL)} +request: + url: /recycle-service/purchase/delete/product + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "38555" + Authorization: QNT ${ENV(APPTOKEN)} + json: + productId: $productId +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/product/product_list.yml b/zhitongbao/api/product/product_list.yml new file mode 100644 index 0000000..d32b448 --- /dev/null +++ b/zhitongbao/api/product/product_list.yml @@ -0,0 +1,11 @@ +name: 获取采购商品列表接口 +base_url: ${ENV(URL)} +request: + url: /recycle-service/purchase/get/product-list + method: GET + headers: + Content-Type: "application/json" + X-APP-ID: "38555" + Authorization: QNT ${ENV(APPTOKEN)} +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/product/product_list_b.yml b/zhitongbao/api/product/product_list_b.yml new file mode 100644 index 0000000..7ec79f5 --- /dev/null +++ b/zhitongbao/api/product/product_list_b.yml @@ -0,0 +1,11 @@ +name: 查看采购商品详情接口 +base_url: ${ENV(URL)} +request: + url: /recycle-service/purchase/get/product/$productId + method: GET + headers: + Content-Type: "application/json" + X-APP-ID: "38555" + Authorization: QNT ${ENV(APPTOKEN)} +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/product/product_update.yml b/zhitongbao/api/product/product_update.yml new file mode 100644 index 0000000..4cf6733 --- /dev/null +++ b/zhitongbao/api/product/product_update.yml @@ -0,0 +1,32 @@ +name: 更新采购商品接口 +base_url: ${ENV(URL)} +request: + url: /recycle-service/purchase/update/product + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "38555" + Authorization: QNT ${ENV(APPTOKEN)} + json: + coverImgUrl: +# 封面 + description: 修改商品测试商品描述 +# 采购商品描述 + firstCategoryId: 12 +# 一级品类唯一标识 + imgList: +# 图片地址 + locDistrictId: 440106 +# 区id + lowestNum: +# + productId: $productId +# 商品id + num: 1000 +# 采购数量 + secondCategoryId: 2 +# 二级品类唯一标识 + unitPrice: 1500 +# 单价 +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/product/product_update_status.yml b/zhitongbao/api/product/product_update_status.yml new file mode 100644 index 0000000..0238e24 --- /dev/null +++ b/zhitongbao/api/product/product_update_status.yml @@ -0,0 +1,16 @@ +name: 上架下架采购商品接口 +base_url: ${ENV(URL)} +request: + url: /recycle-service/purchase/update/product-status + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "38555" + Authorization: QNT ${ENV(APPTOKEN)} + json: + productId: $productId +# 商品id + status: 2 +# 1上架2下架 +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/role/ldap_roleMenu_list.yml b/zhitongbao/api/role/ldap_roleMenu_list.yml new file mode 100644 index 0000000..14db219 --- /dev/null +++ b/zhitongbao/api/role/ldap_roleMenu_list.yml @@ -0,0 +1,11 @@ +name: 角色绑定菜单列表 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/position/get/menus/by/500764395257860096 + method: GET + headers: + Content-Type: application/json + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/role/ldap_role_add.yml b/zhitongbao/api/role/ldap_role_add.yml new file mode 100644 index 0000000..88531ac --- /dev/null +++ b/zhitongbao/api/role/ldap_role_add.yml @@ -0,0 +1,14 @@ +name: 角色菜单 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/position/add + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} + json: + menuIdList: ["1"] + name: "test" +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/role/ldap_role_list.yml b/zhitongbao/api/role/ldap_role_list.yml new file mode 100644 index 0000000..b17ed56 --- /dev/null +++ b/zhitongbao/api/role/ldap_role_list.yml @@ -0,0 +1,11 @@ +name: 角色列表 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/position/get/list + method: GET + headers: + Content-Type: application/json + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/role/ldap_role_mass_update.yml b/zhitongbao/api/role/ldap_role_mass_update.yml new file mode 100644 index 0000000..fc4fa9c --- /dev/null +++ b/zhitongbao/api/role/ldap_role_mass_update.yml @@ -0,0 +1,14 @@ +name: 修改状态/批量修改状态 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/position/update-status-batch + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} + json: + idList: ["500764395257860096"] + status: 0 +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/api/role/ldap_role_update.yml b/zhitongbao/api/role/ldap_role_update.yml new file mode 100644 index 0000000..059f10f --- /dev/null +++ b/zhitongbao/api/role/ldap_role_update.yml @@ -0,0 +1,15 @@ +name: 编辑角色 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/position/update + method: POST + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Authorization: ${ENV(LDAPTOKEN)} + json: + id: 500764395257860096 + menuIdList: ["1"] + name: 测试角色 +validate: + - eq: ["status_code", 200] \ No newline at end of file diff --git a/zhitongbao/pass b/zhitongbao/pass new file mode 100644 index 0000000..e69de29 diff --git a/zhitongbao/testcases/demo_testcase.yml b/zhitongbao/testcases/demo_testcase.yml index 2ea22d9..19fd6e0 100644 --- a/zhitongbao/testcases/demo_testcase.yml +++ b/zhitongbao/testcases/demo_testcase.yml @@ -1,4 +1,4 @@ -config: + config: name: teststeps: - diff --git a/zhitongbao/testcases/ldap_Menu.yml b/zhitongbao/testcases/ldap_Menu.yml index 2074af3..7b5464c 100644 --- a/zhitongbao/testcases/ldap_Menu.yml +++ b/zhitongbao/testcases/ldap_Menu.yml @@ -4,30 +4,30 @@ config: teststeps: - name: token传给菜单新增 - api: api/ldap_login.yml + api: api/login/ldap_login.yml extract: - token: headers.Authorization - name: 菜单新增 - api: api/ldap_Menu_add.yml + api: api/Menu/ldap_Menu_add.yml variables: token: $token extract: - id: content.data - name: 菜单查询 - api: api/ldap_Menu_list.yml + api: api/Menu/ldap_Menu_list.yml variables: token: $token - name: 修改菜单 - api: api/ldap_Menu_update.yml + api: api/Menu/ldap_Menu_update.yml variables: token: $token id: $id - - name: 修改菜单 - api: api/ldap_Menu_delete.yml + name: 删除菜单 + api: api/Menu/ldap_Menu_delete.yml variables: token: $token id: $id \ No newline at end of file diff --git a/zhitongbao/testcases/ldap_token.yml b/zhitongbao/testcases/ldap_token.yml index 937bc54..3484337 100644 --- a/zhitongbao/testcases/ldap_token.yml +++ b/zhitongbao/testcases/ldap_token.yml @@ -4,11 +4,11 @@ config: teststeps: - name: token传给员工列表 - api: api/ldap_login.yml + api: api/login/ldap_login.yml extract: - token: headers.Authorization - name: 列表查询传token - api: api/ldap_Employees_list.yml + api: api/Employees/ldap_Employees_list.yml variables: token: $token \ No newline at end of file diff --git a/zhitongbao/testcases/product.yml b/zhitongbao/testcases/product.yml new file mode 100644 index 0000000..fb71b26 --- /dev/null +++ b/zhitongbao/testcases/product.yml @@ -0,0 +1,45 @@ +config: + name: + +teststeps: +- + name: token新增采购商品 + api: api/login/app_login.yml + extract: + - token: content.data.token +- + name: 新增采购商品 + api: api/product/product_add.yml + variables: + token: $token + extract: + - productId: content.data.productId +- + name: 获取采购商品列表接口 + api: api/product/product_list.yml + variables: + token: $token +- + name: 查看采购商品详情接口 + api: api/product/product_list_b.yml + variables: + token: $token + productId: $productId +- + name: 上架下架采购商品接口 + api: api/product/product_update_status.yml + variables: + token: $token + productId: $productId +- + name: 更新采购商品接口 + api: api/product/product_update.yml + variables: + token: $token + productId: $productId +- + name: 删除采购商品接口 + api: api/product/product_delete.yml + variables: + token: $token + productId: $productId \ No newline at end of file diff --git a/zhitongbao/testcases/product_add.yml b/zhitongbao/testcases/product_add.yml new file mode 100644 index 0000000..9a351ac --- /dev/null +++ b/zhitongbao/testcases/product_add.yml @@ -0,0 +1,14 @@ +config: + name: + +teststeps: +- + name: token新增采购商品 + api: api/login/app_login.yml + extract: + - token: content.data.token +- + name: $productadd + api: api/product/product_add.yml + variables: + token: $token \ No newline at end of file diff --git a/zhitongbao/testsuites/product/product_add.yml b/zhitongbao/testsuites/product/product_add.yml new file mode 100644 index 0000000..ad236c1 --- /dev/null +++ b/zhitongbao/testsuites/product/product_add.yml @@ -0,0 +1,15 @@ +testcases: +- + name: 发布采购产品 + testcase: testcases/product_add.yml + parameters: + - productadd-description-firstCategoryId-imgList-locDistrictId-num-secondCategoryId-unitPrice: +#description: 采购商品描述 +#firstCategoryId: 一级品类唯一标识 +#imgList: 图片地址 +#locDistrictId: 区id +#num: 采购数量 +#secondCategoryId: 二级品类唯一标识 +#unitPrice: 单价 + - ["新增采购商品:商品描述必填校验","","12","","440106","10","2","1000"] + - ["新增采购商品:纸品品类必填校验","统货书纸可以有胶头","12","","440106","10","2","1000"] \ No newline at end of file