调整发送钉钉/企业微信/邮件里面关于测试人员信息,参数替换没有成功的问题
This commit is contained in:
@@ -514,12 +514,30 @@ if __name__ == '__main__':
|
||||
print("-----------测试场景17---------------------")
|
||||
data_17 = {
|
||||
"winner_id": "${winner_id}",
|
||||
"user_id": "${user_id}"
|
||||
"user_id": "${user_id}",
|
||||
"assignee_id": "${assignee_id}"
|
||||
}
|
||||
source = {
|
||||
"winner_id": "1,2,4",
|
||||
"user_id": []
|
||||
"assignee_id": [],
|
||||
"user_id": 1076
|
||||
}
|
||||
|
||||
res = data_handle(obj=data_17, source=source)
|
||||
print(res)
|
||||
|
||||
print("-----------测试场景18---------------------")
|
||||
payload = {'id': 'case_login_01', 'title': '用户名密码正确,登录成功(不校验数据库)', 'severity': 'NORMAL',
|
||||
'url': ' https://testforgeplus.trustie.net/api/accounts/login.json', 'run': True, 'method': 'POST',
|
||||
'headers': {'Content-Type': 'application/json; charset=utf-8;'}, 'cookies': None, 'request_type': 'JSON',
|
||||
'payload': {'login': 'autotest', 'password': '********', 'autologin': 1}, 'files': None,
|
||||
'extract': {'nickname': '$.username', 'login': '$.login', 'user_id': '$.user_id'},
|
||||
'assert_response': {'eq': {'http_code': 200, '$.user_id': "${user_id}"}}, 'assert_sql': None}
|
||||
|
||||
source = {
|
||||
"winner_id": "1,2,4",
|
||||
"assignee_id": [],
|
||||
"user_id": 1076
|
||||
}
|
||||
res = data_handle(obj=payload, source=source)
|
||||
print(res)
|
||||
|
||||
Reference in New Issue
Block a user