在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
WinTestNG
概述
使用方法
测试计划执行逻辑配置详细文档资源配置
mysql{ "url":"jdbc:mysql://xx.mysql.rds.aliyuncs.com:3306/baoxian", "userName":"userName", "password":"password"} redis{ "host":"12.26.1.94", "port":3736, "database":8, "password":"D6eAtdxxxxxxsaisf"} mongo{ "url":"mongodb://wyxx_app:[email protected]:3717,11.41.53.215:27017/wyxx_app"} 数据准备配置
text{ "showTitle":"3333-${mobile}", "text":"[{\"mobile\":\"15967126512\"},{\"mobile\":\"15967122137\"}]", "type":"text"} csv{ "fieldNameList":[ "id", "name", "mobile" ], "fileName":"http://xx.winbaoxian.com/xx.1csv", "separator":",", "type":"csv"} resource{ "resourceId":2, "showTitle":"3333-${mobile}", "sql":"select mobile from sales_user limit 3", "type":"resource"} 步骤配置
[ { "name":"调用APP登录", "actionType":"TPL", "templateId":21, "mappings":{ "a":"18757101098", "b":"0000" }, "delayTimes":2000, "alias":"template" }, { "name":"更新数据库", "delayTimes":2000, "actionType":"RESOURCE", "resourceId":1, "sql":"update big_guy_share_info set status=0 where id=8" }, { "name":"教你赚钱-获取大咖分享分页数据-20条", "actionType":"HTTP", "requestHeader":{ }, "requestUrl":"http://xx.winbaoxian.cn/xx/1/getBigGuyShareInfoPageList", "requestParams":{ "t":1, "n":1, "u":"[email protected]", "di":"mockDeviceId", "m":1, "s":"${template.token}" }, "requestMethod":"POST", "requestContentType":"e/b", "requestBody":"{\"pageNo\": 1}", "alias":"getBigGuyShareInfoPageList", "delayTimes":2000 }, { "actionType":"ASSERTION", "delayTimes":2000, "name":"断言", "verifyList":[ { "type":"eq", "value1":"${getBigGuyShareInfoPageList.body.r.isEnd?c}", "value2":"true" } ] }] HTTP请求{ "name":"教你赚钱-获取大咖分享分页数据-20条", "actionType":"HTTP", "requestHeader":{}, "requestUrl":"http://xx.winbaoxian.cn/xx/1/getBigGuyShareInfoPageList", "requestParams":{ "t":1, "n":1, "u":"[email protected]", "di":"mockDeviceId", "m":1, "s":"${template.token}" }, "requestMethod":"POST", "requestContentType":"e/b", "requestBody":"{\"pageNo\": 1}", "delayTimes":2000, "alias":"template"} 资源操作{ "name":"更新数据库", "actionType":"RESOURCE", "resourceId":1, "sql":"SELECT id,`name`,mobile from sales_user limit 1", "fetchOne":true, "delayTimes":2000, "alias":"ret"} 常量设置{ "name":"常量设置", "actionType":"SETV", "params":{ "ip":"x-api.winbaoxian.cn", "calculate":"/api/product/data/calculate", "get_captcha":"/api/policy/getCaptcha", "pre_order":"/api/policy/pre-order" }, "delayTimes":2000, "alias":"ret"} 调用模板{ "name":"调用APP登录", "actionType":"TPL", "templateId":21, "mappings":{ "a":"18757101098", "b":"0000" }, "delayTimes":2000, "alias":"template"} ASSERTION{ "name":"断言", "actionType":"ASSERTION", "templateId":21, "verifyList":[ { "type":"condition", "value1":"${getExpirePolicyCollate.body.r.policyExpireRemindList?exists?c}==true" }, { "type":"eq", "value1":"${getExpirePolicyCollate.body.r.policyExpireRemindList[0].policyUuid}", "value2":"5108" } ], "delayTimes":2000, "alias":"v"} GROUP分组{ "name":"分组", "actionType":"GROUP", "stepList":[ { "name":"调用APP登录", "actionType":"TPL", "templateId":21, "mappings":{ "a":"18757101098", "b":"0000" }, "delayTimes":2000, "alias":"template" } ]} IF判断{ "name":"IF判断", "actionType":"IF", "condition": "${res.success?c}", "stepList":[ { "name":"调用APP登录", "actionType":"TPL", "templateId":21, "mappings":{ "a":"18757101098", "b":"0000" }, "delayTimes":2000, "alias":"template" } ]} FOR循环{ "name":"IF判断", "actionType":"IF", "iterData": "${toJSONString(res.list)}", "iterAlias": "a", "stepList":[ { "name":"调用APP登录", "actionType":"TPL", "templateId":21, "mappings":{ "a":"${a.mobile}", "b":"0000" }, "delayTimes":2000, "alias":"template" } ]} SCRIPT{ "name":"脚本", "actionType":"SCRIPT", "lang":"PYTHON", "content":"a=1+2", "extractVars": ["a"], "alias": "xx"} 联系方式
|
请发表评论