diff --git a/httprunner/.env b/httprunner/.env new file mode 100644 index 0000000..9801053 --- /dev/null +++ b/httprunner/.env @@ -0,0 +1,6 @@ +AURL=https://api-test.qniao.cn +BURL=http://api-admin-test.qniao.cn +URL=http://api.bidding.test.qniao.cn +ATOKEN=QNT biCV33h3cL8Y7rWM52H05SJaKc/qPUpn8N7neYt9jXPMUMqQEpqjmbz7uWeigMI+ +LDAPTOKEN=Token ff213490f454502978d11d8d63a5eeae +TOKEN=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJhY2NvdW50Tm9uRXhwaXJlZFwiOnRydWUsXCJhY2NvdW50Tm9uTG9ja2VkXCI6dHJ1ZSxcImF1dGhvcml0aWVzXCI6W3tcImF1dGhvcml0eVwiOlwiUk9MRV9VU0VSXCJ9LHtcImF1dGhvcml0eVwiOlwiUk9MRV9BRE1JTlwifV0sXCJjb21wYW55SWRcIjowLFwiY3JlZGVudGlhbHNOb25FeHBpcmVkXCI6dHJ1ZSxcImVuYWJsZWRcIjp0cnVlLFwicGFzc3dvcmRcIjpcIlwiLFwicm9sZUlkXCI6MixcInJvbGVOYW1lc1wiOltcIlJPTEVfVVNFUlwiLFwiUk9MRV9BRE1JTlwiXSxcInVzZXJJZFwiOjEsXCJ1c2VybmFtZVwiOlwiYWRtaW5cIn0iLCJjcmVhdGVkIjoxNTk5NTMxOTcwMDUwLCJleHAiOjE2MDAxMzY3NzB9.EHVGqQQz2MiA-B_-Ok1cXF040qmVwzcF2kOxULV-c0TwxSaDFPel5VJvvpBXzPrU5pxWj95mDBu_-Gpf65mTkA diff --git a/httprunner/api/consignment_process/admin_operation_audit.yml b/httprunner/api/consignment_process/admin_operation_audit.yml new file mode 100644 index 0000000..798f454 --- /dev/null +++ b/httprunner/api/consignment_process/admin_operation_audit.yml @@ -0,0 +1,20 @@ +name: 运营审核 +variables: + token: ${ENV(LDAPTOKEN)} + auditRequestId: 501196221172551680 + # 1-通过 2-不通过 + isPass: 1 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/operation/operation/audit + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token + json: + auditRequestId: $auditRequestId + isPass: $isPass +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] diff --git a/httprunner/api/consignment_process/admin_operation_edit_paymentdate.yml b/httprunner/api/consignment_process/admin_operation_edit_paymentdate.yml new file mode 100644 index 0000000..d996460 --- /dev/null +++ b/httprunner/api/consignment_process/admin_operation_edit_paymentdate.yml @@ -0,0 +1,19 @@ +name: 运营填写纸厂支付日期接口 +variables: + token: ${ENV(LDAPTOKEN)} + auditRequestItemId: + paperMillPayAt: 2020-09-10 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/operation/edit/payment-date + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token + json: + auditRequestItemId: $auditRequestItemId + paperMillPayAt: $paperMillPayAt +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] diff --git a/httprunner/api/consignment_process/admin_operation_get_papermillorderreceiptaudit.yml b/httprunner/api/consignment_process/admin_operation_get_papermillorderreceiptaudit.yml new file mode 100644 index 0000000..b962168 --- /dev/null +++ b/httprunner/api/consignment_process/admin_operation_get_papermillorderreceiptaudit.yml @@ -0,0 +1,14 @@ +name: 运营获取审核列表 +variables: + token: ${ENV(LDAPTOKEN)} +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/operation/get/paper-mill-order-receipt-audit + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] diff --git a/httprunner/api/consignment_process/admin_paperMill_get_papermilldetails.yml b/httprunner/api/consignment_process/admin_paperMill_get_papermilldetails.yml new file mode 100644 index 0000000..a20b97e --- /dev/null +++ b/httprunner/api/consignment_process/admin_paperMill_get_papermilldetails.yml @@ -0,0 +1,16 @@ +name: 获取纸厂信息详情 +variables: + token: ${ENV(LDAPTOKEN)} + paperMillId: 498208038486937600 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/paperMill/get/paper-mill-details/$paperMillId + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token + +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] \ No newline at end of file diff --git a/httprunner/api/consignment_process/admin_proxysell_audit_weightnote.yml b/httprunner/api/consignment_process/admin_proxysell_audit_weightnote.yml new file mode 100644 index 0000000..4d122ae --- /dev/null +++ b/httprunner/api/consignment_process/admin_proxysell_audit_weightnote.yml @@ -0,0 +1,15 @@ +name: 销售提交榜单审核 +variables: + token: ${ENV(LDAPTOKEN)} + weightNoteId: +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/proxy-sell/audit/weightnote/$weightNoteId + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] diff --git a/httprunner/api/consignment_process/admin_proxysell_cancel_proxyorder.yml b/httprunner/api/consignment_process/admin_proxysell_cancel_proxyorder.yml new file mode 100644 index 0000000..0ecf956 --- /dev/null +++ b/httprunner/api/consignment_process/admin_proxysell_cancel_proxyorder.yml @@ -0,0 +1,17 @@ +name: 销售取消代卖订单 +variables: + token: ${ENV(ATOKEN)} + orderId: 501102486468300800 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/proxy-sell/cancel/proxy-order + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token + params: + orderId: $orderId +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] diff --git a/httprunner/api/consignment_process/admin_proxysell_get_proxyorder.yml b/httprunner/api/consignment_process/admin_proxysell_get_proxyorder.yml new file mode 100644 index 0000000..f828f10 --- /dev/null +++ b/httprunner/api/consignment_process/admin_proxysell_get_proxyorder.yml @@ -0,0 +1,15 @@ +name: 销售查看订单详情 +variables: + token: ${ENV(LDAPTOKEN)} + orderId: 498208038486937600 +base_url: ${ENV(BURL)} +request: + url: /recycle-service//admin/proxy-sell/get/proxy-order/$orderId + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "contains", "expect": "successful"} diff --git a/httprunner/api/consignment_process/admin_proxysell_save_weightnote.yml b/httprunner/api/consignment_process/admin_proxysell_save_weightnote.yml new file mode 100644 index 0000000..23ddba5 --- /dev/null +++ b/httprunner/api/consignment_process/admin_proxysell_save_weightnote.yml @@ -0,0 +1,36 @@ +name: 销售上传代卖磅单信息 +variables: + token: ${ENV(LDAPTOKEN)} + deductedPoint: 50 + deductedWeight: 100 + imageUrl: ["http://medou.oss-cn-shenzhen.aliyuncs.com/bird_user/20090917463455009.jpg"] + netWeight: 2000 + orderItemId: 501174556803862528 + settleDay: "2020-09-11" + settlePrice: 2499 + settleUtiPrice: 2500 + settleWeight: 1000 + unitSurcharge: 0.001 + weightDay: "2020-09-10" +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/proxy-sell/save/weightnote + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token + json: + deductedPoint: $deductedPoint + deductedWeight: $deductedWeight + imageUrl: $imageUrl + netWeight: $netWeight + orderItemId: $orderItemId + settleDay: $settleDay + settlePrice: $settlePrice + settleUtiPrice: $settleUtiPrice + settleWeight: $settleWeight + unitSurcharge: $unitSurcharge + weightDay: $weightDay +validate: + - eq: ["status_code", 200] diff --git a/httprunner/api/consignment_process/admin_proxysell_update_reservation.yml b/httprunner/api/consignment_process/admin_proxysell_update_reservation.yml new file mode 100644 index 0000000..28e7779 --- /dev/null +++ b/httprunner/api/consignment_process/admin_proxysell_update_reservation.yml @@ -0,0 +1,24 @@ +name: 销售上传代卖预约信息 +variables: + token: ${ENV(LDAPTOKEN)} + millDeliveryOrderId: "12345678910" + millSupplierId: 498227745344589800 + scrapeOrderId: 501102486468300800 + buyerReservationDate: "2020-09-10" + unitSurcharge: 0.01 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/proxy-sell/update/reservation + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token + json: + millDeliveryOrderId: $millDeliveryOrderId + millSupplierId: $millSupplierId + scrapeOrderId: $scrapeOrderId + buyerReservationDate: $buyerReservationDate + unitSurcharge: $unitSurcharge +validate: + - eq: ["status_code", 200] diff --git a/httprunner/api/consignment_process/app_get_papercategory.yml b/httprunner/api/consignment_process/app_get_papercategory.yml new file mode 100644 index 0000000..35d1ffe --- /dev/null +++ b/httprunner/api/consignment_process/app_get_papercategory.yml @@ -0,0 +1,17 @@ +name: 获取纸厂品类列表 +variables: + apptoken: ${ENV(ATOKEN)} + paperMillId: 498208038486937600 +base_url: ${ENV(AURL)} +request: + url: /recycle-service/get/paper-category + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken + json: + paperMillId: $paperMillId +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "contains", "expect": "successful"} diff --git a/httprunner/api/consignment_process/app_get_papermillpapercategorypricelist.yml b/httprunner/api/consignment_process/app_get_papermillpapercategorypricelist.yml new file mode 100644 index 0000000..e55b715 --- /dev/null +++ b/httprunner/api/consignment_process/app_get_papermillpapercategorypricelist.yml @@ -0,0 +1,14 @@ +name: 获取纸厂信息 +variables: + apptoken: ${ENV(ATOKEN)} +base_url: ${ENV(AURL)} +request: + url: /recycle-service/get/paper-mill-paper-category-price-list + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] diff --git a/httprunner/api/consignment_process/app_proxysell_cancel_order.yml b/httprunner/api/consignment_process/app_proxysell_cancel_order.yml new file mode 100644 index 0000000..74163dc --- /dev/null +++ b/httprunner/api/consignment_process/app_proxysell_cancel_order.yml @@ -0,0 +1,16 @@ +name: app用户取消代卖订单 +variables: + apptoken: ${ENV(ATOKEN)} + orderId: 501094564069773312 +base_url: ${ENV(AURL)} +request: + url: /recycle-service/proxy-sell/cancel/order/$orderId + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken + +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] diff --git a/httprunner/api/consignment_process/app_proxysell_cancel_reservation.yml b/httprunner/api/consignment_process/app_proxysell_cancel_reservation.yml new file mode 100644 index 0000000..7c45646 --- /dev/null +++ b/httprunner/api/consignment_process/app_proxysell_cancel_reservation.yml @@ -0,0 +1,16 @@ +name: app用户拒绝预约代卖订单 +variables: + apptoken: ${ENV(ATOKEN)} + orderId: 501102486468300800 +base_url: ${ENV(AURL)} +request: + url: /recycle-service/proxy-sell/cancel/reservation/$orderId + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken + +validate: + - eq: ["status_code", 200] + - eq: ["content.message", "successful"] diff --git a/httprunner/api/consignment_process/app_proxysell_create_order.yml b/httprunner/api/consignment_process/app_proxysell_create_order.yml new file mode 100644 index 0000000..d425021 --- /dev/null +++ b/httprunner/api/consignment_process/app_proxysell_create_order.yml @@ -0,0 +1,26 @@ +name: app用户创建代卖订单 +variables: + apptoken: ${ENV(ATOKEN)} + packageNum: 1 + plateNumber: 粤A123456 + deliveryTime: "2020-09-10 12:00:00" + paperCategoryId: 498475822026461184 + totalEstimatedWeight: 1000 +base_url: ${ENV(AURL)} +request: + url: /recycle-service/proxy-sell/create/order + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken + json: + carInfos: + - packageNum: $packageNum + - plateNumber: $plateNumber + deliveryTime: $deliveryTime + paperCategoryId: $paperCategoryId + totalEstimatedWeight: $totalEstimatedWeight +validate: + - eq: ["status_code", 200] + diff --git a/httprunner/api/customer_and_business_relations/admin_customerbizrelation_delete_relation.yml b/httprunner/api/customer_and_business_relations/admin_customerbizrelation_delete_relation.yml new file mode 100644 index 0000000..f88599c --- /dev/null +++ b/httprunner/api/customer_and_business_relations/admin_customerbizrelation_delete_relation.yml @@ -0,0 +1,15 @@ +name: 后台删除客户与业务人员关系 +variables: + token: ${ENV(LDAPTOKEN)} + id: 23 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/customerbizrelation/delete/relation/$id + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "contains", "expect": "successful"} diff --git a/httprunner/api/customer_and_business_relations/admin_customerbizrelation_get_relation.yml b/httprunner/api/customer_and_business_relations/admin_customerbizrelation_get_relation.yml new file mode 100644 index 0000000..c36e5ba --- /dev/null +++ b/httprunner/api/customer_and_business_relations/admin_customerbizrelation_get_relation.yml @@ -0,0 +1,15 @@ +name: 后台查询客户与业务人员关系 +variables: + token: ${ENV(LDAPTOKEN)} + id: 23 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/customerbizrelation/get/relation/$id + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "contains", "expect": "successful"} diff --git a/httprunner/api/customer_and_business_relations/admin_customerbizrelation_save_relation.yml b/httprunner/api/customer_and_business_relations/admin_customerbizrelation_save_relation.yml new file mode 100644 index 0000000..8ab2c74 --- /dev/null +++ b/httprunner/api/customer_and_business_relations/admin_customerbizrelation_save_relation.yml @@ -0,0 +1,23 @@ +name: 后台新增客户与业务人员关系 +variables: + token: ${ENV(LDAPTOKEN)} + bizUserId: "1" + bizUserName: "admin" + cusormerId: "496029457996451840" + customerName: "梁金满" +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/customerbizrelation/save/relation + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token + json: + bizUserId: $bizUserId + bizUserName: $bizUserName + cusormerId: $cusormerId + customerName: $customerName +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "contains", "expect": "successful"} diff --git a/httprunner/api/customer_and_business_relations/admin_customerbizrelation_update_relation.yml b/httprunner/api/customer_and_business_relations/admin_customerbizrelation_update_relation.yml new file mode 100644 index 0000000..475626b --- /dev/null +++ b/httprunner/api/customer_and_business_relations/admin_customerbizrelation_update_relation.yml @@ -0,0 +1,21 @@ +name: 后台修改客户与业务人员关系 +variables: + token: ${ENV(LDAPTOKEN)} + bizUserId1: 498985714734731264 + bizUserName1: "梁金满" + id: 1 +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/customerbizrelation/update/relation + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $token + json: + bizUserId: $bizUserId1 + bizUserName: $bizUserName1 + id: $id +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "contains", "expect": "successful"} diff --git a/httprunner/api/customer_and_business_relations/admin_employer_get_employerdetails.yml b/httprunner/api/customer_and_business_relations/admin_employer_get_employerdetails.yml new file mode 100644 index 0000000..db7ca00 --- /dev/null +++ b/httprunner/api/customer_and_business_relations/admin_employer_get_employerdetails.yml @@ -0,0 +1,14 @@ +name: 后台获取销售人员列表 +variables: + token: ${ENV(LDAPTOKEN)} +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/employer/get/employer-details + method: GET + headers: + Content-Type: "application/x-www-form-urlencoded" + X-APP-ID: "1" + Authorization: $token +validate: + - eq: ["status_code", 200] + - eq: ["content.data.email", "liangjinman@qniao.cn"] diff --git a/httprunner/api/customer_and_business_relations/admin_employer_list_employerseller.yml b/httprunner/api/customer_and_business_relations/admin_employer_list_employerseller.yml new file mode 100644 index 0000000..738e547 --- /dev/null +++ b/httprunner/api/customer_and_business_relations/admin_employer_list_employerseller.yml @@ -0,0 +1,13 @@ +name: 后台员工获取个人中心详情 +variables: + token: ${ENV(LDAPTOKEN)} +base_url: ${ENV(BURL)} +request: + url: /recycle-service/admin/employer/list/employer-seller + method: GET + headers: + X-APP-ID: "1" + Authorization: $token +validate: + - eq: ["status_code", 200] + diff --git a/httprunner/api/customer_and_business_relations/app_proxysell_bind_relation.yml b/httprunner/api/customer_and_business_relations/app_proxysell_bind_relation.yml new file mode 100644 index 0000000..151b1b8 --- /dev/null +++ b/httprunner/api/customer_and_business_relations/app_proxysell_bind_relation.yml @@ -0,0 +1,17 @@ +name: 创建客户销售绑定关系 +variables: + apptoken: ${ENV(ATOKEN)} + code: 0051 +base_url: ${ENV(AURL)} +request: + url: /recycle-service/proxy-sell/bind/relation + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken + params: + code: $code +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "contains", "expect": "successful"} diff --git a/httprunner/api/login/admin_login_password.yml b/httprunner/api/login/admin_login_password.yml new file mode 100644 index 0000000..c59953a --- /dev/null +++ b/httprunner/api/login/admin_login_password.yml @@ -0,0 +1,18 @@ +name: 后台管理员登录 +variables: + phone: admin + password: 90F742E9D98D953B6757A54E50AE1349 + rememberMe: null +base_url: ${ENV(BURL)} +request: + url: /login/admin/adminLogin + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + json: + phone: $phone + password: $password + rememberMe: $rememberMe +validate: + - eq: ["status_code", 200] + - {"check": "content.msg", "comparator": "contains", "expect": "success"} diff --git a/httprunner/api/login/admin_login_password1.yml b/httprunner/api/login/admin_login_password1.yml new file mode 100644 index 0000000..d1d53de --- /dev/null +++ b/httprunner/api/login/admin_login_password1.yml @@ -0,0 +1,18 @@ +name: 销售账号登录 +variables: + phone: 13060994305 + password: 9602BF7A8C5FEAB91385D1BB9EA70DF0 + rememberMe: null +base_url: ${ENV(BURL)} +request: + url: /login/admin/adminLogin + method: POST + headers: + Content-Type: "application/json;charset=UTF-8" + json: + phone: $phone + password: $password + rememberMe: $rememberMe +validate: + - eq: ["status_code", 200] + - {"check": "content.msg", "comparator": "contains", "expect": "success"} diff --git a/httprunner/api/login/app_login_password.yml b/httprunner/api/login/app_login_password.yml new file mode 100644 index 0000000..70c9773 --- /dev/null +++ b/httprunner/api/login/app_login_password.yml @@ -0,0 +1,19 @@ +name: app密码登录 +variables: + account: 18219557422 + accountType: MOBILE + password: dc483e80a7a0bd9ef71d8cf973673924 +base_url: ${ENV(AURL)} +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/httprunner/api/login/ldap_login_password.yml b/httprunner/api/login/ldap_login_password.yml new file mode 100644 index 0000000..0f606f7 --- /dev/null +++ b/httprunner/api/login/ldap_login_password.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: "1" + data: + username: liangjinman@qniao.cn + password: qn123456 +validate: + - eq: ["status_code", 200] + - {"check": "content.message", "comparator": "eq", "expect": "登陆成功"} \ No newline at end of file diff --git a/httprunner/api/user_info/app_user_getbaseinfo.yml b/httprunner/api/user_info/app_user_getbaseinfo.yml new file mode 100644 index 0000000..f7caaff --- /dev/null +++ b/httprunner/api/user_info/app_user_getbaseinfo.yml @@ -0,0 +1,16 @@ +name: app用户基本信息 +variables: + code: 200 + message: successful + apptoken: ${ENV(ATOKEN)} +base_url: ${ENV(AURL)} +request: + url: /recycle-service/user/get/base-info + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken +validate: + - eq: ["status_code",$code] + - eq: ["content.message",$message] diff --git a/httprunner/api/user_info/app_user_getmemberinfo.yml b/httprunner/api/user_info/app_user_getmemberinfo.yml new file mode 100644 index 0000000..d165978 --- /dev/null +++ b/httprunner/api/user_info/app_user_getmemberinfo.yml @@ -0,0 +1,17 @@ +name: app用户会员信息 +variables: + code: 200 + message: successful + apptoken: ${ENV(ATOKEN)} +base_url: ${ENV(AURL)} +request: + url: /recycle-service/user/get/member-info + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken +validate: + - eq: ["status_code", $code] + - eq: ["content.message", $message] + diff --git a/httprunner/api/user_info/app_user_getshippingaddresslist.yml b/httprunner/api/user_info/app_user_getshippingaddresslist.yml new file mode 100644 index 0000000..40c5f3e --- /dev/null +++ b/httprunner/api/user_info/app_user_getshippingaddresslist.yml @@ -0,0 +1,17 @@ +name: app获取收货地址列表 +variables: + code: 200 + message: successful + apptoken: ${ENV(ATOKEN)} +base_url: ${ENV(AURL)} +request: + url: /recycle-service/get/shipping-address-list + method: GET + headers: + Content-Type: "application/json;charset=UTF-8" + X-APP-ID: "1" + Authorization: $apptoken +validate: + - eq: ["status_code", $code] + - eq: ["content.message", $message] + diff --git a/httprunner/cases/case.yml b/httprunner/cases/case.yml new file mode 100644 index 0000000..b3e53de --- /dev/null +++ b/httprunner/cases/case.yml @@ -0,0 +1,18 @@ + +config: + name: "demo testsuite" + variables: + device_sn: "XYZ" + base_url: "http://127.0.0.1:5000" + +testcases: +- + name: call demo_testcase with data 1 + testcase: path/to/step.yml + variables: + device_sn: $device_sn +- + name: call demo_testcase with data 2 + testcase: path/to/step.yml + variables: + device_sn: $device_sn diff --git a/httprunner/cases/consignment_process/admin_operation_audit.yml b/httprunner/cases/consignment_process/admin_operation_audit.yml new file mode 100644 index 0000000..c8ccb21 --- /dev/null +++ b/httprunner/cases/consignment_process/admin_operation_audit.yml @@ -0,0 +1,11 @@ +testcases: +- + name: 运营审核测试套件 + testcase: steps/consignment_process/admin_operation_audit.yml + parameters: + - title-auditRequestId-isPass-weightDay-code-message: + - ["运营审核isPass为空","501196221172551680","",200,"isPass:是否通过不能为空"] + - ["运营审核id为空","",1,200,"auditRequestId:审核id不能为空"] + - ["运营审核id错误","12345",1,200,"审核id不存在"] + + diff --git a/httprunner/cases/consignment_process/admin_proxysell_save_weightnote.yml b/httprunner/cases/consignment_process/admin_proxysell_save_weightnote.yml new file mode 100644 index 0000000..d856d84 --- /dev/null +++ b/httprunner/cases/consignment_process/admin_proxysell_save_weightnote.yml @@ -0,0 +1,11 @@ +testcases: +- + name: 销售上传代卖磅单信息测试套件 + testcase: steps/consignment_process/admin_proxysell_save_weightnote.yml + parameters: + - title-orderItemId-settleDay-weightDay-code-message: + - ["上传磅单信息错误的订单项id","12345","2020-09-11","2020-09-10",500,"No message available"] + - ["上传磅单信息订单项id为空","","2020-09-11","2020-09-10",200,"orderItemId:订单项id不能为空"] + - ["上传磅单信息结算日期为空","50146071269933465","","2020-09-10",200,"settleDay:结算日期不能为空"] + - ["上传磅单信息过磅日期为空","50146071269933465","2020-09-11","",200,"weightDay:过磅日期不能为空"] + diff --git a/httprunner/cases/consignment_process/admin_proxysell_update_reservation.yml b/httprunner/cases/consignment_process/admin_proxysell_update_reservation.yml new file mode 100644 index 0000000..22a70da --- /dev/null +++ b/httprunner/cases/consignment_process/admin_proxysell_update_reservation.yml @@ -0,0 +1,10 @@ +testcases: +- + name: 销售上传代卖预约信息测试套件 + testcase: steps/consignment_process/admin_proxysell_update_reservation.yml + parameters: + - title-millSupplierId-scrapeOrderId-code-message: + - ["上传预约信息错误的纸厂供应商id","12345","501462195926863872",500,"No message available"] + - ["上传预约信息错误的订单号","498227745344589800","12345",500,"Internal Server Error"] + - ["上传预约信息纸厂供应商id为空","","501462195926863872",200,"millSupplierId:纸厂供应商不能为空"] + - ["上传预约信息订单号为空","498227745344589800","",200,"scrapeOrderId:订单id不能为空"] diff --git a/httprunner/cases/consignment_process/app_proxysell_create_order.yml b/httprunner/cases/consignment_process/app_proxysell_create_order.yml new file mode 100644 index 0000000..6a13b24 --- /dev/null +++ b/httprunner/cases/consignment_process/app_proxysell_create_order.yml @@ -0,0 +1,10 @@ +testcases: +- + name: app用户创建代卖订单测试套件 + testcase: steps/consignment_process/app_proxysell_create_order.yml + parameters: + - title-deliveryTime-paperCategoryId-totalEstimatedWeight-code-message: + - ["创建代卖订单错误的纸品id","2020-09-10 12:00:00","12345","1000",500,"No message available"] + - ["创建代卖订单纸品id为空","2020-09-10 12:00:00","","1000",200,"paperCategoryId:纸品id不能为空"] + - ["创建代卖订单时间为空","","498475822026461184","1000",200,"deliveryTime:送货时间不能为空"] + - ["创建代卖订单时间为空","2020-09-10 12:00:00","498475822026461184","",200,"totalEstimatedWeight:总预估重量不能为空"] \ No newline at end of file diff --git a/httprunner/cases/consignment_process/consignment_process.yml b/httprunner/cases/consignment_process/consignment_process.yml new file mode 100644 index 0000000..ab0ce09 --- /dev/null +++ b/httprunner/cases/consignment_process/consignment_process.yml @@ -0,0 +1,4 @@ +testcases: +- + name: 代卖流程测试套件 + testcase: steps/consignment_process/consignment_process.yml diff --git a/httprunner/cases/customer_and_business_relations/admin_customerbizrelation_save_relation.yml b/httprunner/cases/customer_and_business_relations/admin_customerbizrelation_save_relation.yml new file mode 100644 index 0000000..c4dfc54 --- /dev/null +++ b/httprunner/cases/customer_and_business_relations/admin_customerbizrelation_save_relation.yml @@ -0,0 +1,20 @@ +testcases: +- + name: 后台客户与业务人员关系测试套件正向 + testcase: steps/customer_and_business_relations/admin_customerbizrelation_relation.yml + +- + name: 后台新增客户与业务人员关系测试套件逆向 + testcase: steps/customer_and_business_relations/admin_customerbizrelation_save_relation.yml + parameters: + - title-bizUserId-bizUserName-cusormerId-customerName-code-message: + - ["后台新增客户与业务人员关系成功","498985714734731264","梁金满","496029457996451840","梁金满",200,"successful"] + - ["后台新增客户与业务人员关系重复","498985714734731264","梁金满","496029457996451840","梁金满",200,"请勿重复绑定"] + - ["后台新增客户与业务人员关系其他销售","498985714709565440","吴华东","496029457996451840","梁金满",200,"该客户已经绑定了销售人员"] +- + name: 后台修改客户与业务人员关系测试套件逆向 + testcase: steps/customer_and_business_relations/admin_customerbizrelation_update_relation.yml + parameters: + - title-bizUserId-bizUserName-id-code-message: + - ["后台修改客户与业务人员关系成功","498985714734731264","梁金满",1,200,"successful"] + - ["后台修改客户与业务人员关系id为空","498985714734731264","梁金满","",200,"id:must not be null"] diff --git a/httprunner/cases/login/admin_login_password.yml b/httprunner/cases/login/admin_login_password.yml new file mode 100644 index 0000000..57787f0 --- /dev/null +++ b/httprunner/cases/login/admin_login_password.yml @@ -0,0 +1,12 @@ +testcases: +- + name: 后台管理员登录测试套件 + testcase: steps/login/admin_login_password.yml + parameters: + - title-phone-password-rememberMe-code-msg: + - ["登录成功","admin","90F742E9D98D953B6757A54E50AE1349","null",200,"success"] + - ["密码错误","admin","123456","null",200,"帐号密码错误"] + - ["账号错误","123","90F742E9D98D953B6757A54E50AE1349","null",200,"用户不存在"] + - ["账号为空","","90F742E9D98D953B6757A54E50AE1349","null",200,"手机号不能为空"] + - ["密码为空","admin","","null",200,"密码不能为空"] + diff --git a/httprunner/cases/login/app_login_password.yml b/httprunner/cases/login/app_login_password.yml new file mode 100644 index 0000000..e992c8e --- /dev/null +++ b/httprunner/cases/login/app_login_password.yml @@ -0,0 +1,13 @@ +testcases: +- + name: app密码登录测试套件 + testcase: steps/login/app_login_password.yml + parameters: + - title-account-accountType-password-code-message: + - ["登录成功","18219557422","MOBILE","dc483e80a7a0bd9ef71d8cf973673924",200,"successful"] + - ["密码错误","18219557422","MOBILE","123456",200,"密码错误"] + - ["账号为空","","MOBILE","dc483e80a7a0bd9ef71d8cf973673924",200,"account:账号不能为空"] + - ["账号错误","admin","MOBILE","dc483e80a7a0bd9ef71d8cf973673924",200,"新用户请注册"] + - ["密码为空","18219557422","MOBILE","",200,"password:密码不能为空"] + - ["账号类型错误","18219557422","MAIL","dc483e80a7a0bd9ef71d8cf973673924",200,"新用户请注册"] + - ["账号类型为空","18219557422","","dc483e80a7a0bd9ef71d8cf973673924",200,"No enum constant com.qniao.authorization.constants.AccountTypeEnum."] diff --git a/httprunner/cases/user_info/app_user_getbaseinfo.yml b/httprunner/cases/user_info/app_user_getbaseinfo.yml new file mode 100644 index 0000000..bdc0f31 --- /dev/null +++ b/httprunner/cases/user_info/app_user_getbaseinfo.yml @@ -0,0 +1,7 @@ +testcases: +- + name: 获取app用户基本信息测试套件 + testcase: steps/user_info/app_user_getbaseinfo.yml + parameters: + - title-code-message: + - ["获取app用户基本信息成功",200,"successful"] diff --git a/httprunner/cases/user_info/app_user_getmemberinfo.yml b/httprunner/cases/user_info/app_user_getmemberinfo.yml new file mode 100644 index 0000000..ce31d05 --- /dev/null +++ b/httprunner/cases/user_info/app_user_getmemberinfo.yml @@ -0,0 +1,7 @@ +testcases: +- + name: 获取app用户会员信息测试套件 + testcase: steps/user_info/app_user_getmemberinfo.yml + parameters: + - title-code-message: + - ["获取app用户会员信息成功",200,"successful"] diff --git a/httprunner/cases/user_info/app_user_getshippingaddresslist.yml b/httprunner/cases/user_info/app_user_getshippingaddresslist.yml new file mode 100644 index 0000000..e156004 --- /dev/null +++ b/httprunner/cases/user_info/app_user_getshippingaddresslist.yml @@ -0,0 +1,7 @@ +testcases: +- + name: app获取收货地址列表测试套件 + testcase: steps/user_info/app_user_getshippingaddresslist.yml + parameters: + - title-code-message: + - ["app获取收货地址列表成功",200,"successful"] diff --git a/httprunner/debugtalk.py b/httprunner/debugtalk.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/httprunner/debugtalk.py @@ -0,0 +1 @@ + diff --git a/httprunner/reports/1599786957.html b/httprunner/reports/1599786957.html new file mode 100644 index 0000000..f242077 --- /dev/null +++ b/httprunner/reports/1599786957.html @@ -0,0 +1,4113 @@ + + + + - TestReport + + + + +

