常用语法总结
调试打开F12,前后置用console.log();
test用log();且在断言失败之前有效,断言通过不会打印日志
前置处理器
请求json格式数据示例:
"basedata":{
"requesthead":{
"uuid": "sd5f6532656s",
"startdate": "2021-02-01 16:05:55"
},
"keyinfo":{
"number": "123456",
"data": {
"user_arr":[
"12345689",
"96545658"
]
}
},
"dealinfo":[{
"amount": "666.00",
"currency": "RMB"
},
{
"amount": "888.00",
"currency": "USD"
}]
}
给请求头和请求body赋值函数:
var token = 'asdf5sd5f55';
//给请求头中的Token 属性赋值:
context.requestHeader.Token = token ;
//给请求头整体赋值:
context.requestHeader = header; //header为一个对象=》{"Content-type": "application/json","Char-set": "UTF-8"}
//给请求body中的属性赋值: