diff --git a/httprunner.rar b/httprunner.rar new file mode 100644 index 0000000..cfaefd8 Binary files /dev/null and b/httprunner.rar differ diff --git a/zhitongbao/.gitignore b/zhitongbao/.gitignore new file mode 100644 index 0000000..4f5491e --- /dev/null +++ b/zhitongbao/.gitignore @@ -0,0 +1,6 @@ +.env +reports/* +__pycache__/* +*.pyc +.python-version +logs/* \ No newline at end of file diff --git a/zhitongbao/api/A_list_of_the_query.yml b/zhitongbao/api/A_list_of_the_query.yml new file mode 100644 index 0000000..fe8fe01 --- /dev/null +++ b/zhitongbao/api/A_list_of_the_query.yml @@ -0,0 +1,26 @@ + +name: 列表查询 +variables: + token: ${ENV(TOKEN)} + bizOwnerName: + millSupplierName: + paperMillName: + status: + userName: +base_url: ${ENV(URL)} + +request: + url: /recycle-service/admin/operation/get/paper-mill-order-receipt-audit + method: GET + headers: + Content-Type: "application/json" + X-APP-ID: "470236309865238555" + Access-Token: $token + params: + paperMillName: $paperMillName + bizOwnerName: $bizOwnerName + millSupplierName: $millSupplierName + status: $status + userName: $userName +validate: + - eq: ["status_code", 200] diff --git a/zhitongbao/api/ldap_Employee_details.yml b/zhitongbao/api/ldap_Employee_details.yml new file mode 100644 index 0000000..a5b6519 --- /dev/null +++ b/zhitongbao/api/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/ldap_Employees_list.yml b/zhitongbao/api/ldap_Employees_list.yml new file mode 100644 index 0000000..9a057ee --- /dev/null +++ b/zhitongbao/api/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/ldap_Employees_update.yml b/zhitongbao/api/ldap_Employees_update.yml new file mode 100644 index 0000000..0511b1f --- /dev/null +++ b/zhitongbao/api/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/ldap_Menu_add.yml b/zhitongbao/api/ldap_Menu_add.yml new file mode 100644 index 0000000..1848a5c --- /dev/null +++ b/zhitongbao/api/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/ldap_Menu_delete.yml b/zhitongbao/api/ldap_Menu_delete.yml new file mode 100644 index 0000000..789bdbc --- /dev/null +++ b/zhitongbao/api/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/ldap_Menu_list.yml b/zhitongbao/api/ldap_Menu_list.yml new file mode 100644 index 0000000..0d181a4 --- /dev/null +++ b/zhitongbao/api/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/ldap_Menu_update.yml b/zhitongbao/api/ldap_Menu_update.yml new file mode 100644 index 0000000..74875b9 --- /dev/null +++ b/zhitongbao/api/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/ldap_department_list.yml b/zhitongbao/api/ldap_department_list.yml new file mode 100644 index 0000000..f98ec6c --- /dev/null +++ b/zhitongbao/api/ldap_department_list.yml @@ -0,0 +1,11 @@ +name: 部门列表 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/department/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/ldap_login.yml b/zhitongbao/api/ldap_login.yml new file mode 100644 index 0000000..06f4516 --- /dev/null +++ b/zhitongbao/api/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/ldap_logout.yml b/zhitongbao/api/ldap_logout.yml new file mode 100644 index 0000000..3530cf4 --- /dev/null +++ b/zhitongbao/api/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/ldap_roleMenu_list.yml b/zhitongbao/api/ldap_roleMenu_list.yml new file mode 100644 index 0000000..14db219 --- /dev/null +++ b/zhitongbao/api/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/ldap_role_add.yml b/zhitongbao/api/ldap_role_add.yml new file mode 100644 index 0000000..88531ac --- /dev/null +++ b/zhitongbao/api/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/ldap_role_list.yml b/zhitongbao/api/ldap_role_list.yml new file mode 100644 index 0000000..b17ed56 --- /dev/null +++ b/zhitongbao/api/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/ldap_role_mass_update.yml b/zhitongbao/api/ldap_role_mass_update.yml new file mode 100644 index 0000000..fc4fa9c --- /dev/null +++ b/zhitongbao/api/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/ldap_role_update.yml b/zhitongbao/api/ldap_role_update.yml new file mode 100644 index 0000000..059f10f --- /dev/null +++ b/zhitongbao/api/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/api/login.yml b/zhitongbao/api/login.yml new file mode 100644 index 0000000..0450ee7 --- /dev/null +++ b/zhitongbao/api/login.yml @@ -0,0 +1,15 @@ + +name: 登录 +base_url: ${ENV(AURL)} +request: + url: /login/admin/adminLogin + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" +# X-APP-ID: "470236309865238555" + json: + phone: 13060994305 + password: 9602BF7A8C5FEAB91385D1BB9EA70DF0 + rememberMe: "null" +validate: + - eq: ["status_code", 200] diff --git a/zhitongbao/debugtalk.py b/zhitongbao/debugtalk.py new file mode 100644 index 0000000..9baac52 --- /dev/null +++ b/zhitongbao/debugtalk.py @@ -0,0 +1,5 @@ + +import time + +def sleep(n_secs): + time.sleep(n_secs) diff --git a/zhitongbao/testcases/demo_testcase.yml b/zhitongbao/testcases/demo_testcase.yml new file mode 100644 index 0000000..2ea22d9 --- /dev/null +++ b/zhitongbao/testcases/demo_testcase.yml @@ -0,0 +1,13 @@ +config: + name: +teststeps: +- + name: 登录获取token + api: api/login.yml + extract: + - token: content.data.token +- + name: $test + api: api/A_list_of_the_query.yml + variables: + token: $token diff --git a/zhitongbao/testcases/ldap_Menu.yml b/zhitongbao/testcases/ldap_Menu.yml new file mode 100644 index 0000000..2074af3 --- /dev/null +++ b/zhitongbao/testcases/ldap_Menu.yml @@ -0,0 +1,33 @@ +config: + name: + +teststeps: +- + name: token传给菜单新增 + api: api/ldap_login.yml + extract: + - token: headers.Authorization +- + name: 菜单新增 + api: api/ldap_Menu_add.yml + variables: + token: $token + extract: + - id: content.data +- + name: 菜单查询 + api: api/ldap_Menu_list.yml + variables: + token: $token +- + name: 修改菜单 + api: api/ldap_Menu_update.yml + variables: + token: $token + id: $id +- + name: 修改菜单 + api: api/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 new file mode 100644 index 0000000..937bc54 --- /dev/null +++ b/zhitongbao/testcases/ldap_token.yml @@ -0,0 +1,14 @@ +config: + name: + +teststeps: +- + name: token传给员工列表 + api: api/ldap_login.yml + extract: + - token: headers.Authorization +- + name: 列表查询传token + api: api/ldap_Employees_list.yml + variables: + token: $token \ No newline at end of file diff --git a/zhitongbao/testsuites/demo_testsuite.yml b/zhitongbao/testsuites/demo_testsuite.yml new file mode 100644 index 0000000..88ab7a3 --- /dev/null +++ b/zhitongbao/testsuites/demo_testsuite.yml @@ -0,0 +1,21 @@ + +testcases: +- + name: 运营列表查询套件 + testcase: testcases/demo_testcase.yml + parameters: + - test-paperMillName-bizOwnerName-millSupplierName-status-userName: +# paperMillName:配送纸厂 +# bizOwnerName:预约归属人 +# millSupplierName:纸厂供应商名称 +# status:订单状态 +# userName:用户名称 + - ["运营列表查询:配送纸厂","","","HUAWEI","",""] + - ["运营列表查询:订单状态查询","","","","50",""] + - ["运营列表查询:预约归属人","","admin","","",""] + - ["运营列表查询:用户名称","","","","","张山"] +#- +# name: call demo_testcase with data 2 +# testcase: path/to/demo_testcase.yml +# variables: +# device_sn: $device_sn