Test Report:

+ +

Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + +
START AT2020-09-11 09:15:57
DURATION2.232 seconds
PLATFORMHttpRunner 2.3.0 CPython 3.7.1 Windows-10-10.0.10586-SP0
STATTESTCASES (success/fail)TESTSTEPS (success/fail/error/skip)
total (details) =>1 (1/0)14 (14/0/0/0)
+ +

Details

+ + + +

代卖流程测试套件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TOTAL: 14SUCCESS: 14FAILED: 0ERROR: 0SKIPPED: 0
StatusNameResponse TimeDetail
successapp用户密码登录获取token987.28 ms + + + + log-1 + + + + + +
success销售登录后台获取token178.19 ms + + + + log-1 + + + + + +
successapp用户获取纸厂id73.57 ms + + + + log-1 + + + + + +
successapp用户获取纸厂品类id36.12 ms + + + + log-1 + + + + + +
successapp用户创建代卖订单,获取订单id,销售收到钉钉86.46 ms + + + + log-1 + + + + + +
successapp用户拒绝预约代卖订单,销售收到钉钉60.34 ms + + + + log-1 + + + + + +
success销售获取后台纸厂供应商id54.79 ms + + + + log-1 + + + + + +
success销售上传代卖预约信息158.76 ms + + + + log-1 + + + + + +
success销售查看订单详情获取订单项id75.15 ms + + + + log-1 + + + + + +
success销售上传代卖磅单信息100.63 ms + + + + log-1 + + + + + +
success销售查看订单详情获取磅单id69.76 ms + + + + log-1 + + + + + +
success销售提交榜单审核,运营收到钉钉115.67 ms + + + + log-1 + + + + + +
success运营获取审核列表36.87 ms + + + + log-1 + + + + + +
success运营审核,审核不通过销售收到钉钉82.31 ms + + + + log-1 + + + + + +
+ + \ No newline at end of file diff --git a/httprunner/steps/consignment_process/admin_operation_audit.yml b/httprunner/steps/consignment_process/admin_operation_audit.yml new file mode 100644 index 0000000..e2d803b --- /dev/null +++ b/httprunner/steps/consignment_process/admin_operation_audit.yml @@ -0,0 +1,16 @@ +config: + name: 运营审核 +teststeps: +- + name: 销售登录后台获取token + api: api/login/ldap_login_password.yml + extract: + - token: headers.Authorization +- + name: $title + api: api/consignment_process/admin_operation_audit.yml + variables: + token: $token + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} \ No newline at end of file diff --git a/httprunner/steps/consignment_process/admin_proxysell_save_weightnote.yml b/httprunner/steps/consignment_process/admin_proxysell_save_weightnote.yml new file mode 100644 index 0000000..4df6c89 --- /dev/null +++ b/httprunner/steps/consignment_process/admin_proxysell_save_weightnote.yml @@ -0,0 +1,16 @@ +config: + name: 销售上传代卖磅单信息 +teststeps: +- + name: 销售登录后台获取token + api: api/login/ldap_login_password.yml + extract: + - token: headers.Authorization +- + name: $title + api: api/consignment_process/admin_proxysell_save_weightnote.yml + variables: + token: $token + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} \ No newline at end of file diff --git a/httprunner/steps/consignment_process/admin_proxysell_update_reservation.yml b/httprunner/steps/consignment_process/admin_proxysell_update_reservation.yml new file mode 100644 index 0000000..ac72cb3 --- /dev/null +++ b/httprunner/steps/consignment_process/admin_proxysell_update_reservation.yml @@ -0,0 +1,16 @@ +config: + name: 销售上传代卖预约信息 +teststeps: +- + name: 销售登录后台获取token + api: api/login/ldap_login_password.yml + extract: + - token: headers.Authorization +- + name: $title + api: api/consignment_process/admin_proxysell_update_reservation.yml + variables: + token: $token + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} \ No newline at end of file diff --git a/httprunner/steps/consignment_process/app_proxysell_create_order.yml b/httprunner/steps/consignment_process/app_proxysell_create_order.yml new file mode 100644 index 0000000..5b762c1 --- /dev/null +++ b/httprunner/steps/consignment_process/app_proxysell_create_order.yml @@ -0,0 +1,16 @@ +config: + name: app用户创建代卖订单 +teststeps: +- + name: app用户密码登录获取token + api: api/login/app_login_password.yml + extract: + - apptoken: content.data.token +- + name: $title + api: api/consignment_process/app_proxysell_create_order.yml + variables: + apptoken: QNT $apptoken + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} \ No newline at end of file diff --git a/httprunner/steps/consignment_process/consignment_process.yml b/httprunner/steps/consignment_process/consignment_process.yml new file mode 100644 index 0000000..c15eb5d --- /dev/null +++ b/httprunner/steps/consignment_process/consignment_process.yml @@ -0,0 +1,102 @@ +config: + name: 代卖流程 +teststeps: +- + name: app用户密码登录获取token + api: api/login/app_login_password.yml + extract: + - apptoken: content.data.token +- + name: 销售登录后台获取token + api: api/login/ldap_login_password.yml + extract: + - token: headers.Authorization + +- + name: app用户获取纸厂id + api: api/consignment_process/app_get_papermillpapercategorypricelist.yml + variables: + apptoken: QNT $apptoken + extract: + paperMillId: content.data.records.1.paperMillId +- + name: app用户获取纸厂品类id + api: api/consignment_process/app_get_papercategory.yml + variables: + apptoken: QNT $apptoken + paperMillId: $paperMillId + extract: + paperCategoryId: content.data.1.id +- + name: app用户创建代卖订单,获取订单id,销售收到钉钉 + api: api/consignment_process/app_proxysell_create_order.yml + variables: + apptoken: QNT $apptoken + paperCategoryId: $paperCategoryId + extract: + orderId: content.data.orderId +- + name: app用户拒绝预约代卖订单,销售收到钉钉 + api: api/consignment_process/app_proxysell_cancel_reservation.yml + variables: + apptoken: QNT $apptoken + orderId: $orderId +- + name: 销售获取后台纸厂供应商id + api: api/consignment_process/admin_paperMill_get_papermilldetails.yml + variables: + token: $token + paperMillId: $paperMillId + extract: + millSupplierId: content.data.millSupplierNameList.1.merchantAccountId +- + name: 销售上传代卖预约信息 + api: api/consignment_process/admin_proxysell_update_reservation.yml + variables: + token: $token + millSupplierId: $millSupplierId + scrapeOrderId: $orderId +- + name: 销售查看订单详情获取订单项id + api: api/consignment_process/admin_proxysell_get_proxyorder.yml + variables: + token: $token + orderId: $orderId + extract: + orderItemId: content.data.orderItems.0.id +- + name: 销售上传代卖磅单信息 + api: api/consignment_process/admin_proxysell_save_weightnote.yml + variables: + token: $token + orderItemId: $orderItemId +- + name: 销售查看订单详情获取磅单id + api: api/consignment_process/admin_proxysell_get_proxyorder.yml + variables: + token: $token + orderId: $orderId + extract: + weightNoteId: content.data.orderItems.0.weightnoteInfo.id +- + name: 销售提交榜单审核,运营收到钉钉 + api: api/consignment_process/admin_proxysell_audit_weightnote.yml + variables: + token: $token + weightNoteId: $weightNoteId +- + name: 运营获取审核列表 + api: api/consignment_process/admin_operation_get_papermillorderreceiptaudit.yml + variables: + token: $token + extract: + auditRequestId: content.data.records.0.auditRequestId + +- + name: 运营审核,审核不通过销售收到钉钉 + api: api/consignment_process/admin_operation_audit.yml + variables: + token: $token + isPass: 2 + auditRequestId: $auditRequestId + diff --git a/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_relation.yml b/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_relation.yml new file mode 100644 index 0000000..108ca35 --- /dev/null +++ b/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_relation.yml @@ -0,0 +1,66 @@ +config: + name: 客户与业务人员关系 +teststeps: +- + name: 员工登录获取token + api: api/login/ldap_login_password.yml + extract: + - token: headers.Authorization + +- + name: 获取销售id和name + api: api/customer_and_business_relations/admin_employer_list_employerseller.yml + variables: + token: $token + extract: + - bizUserId: content.data.0.adminId + - bizUserName: content.data.0.name + - bizUserId1: content.data.1.adminId + - bizUserName1: content.data.1.name + +- + name: app密码登录获取token + api: api/login/app_login_password.yml + extract: + - apptoken: content.data.token + +- + name: 获取app用户基本信息的id和name + api: api/user_info/app_user_getbaseinfo.yml + variables: + apptoken: QNT $apptoken + extract: + - cusormerId: content.data.userId + - customerName: content.data.realName +- + name: 后台新增客户与业务人员关系成功 + api: api/customer_and_business_relations/admin_customerbizrelation_save_relation.yml + variables: + token: $token + bizUserId: $bizUserId + bizUserName: $bizUserName + cusormerId: $cusormerId + customerName: $customerName + extract: + - id: content.data.id +- + name: 后台查询客户与业务人员关系成功 + api: api/customer_and_business_relations/admin_customerbizrelation_get_relation.yml + variables: + token: $token + id: $id + +- + name: 后台修改客户与业务人员关系成功 + api: api/customer_and_business_relations/admin_customerbizrelation_update_relation.yml + variables: + token: $token + bizUserId: $bizUserId1 + bizUserName: $bizUserName1 + id: $id +- + name: 后台删除客户与业务人员关系成功 + api: api/customer_and_business_relations/admin_customerbizrelation_delete_relation.yml + variables: + token: $token + id: $id diff --git a/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_save_relation.yml b/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_save_relation.yml new file mode 100644 index 0000000..9efc94a --- /dev/null +++ b/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_save_relation.yml @@ -0,0 +1,21 @@ +config: + name: 后台新增客户与业务人员关系 +teststeps: +- + name: 员工登录获取token + api: api/login/ldap_login_password.yml + extract: + - accesstoken: headers.Authorization + +- + name: $title + api: api/customer_and_business_relations/admin_customerbizrelation_save_relation.yml + variables: + accesstoken: $accesstoken + bizUserId: $bizUserId + bizUserName: $bizUserName + cusormerId: $cusormerId + customerName: $customerName + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} diff --git a/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_update_relation.yml b/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_update_relation.yml new file mode 100644 index 0000000..cd9a8c6 --- /dev/null +++ b/httprunner/steps/customer_and_business_relations/admin_customerbizrelation_update_relation.yml @@ -0,0 +1,28 @@ +config: + name: 后台修改客户与业务人员关系 +teststeps: +- + name: 员工登录获取token + api: api/login/ldap_login_password.yml + extract: + - accesstoken: headers.Authorization + +- + name: 获取销售id和name + api: api/customer_and_business_relations/admin_employer_list_employerseller.yml + variables: + token: $accesstoken + extract: + - bizUserId: content.data.0.adminId + - bizUserName: content.data.0.name +- + name: $title + api: api/customer_and_business_relations/admin_customerbizrelation_update_relation.yml + variables: + accesstoken: $accesstoken + bizUserId: $bizUserId + bizUserName: $bizUserName + id: $id + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} diff --git a/httprunner/steps/login/admin_login_password.yml b/httprunner/steps/login/admin_login_password.yml new file mode 100644 index 0000000..440a59b --- /dev/null +++ b/httprunner/steps/login/admin_login_password.yml @@ -0,0 +1,9 @@ +config: + name: 后台管理员登录 +teststeps: +- + name: $title + api: api/login/admin_login_password.yml + validate: + - eq: ["status_code", $code] + - {"check": "content.msg", "comparator": "contains", "expect": $msg} diff --git a/httprunner/steps/login/app_login_password.yml b/httprunner/steps/login/app_login_password.yml new file mode 100644 index 0000000..2a66410 --- /dev/null +++ b/httprunner/steps/login/app_login_password.yml @@ -0,0 +1,9 @@ +config: + name: app密码登录 +teststeps: +- + name: $title + api: api/login/app_login_password.yml + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} diff --git a/httprunner/steps/step.yml b/httprunner/steps/step.yml new file mode 100644 index 0000000..45300e1 --- /dev/null +++ b/httprunner/steps/step.yml @@ -0,0 +1,15 @@ +config: + name: 依赖上个接口 + variables: + base_url: https://api-test.qniao.cn/recycle-service +teststeps: +- + name: 第一个接口 + api: path/to/api1.yml + extract: + - token: content.token +- + name: 第二个接口 + api: path/to/api2.yml + variables: + token: $token diff --git a/httprunner/steps/user_info/app_user_getbaseinfo.yml b/httprunner/steps/user_info/app_user_getbaseinfo.yml new file mode 100644 index 0000000..73c30f7 --- /dev/null +++ b/httprunner/steps/user_info/app_user_getbaseinfo.yml @@ -0,0 +1,16 @@ +config: + name: app用户基本信息 +teststeps: +- + name: app密码登录获取token + api: api/login/app_login_password.yml + extract: + - token: content.data.token +- + name: 获取app用户基本信息 + api: api/user_info/app_user_getbaseinfo.yml + variables: + token: QNT $token + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} diff --git a/httprunner/steps/user_info/app_user_getmemberinfo.yml b/httprunner/steps/user_info/app_user_getmemberinfo.yml new file mode 100644 index 0000000..fd5e69f --- /dev/null +++ b/httprunner/steps/user_info/app_user_getmemberinfo.yml @@ -0,0 +1,16 @@ +config: + name: app用户基本信息 +teststeps: +- + name: app密码登录获取token + api: api/login/app_login_password.yml + extract: + - token: content.data.token +- + name: 获取app用户会员信息 + api: api/user_info/app_user_getmemberinfo.yml + variables: + token: QNT $token + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message} diff --git a/httprunner/steps/user_info/app_user_getshippingaddresslist.yml b/httprunner/steps/user_info/app_user_getshippingaddresslist.yml new file mode 100644 index 0000000..37fa27c --- /dev/null +++ b/httprunner/steps/user_info/app_user_getshippingaddresslist.yml @@ -0,0 +1,16 @@ +config: + name: app用户基本信息 +teststeps: +- + name: app密码登录获取token + api: api/login/app_login_password.yml + extract: + - token: content.data.token +- + name: app获取收货地址列表 + api: api/user_info/app_user_getshippingaddresslist.yml + variables: + token: $token + validate: + - eq: ["status_code", $code] + - {"check": "content.message", "comparator": "contains", "expect": $message}