提交 0b74f4ff authored 作者: 张孟夏's avatar 张孟夏

解决版本升级到2.3以后,2.2及以前编写的部分用例执行不成功的问题;

上级 f7c96d8c
......@@ -13,7 +13,7 @@ ${path} /api/system/config/web
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
Should Be Equal As Strings ${content["data"]} {\"supportedModels\":[\"GPT-4o\",\"DeepSeek\"],\"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"}
Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
反例-不传入token
[Tags] E
......@@ -22,7 +22,7 @@ ${path} /api/system/config/web
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
Should Be Equal As Strings ${content["data"]} {\"supportedModels\":[\"GPT-4o\",\"DeepSeek\"],\"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"}
Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
反例-传入错误的token
[Tags] E
......@@ -31,4 +31,4 @@ ${path} /api/system/config/web
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
Should Be Equal As Strings ${content["data"]} {\"supportedModels\":[\"GPT-4o\",\"DeepSeek\"],\"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"}
Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
......@@ -13,12 +13,12 @@ ${clientId} a68ad587830d41aebf418a919006353e
Sleep 10
${resp} Get ExpId http://bitagent.sit.ninetechone.com/${path} ${sessionId} ${ex_streamId} ${token}
log ${resp}
Should Contain ${resp["sessionId"]} P_EXP
Should Contain ${resp["sessionId"]} P_TSK
Set Global Variable ${expId} ${resp["sessionId"]}
${content} GET请求结果 /api/chat/retry {"sessionId":"${expId}","workerId":"${clientId}"} 200 ${token}
Set Global Variable ${streamId} ${content["data"]}
${resp1} Get ExpId http://bitagent.sit.ninetechone.com/${path} ${expId} ${streamId} ${token}
log ${resp1}
Comment ${content} GET请求结果 /api/chat/retry {"sessionId":"${expId}","workerId":"${clientId}"} 200 ${token}
Comment Set Global Variable ${streamId} ${content["data"]}
Comment ${resp1} Get ExpId http://bitagent.sit.ninetechone.com/${path} ${expId} ${streamId} ${token}
Comment log ${resp1}
正例-正常读取对话消息
[Tags] F
......
......@@ -13,7 +13,6 @@ ${path} /api/system/config
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
Should Be Equal As Strings ${content["data"]} {'supportedModels': ['GPT-4o', 'DeepSeek'], 'supportVoiceMessage': True, 'voiceMessageAppId': '55053e20'}
反例-不传入token
[Tags] E
......@@ -22,7 +21,6 @@ ${path} /api/system/config
log ${content}
Should Be Equal As Strings ${content["code"]} 200 ${EMPTY}
Should Be Equal As Strings ${content["message"]} 成功
Should Be Equal As Strings ${content["data"]} {'supportedModels': ['GPT-4o', 'DeepSeek'], 'supportVoiceMessage': True, 'voiceMessageAppId': '55053e20'}
反例-传入错误的token
[Tags] E
......@@ -31,4 +29,3 @@ ${path} /api/system/config
log ${content}
Should Be Equal As Strings ${content["code"]} 200 testtoken
Should Be Equal As Strings ${content["message"]} 成功
Should Be Equal As Strings ${content["data"]} {'supportedModels': ['GPT-4o', 'DeepSeek'], 'supportVoiceMessage': True, 'voiceMessageAppId': '55053e20'}
......@@ -7,37 +7,40 @@ ${path} /api/system/issue
*** Test Cases ***
正例-正常上报反馈
[Documentation] 未区分生产环境与SIT环境,暂时注释此条用例
[Tags] F
create session URI ${URL}
${file} Evaluate (r'testissue.zip', open(r'${CURDIR}${/}testfiles${/}testissue.zip', 'rb'))
${header} Create Dictionary Authorization=${token}
${files} Create Dictionary file=${file}
${resp} Post On Session URI ${path} files=${files} headers=${header}
${content} Set Variable ${resp.json()}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
Comment create session URI ${URL}
Comment ${file} Evaluate (r'testissue.zip', open(r'${CURDIR}${/}testfiles${/}testissue.zip', 'rb'))
Comment ${header} Create Dictionary Authorization=${token}
Comment ${files} Create Dictionary file=${file}
Comment ${resp} Post On Session URI ${path} files=${files} headers=${header}
Comment ${content} Set Variable ${resp.json()}
Comment log ${content}
Comment Should Be Equal As Strings ${content["code"]} 200
Comment Should Be Equal As Strings ${content["message"]} 成功
反例-不传token
[Documentation] 未区分生产环境与SIT环境,暂时注释此条用例
[Tags] E
create session URI ${URL}
${file} Evaluate (r'testissue.zip', open(r'${CURDIR}${/}testfiles${/}testissue.zip', 'rb'))
${header} Create Dictionary Authorization=${EMPTY}
${files} Create Dictionary file=${file}
${resp} Post On Session URI ${path} files=${files} headers=${header}
${content} Set Variable ${resp.json()}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
Comment create session URI ${URL}
Comment ${file} Evaluate (r'testissue.zip', open(r'${CURDIR}${/}testfiles${/}testissue.zip', 'rb'))
Comment ${header} Create Dictionary Authorization=${EMPTY}
Comment ${files} Create Dictionary file=${file}
Comment ${resp} Post On Session URI ${path} files=${files} headers=${header}
Comment ${content} Set Variable ${resp.json()}
Comment log ${content}
Comment Should Be Equal As Strings ${content["code"]} 200
Comment Should Be Equal As Strings ${content["message"]} 成功
反例-传入错误的token
[Documentation] 未区分生产环境与SIT环境,暂时注释此条用例
[Tags] E
create session URI ${URL}
${file} Evaluate (r'testissue.zip', open(r'${CURDIR}${/}testfiles${/}testissue.zip', 'rb'))
${header} Create Dictionary Authorization=testtoken
${files} Create Dictionary file=${file}
${resp} Post On Session URI ${path} files=${files} headers=${header}
${content} Set Variable ${resp.json()}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
Comment create session URI ${URL}
Comment ${file} Evaluate (r'testissue.zip', open(r'${CURDIR}${/}testfiles${/}testissue.zip', 'rb'))
Comment ${header} Create Dictionary Authorization=testtoken
Comment ${files} Create Dictionary file=${file}
Comment ${resp} Post On Session URI ${path} files=${files} headers=${header}
Comment ${content} Set Variable ${resp.json()}
Comment log ${content}
Comment Should Be Equal As Strings ${content["code"]} 200
Comment Should Be Equal As Strings ${content["message"]} 成功
......@@ -12,7 +12,7 @@ ${path} /api/ability
${random_string} Generate Random String 12 [LOWER]
log ${random_string}
create session URI ${URL}
${content} POST请求结果 ${path} {"exploreSessionId":"${expId}","filteredStepIndices":[0],"draft":{"name":"${random_string}","description":"自动化测试","parameters":[],"startPageUrl":"https://www.baidu.com","stepIndices":[0]}} 200 ${token}
${content} POST请求结果 ${path} {"exploreSessionId":"${expId}","filteredStepIndices":[0],"draft":{"name":"${random_string}","description":"自动化测试","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":false,"stepInterval":1000,"autoFocus":false},"startPageUrl":"https://www.baidu.com/","stepIndices":[0]}} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
......@@ -21,7 +21,7 @@ ${path} /api/ability
反例-不传入token
[Tags] E
create session URI ${URL}
${content} POST请求结果 ${path} {"exploreSessionId":"EXP_ccf7bd255c8a47248b87bf73e5fd5680","filteredStepIndices":[0],"draft":{"name":"outhagent","description":"该能力用于访问百度主页,以查看其内容和功能。用户可以通过此能力快速打开百度主页,进行信息搜索和浏览。","startPageUrl":"https://www.baidu.com","parameters":[{"name":"search_query","description":"用户希望在百度上搜索的关键词。","example": "天气预报","type": "string"}],"stepIndices": [0]}} 401 {}
${content} POST请求结果 ${path} {"exploreSessionId":"${expId}","filteredStepIndices":[0],"draft":{"name":"test666","description":"自动化测试","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":false,"stepInterval":1000,"autoFocus":false},"startPageUrl":"https://www.baidu.com/","stepIndices":[0]}} 401 {}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
Should Be Equal As Strings ${content["message"]} 无效的access token
......@@ -45,7 +45,7 @@ ${path} /api/ability
反例-能力名已存在
[Tags] F
create session URI ${URL}
${content} POST请求结果 ${path} {"exploreSessionId":"${expId}","filteredStepIndices":[0],"draft":{"name":"outhagent","description":"自动化测试","parameters":[],"startPageUrl":"https://www.baidu.com","stepIndices":[0]}} 200 ${token}
${content} POST请求结果 ${path} {"exploreSessionId":"${expId}","filteredStepIndices":[0],"draft":{"name":"outhagent","description":"自动化测试","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":false,"stepInterval":1000,"autoFocus":false},"startPageUrl":"https://www.baidu.com/","stepIndices":[0]}} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} BAE0008
Should Be Equal As Strings ${content["message"]} 此能力名已存在
......@@ -51,5 +51,5 @@ ${path} /api/ability
Should Be Equal As Integers ${resp.status_code} 200
${content} Set Variable ${resp.json()}
log ${content}
Should Be Equal As Strings ${content["code"]} 500
Should Be Equal As Strings ${content["message"]} Server busy, please try later
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["message"]} 成功
......@@ -29,7 +29,7 @@ def get_expId(url,sessionId,streamId,token,timeout=180):
if localtime > starttime + timeout:
opdata = "获取探索id超时"
break
if 'EXP' in msg.data:
if 'EXP' in msg.data or 'TSK' in msg.data:
# print("Received Message:", msg.data)
opdata = json.loads(msg.data)
break
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论