You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
2.1 KiB
40 lines
2.1 KiB
*** Settings ***
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
|
|
*** Test Cases ***
|
|
UEClogin
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953924
|
|
Create Session ZTB http://api-client-uec-test.qniao.cn ${header}
|
|
${data} Create Dictionary account=13517986787 captcha=888888 accountType=2
|
|
log ${data}
|
|
${respones} POST On Session ZTB /uec/authorize/by-captcha json=${data}
|
|
${gettoken} Get From Dictionary ${respones.json()["data"]} token
|
|
Set Global Variable ${gettoken}
|
|
|
|
ZTBlogin-token
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953926
|
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header}
|
|
${token} Set Variable {"loginToken":"${gettoken}"}
|
|
${res} Post On Session ZTB recycle-user-center/authorize/get/product-line-token/by/login-token ${token}
|
|
${gettoken} Get From Dictionary ${res.json()} data
|
|
Set Global Variable ${gettoken}
|
|
|
|
后台管理login
|
|
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555
|
|
Create Session 后台管理 http://api-ops-ztb-test.qniao.cn ${header}
|
|
${data} Create Dictionary username=mengyan@qniao.cn password=qn123456
|
|
log ${data}
|
|
${resp} Post On Session 后台管理 /recycle-service/admin/login data=${data}
|
|
log ${resp}
|
|
|
|
新建客户
|
|
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953926 Authorization=QNT iHP4V/g6O5DXHixyNrf7tq/TvfrIdTfTGdH2F9klxyus0IM7YplqP6ckxwAnbYMwW8kjOtWm8KDrBFfLPEPpTA== X-FACTORY-ID=615896891544178688
|
|
Create Session ZTB http://api-client-ztb-test.qniao.cn ${header}
|
|
${data} Set Variable {"cardNo":"","name":"吴彦祖","mobile":"13232323232","defaultPaymentMethod":1}
|
|
log ${data}
|
|
${reps} Post On Session ZTB /ztb-factory/factory/save/customer ${data.encode('utf-8')}
|
|
log ${reps}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|
|
|
|
新建品类
|