提交 37f762b5 authored 作者: 张孟夏's avatar 张孟夏

修改用例,以适应多环境测试

上级 8a515b95
......@@ -3,23 +3,24 @@ Library RequestsLibrary
*** Variables ***
${kfz} api_tester # 开发者账号
${kfz2} api_tester2 # 开发者账号2
${zh} api_test_admin # 租管账号
${tenant_code} API_test # 租户号
${sa} superAdmin # superAdmin账号
${URL} http://bitagent.sit.ninetechone.com
${client_id} a68ad587830d41aebf418a919006353e
*** Test Cases ***
token生成
Create Session URL http://accounts-4j.sit.ninetechone.com
${content} 生成token ${kfz} $SM4$Nd/e40vIS6UD9VMaSOmYGlrBORfo7r5/1z9D5d4E4es=$4MS$ ${tenant_code} #加密后的密码
Set Global Variable ${a_token} ${content["access_token"]} #开发者access_token
Set Global Variable ${token} Bearer ${content["access_token"]} #开发者token
${content} 生成token ${kfz2} $SM4$Nd/e40vIS6UD9VMaSOmYGlrBORfo7r5/1z9D5d4E4es=$4MS$ ${tenant_code} #加密后的密码
Set Global Variable ${token2} Bearer ${content["access_token"]} #开发者token
${content} 生成token ${zh} $SM4$Nd/e40vIS6UD9VMaSOmYGlrBORfo7r5/1z9D5d4E4es=$4MS$ ${tenant_code} #加密后的密码
Set Global Variable ${token} Bearer ${content["access_token"]} #开发者token
Set Global Variable ${zh_token} Bearer ${content["access_token"]} #租户管理员token
${content} 生成超管token ${sa} $SM4$tWWLyDEfYmpphWp4pM8ZUb1BubcyuHXfi2nrklSy27w=$4MS$ #加密后的密码
Set Global Variable ${sa_token} Bearer ${content["access_token"]} #超级管理员token
Set Global Variable ${URL} ${URL}
Set Global Variable ${clientId} ${client_id}
#Set Global Variable ${token} Bearer 1a5188ab-00d9-4f40-867f-6305485a1dcd
#Set Global Variable ${zh_token} Bearer 1a5188ab-00d9-4f40-867f-6305485a1dcd
[Teardown] Delete All Sessions
*** Keywords ***
......@@ -30,11 +31,3 @@ token生成
${resp} post On Session URL /oauth/token params=${data} headers=${header}
${content} Set Variable ${resp.json()}
[Return] ${content}
生成超管token
[Arguments] ${un} ${pw}
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded Sm4-Key=Qf7bSeptgg80KfKUhoCCZZeeVGm+L5CN1KL4S1fPyhQ=
${params} Evaluate json.loads('{"username":"${un}","password":"${pw}","scope":"all","client_id":"a68ad587830d41aebf418a919006353e","client_secret":"Ninetech@123","grant_type":"password"}') json
${resp} post On Session URL /oauth/token params=${params} headers=${header}
${content} Set Variable ${resp.json()}
[Return] ${content}
......@@ -12,7 +12,7 @@ ${path} /api/system/config/client
${content} GET请求结果 ${path} {} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Contain ${content["data"]} \"grpc_host\":\"192.168.110.211:9090\",\"grpc_use_ssl\":false
Should Contain ${content["data"]} grpc_use_ssl
反例-不传入token
[Tags] E
......@@ -20,7 +20,7 @@ ${path} /api/system/config/client
${content} GET请求结果 ${path} {} 200 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Contain ${content["data"]} \"grpc_host\":\"192.168.110.211:9090\",\"grpc_use_ssl\":false
Should Contain ${content["data"]} grpc_use_ssl
反例-传入错误的token
[Tags] E
......@@ -28,4 +28,4 @@ ${path} /api/system/config/client
${content} GET请求结果 ${path} {} 200 testtoken
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Contain ${content["data"]} \"grpc_host\":\"192.168.110.211:9090\",\"grpc_use_ssl\":false
Should Contain ${content["data"]} grpc_use_ssl
......@@ -12,7 +12,7 @@ ${path} /api/system/config/web
${content} GET请求结果 ${path} {} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
Comment Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
反例-不传入token
[Tags] E
......@@ -20,7 +20,7 @@ ${path} /api/system/config/web
${content} GET请求结果 ${path} {} 200 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
Comment Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
反例-传入错误的token
[Tags] E
......@@ -28,4 +28,4 @@ ${path} /api/system/config/web
${content} GET请求结果 ${path} {} 200 testtoken
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
Comment Should Contain ${content["data"]} \"supportVoiceMessage\":true,\"voiceMessageAppId\":\"55053e20\",\"authUrl\":\"http://accounts-4j.sit.ninetechone.com\"
......@@ -9,7 +9,7 @@ ${path} /api/system/health/client
正例-正常获取到客户端配置
[Tags] F
create session URI ${URL}
${content} GET请求结果 ${path} {"cid":"a68ad587830d41aebf418a919006353e"} 200 ${token}
${content} GET请求结果 ${path} {"cid":"${clientId}"} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["data"]} {'online': True}
......@@ -17,7 +17,7 @@ ${path} /api/system/health/client
反例-不传入token
[Tags] E
create session URI ${URL}
${content} GET请求结果 ${path} {"cid":"a68ad587830d41aebf418a919006353e"} 200 ${EMPTY}
${content} GET请求结果 ${path} {"cid":"${clientId}"} 200 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["data"]} {'online': True}
......@@ -25,7 +25,7 @@ ${path} /api/system/health/client
反例-传入错误的token
[Tags] E
create session URI ${URL}
${content} GET请求结果 ${path} {"cid":"a68ad587830d41aebf418a919006353e"} 200 testtoken
${content} GET请求结果 ${path} {"cid":"${clientId}"} 200 testtoken
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["data"]} {'online': True}
......
......@@ -9,7 +9,7 @@ ${path} /api/chatbot/create
正例-正常创建会话session
[Tags] F
create session URI ${URL}
${content} POST请求结果_data ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 200 ${token}
${content} POST请求结果_data ${path} {"workerId":"${clientId}"} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Set Global Variable ${sessionId} ${content["data"]}
......@@ -17,7 +17,7 @@ ${path} /api/chatbot/create
反例-传入无效的token
[Tags] E
create session URI ${URL}
${content} POST请求结果_data ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 401 {}
${content} POST请求结果_data ${path} {"workerId":"${clientId}"} 401 {}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -31,6 +31,6 @@ ${path} /api/chatbot/create
反例-传入空白token
[Tags] E
create session URI ${URL}
${content} POST请求结果_data ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 401 ${EMPTY}
${content} POST请求结果_data ${path} {"workerId":"${clientId}"} 401 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -17,7 +17,6 @@ ${md_file} testfile.md
${txt_file} testfile.txt
${xls_file} testfile.xls
${xlsx_file} testfile.xlsx
${clientId} a68ad587830d41aebf418a919006353e
*** Test Cases ***
正例-正常发送文字消息
......
......@@ -5,25 +5,24 @@ Library get_expId.py
*** Variables ***
${path} /api/chat/read
${clientId} a68ad587830d41aebf418a919006353e
*** Test Cases ***
正例-正常读取消息
[Tags] F
Sleep 60
Comment Sleep 10 性能测试时,这个接口只睡眠10秒不够后端处理
${resp} Get ExpId http://bitagent.sit.ninetechone.com/${path} ${sessionId} ${ex_streamId} ${token}
${resp} Get ExpId ${URL}/${path} ${sessionId} ${ex_streamId} ${token}
log ${resp}
Comment Should Contain ${resp["sessionId"]} P_TSK
Set Global Variable ${expId} ${resp["sessionId"]}
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 ${resp1} Get ExpId ${URL}/${path} ${expId} ${streamId} ${token}
Comment log ${resp1}
正例-正常读取对话消息
[Tags] F
${resp} Get Message http://bitagent.sit.ninetechone.com/${path} ${sessionId} ${text_streamId} ${token}
${resp} Get Message ${URL}/${path} ${sessionId} ${text_streamId} ${token}
log ${resp}
Should Contain ${resp}[0] 你好
Should Contain ${resp}[-1] 关闭
......
......@@ -12,6 +12,11 @@ ${path} /api/chat/voice-url
${content} GET请求结果 ${path} {} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
<<<<<<< .mine
Comment Should Contain ${content["data"]} https://iat-api.xfyun.cn
=======
>>>>>>> .theirs
反例-不传入token
[Tags] E
......
......@@ -23,6 +23,6 @@ ${path} /api/system/config
反例-传入错误的token
[Tags] E
create session URI ${URL}
${content} GET请求结果 ${path} {} 200
${content} GET请求结果 ${path} {} 200 testtoken
log ${content}
Should Be Equal As Strings ${content["code"]} 200 testtoken
Should Be Equal As Strings ${content["code"]} 200
......@@ -10,7 +10,7 @@ ${path} /api/explore/create
正例-正常创建探索会话
[Tags] F
create session URI ${URL}
${content} POST请求结果_params ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 200 ${token}
${content} POST请求结果_params ${path} {"workerId":"${clientId}"} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Set Global Variable ${EXPsessionId} ${content["data"]["sessionId"]}
......@@ -18,7 +18,7 @@ ${path} /api/explore/create
反例-传入无效的token
[Tags] E
create session URI ${URL}
${content} POST请求结果_params ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 401 {}
${content} POST请求结果_params ${path} {"workerId":"${clientId}"} 401 {}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -32,7 +32,7 @@ ${path} /api/explore/create
反例-传入空白token
[Tags] E
create session URI ${URL}
${content} POST请求结果_params ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 401 ${EMPTY}
${content} POST请求结果_params ${path} {"workerId":"${clientId}"} 401 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -40,13 +40,13 @@ ${path} /api/explore/create
[Tags] F
Sleep 10
create session URI ${URL}
${content} POST请求结果_data /api/chat/write {"sessionId":"${EXPsessionId}","text":"打开百度","workerId":"a68ad587830d41aebf418a919006353e"} 200 ${token}
${content} POST请求结果_data /api/chat/write {"sessionId":"${EXPsessionId}","text":"打开百度","workerId":"${clientId}"} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Set Global Variable ${EXP_streamId} ${content["data"]}
Sleep 60
Comment Sleep 10 性能测试时,这个接口只睡眠10秒不够后端处理
${resp} Get ExpId http://bitagent.sit.ninetechone.com/api/chat/read ${EXPsessionId} ${EXP_streamId} ${token}
${resp} Get ExpId ${URL}/api/chat/read ${EXPsessionId} ${EXP_streamId} ${token}
log ${resp}
Should Contain ${resp["sessionId"]} P_EXP
Set Global Variable ${expId_EXP} ${resp["sessionId"]}
......@@ -9,7 +9,7 @@ ${path} /api/explore_client/create
正例-正常创建客户端探索会话session
[Tags] F
create session URI ${URL}
${content} POST请求结果_params ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 200 ${token}
${content} POST请求结果_params ${path} {"workerId":"${clientId}"} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Set Global Variable ${EXPCsessionId} ${content["data"]["sessionId"]}
......@@ -17,7 +17,7 @@ ${path} /api/explore_client/create
反例-传入无效的token
[Tags] E
create session URI ${URL}
${content} POST请求结果_params ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 401 {}
${content} POST请求结果_params ${path} {"workerId":"${clientId}"} 401 {}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -31,6 +31,6 @@ ${path} /api/explore_client/create
反例-传入空白token
[Tags] E
create session URI ${URL}
${content} POST请求结果_params ${path} {"workerId":"a68ad587830d41aebf418a919006353e"} 401 ${EMPTY}
${content} POST请求结果_params ${path} {"workerId":"${clientId}"} 401 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -4,7 +4,6 @@ Resource res_zmx.resource
*** Variables ***
${path} /api/v1/ability/steps
${clientId} a68ad587830d41aebf418a919006353e
*** Test Cases ***
正例-获取步骤列表
......
......@@ -9,14 +9,14 @@ ${path} /api/v1/ability/draft
正例-创建能力草稿
[Tags] F
create session URI ${URL}
${content} POST请求结果 ${path} {"session_id":"${EXPsessionId}","filtered_step_indices":[0],"client_id":"a68ad587830d41aebf418a919006353e"} 200 ${token}
${content} POST请求结果 ${path} {"session_id":"${EXPsessionId}","filtered_step_indices":[0],"client_id":"${clientId}"} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
反例-不传入token
[Tags] E
create session URI ${URL}
${content} POST请求结果 ${path} {"session_id":"${EXPsessionId}","filtered_step_indices":[0],"client_id":"a68ad587830d41aebf418a919006353e"} 401 {}
${content} POST请求结果 ${path} {"session_id":"${EXPsessionId}","filtered_step_indices":[0],"client_id":"${clientId}"} 401 {}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......
......@@ -14,6 +14,7 @@ ${path} /api/ability
create session URI ${URL}
${content} POST请求结果 ${path} {"exploreSessionId":"${EXPsessionId}","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}
Set Global Variable ${ability_name} ${random_string}
Should Be Equal As Strings ${content["code"]} 200
Set Global Variable ${bid} ${content["data"]}
......@@ -41,7 +42,7 @@ ${path} /api/ability
反例-能力名已存在
[Tags] F
create session URI ${URL}
${content} POST请求结果 ${path} {"exploreSessionId":"${EXPsessionId}","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}
${content} POST请求结果 ${path} {"exploreSessionId":"${EXPsessionId}","filteredStepIndices":[0],"draft":{"name":"${ability_name}","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"]} 此能力名已存在
......@@ -9,22 +9,21 @@ ${path} /api/v1/ability/detail
正例-获取能力详情
[Tags] F
create session URI ${URL}
${content} GET请求结果 ${path}/221 {} 200 ${token}
${content} GET请求结果 ${path}/${bid} {} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["data"]["name"]} outhagent
反例-传入空白token
[Tags] E
create session URI ${URL}
${content} GET请求结果 ${path}/221 {} 401 {}
${content} GET请求结果 ${path}/${bid} {} 401 {}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
反例-不传入token
[Tags] E
create session URI ${URL}
${content} GET请求结果 ${path}/221 {} 401 ${EMPTY}
${content} GET请求结果 ${path}/${bid} {} 401 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......
......@@ -10,7 +10,7 @@ ${path} /api/v1/ability/update
[Tags] F
${secs1} Get Time epoch
create session URI ${URL}
${content} POST请求结果 ${path} {"id":221,"active":true,"name":"outhagent","description":"此能力用于在百度搜索引擎中输入指定的关键词并获取搜索结果。用户只需提供关键词,系统将自动完成搜索操作并返回搜索结果。适用于需要快速获取百度搜索结果的场景。${secs1}","created_at":"2025-08-08T14:51:48","start_page_url":"https://www.baidu.com","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"steps":[{"activity_name":"起始页面","activity_icon":"open_browser","purpose":"打开百度首页以进行搜索","state":"ok","started_at":"2025-08-08T14:50:12.574046","ended_at":"2025-08-08T14:50:13.312051","duration":0,"files":null,"datas":null,"screenshots":["http://bitagent.sit.ninetechone.com/resources/common//P_TSK_497_local/afe2d22a43df4e568147767658f3112d/explore_step_0_0.jpeg"],"screenshot_remarks":null}]} 200 ${token}
${content} POST请求结果 ${path} {"id":${bid},"active":true,"name":"outhagent","description":"此能力用于在百度搜索引擎中输入指定的关键词并获取搜索结果。用户只需提供关键词,系统将自动完成搜索操作并返回搜索结果。适用于需要快速获取百度搜索结果的场景。${secs1}","created_at":"2025-08-08T14:51:48","start_page_url":"https://www.baidu.com","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false}} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["data"]} True
......@@ -19,7 +19,7 @@ ${path} /api/v1/ability/update
[Tags] E
${secs1} Get Time epoch
create session URI ${URL}
${content} POST请求结果 ${path} {"id":221,"active":true,"name":"outhagent","description":"此能力用于在百度搜索引擎中输入指定的关键词并获取搜索结果。用户只需提供关键词,系统将自动完成搜索操作并返回搜索结果。适用于需要快速获取百度搜索结果的场景。${secs1}","created_at":"2025-08-08T14:51:48","start_page_url":"https://www.baidu.com","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"steps":[{"activity_name":"起始页面","activity_icon":"open_browser","purpose":"打开百度首页以进行搜索","state":"ok","started_at":"2025-08-08T14:50:12.574046","ended_at":"2025-08-08T14:50:13.312051","duration":0,"files":null,"datas":null,"screenshots":["http://bitagent.sit.ninetechone.com/resources/common//P_TSK_497_local/afe2d22a43df4e568147767658f3112d/explore_step_0_0.jpeg"],"screenshot_remarks":null}]} 401 ${EMPTY}
${content} POST请求结果 ${path} {"id":${bid},"active":true,"name":"outhagent","description":"此能力用于在百度搜索引擎中输入指定的关键词并获取搜索结果。用户只需提供关键词,系统将自动完成搜索操作并返回搜索结果。适用于需要快速获取百度搜索结果的场景。${secs1}","created_at":"2025-08-08T14:51:48","start_page_url":"https://www.baidu.com","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false}} 401 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -27,7 +27,7 @@ ${path} /api/v1/ability/update
[Tags] E
${secs1} Get Time epoch
create session URI ${URL}
${content} POST请求结果 ${path} {"id":221,"active":true,"name":"outhagent","description":"此能力用于在百度搜索引擎中输入指定的关键词并获取搜索结果。用户只需提供关键词,系统将自动完成搜索操作并返回搜索结果。适用于需要快速获取百度搜索结果的场景。${secs1}","created_at":"2025-08-08T14:51:48","start_page_url":"https://www.baidu.com","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"steps":[{"activity_name":"起始页面","activity_icon":"open_browser","purpose":"打开百度首页以进行搜索","state":"ok","started_at":"2025-08-08T14:50:12.574046","ended_at":"2025-08-08T14:50:13.312051","duration":0,"files":null,"datas":null,"screenshots":["http://bitagent.sit.ninetechone.com/resources/common//P_TSK_497_local/afe2d22a43df4e568147767658f3112d/explore_step_0_0.jpeg"],"screenshot_remarks":null}]} 401 {}
${content} POST请求结果 ${path} {"id":${bid},"active":true,"name":"outhagent","description":"此能力用于在百度搜索引擎中输入指定的关键词并获取搜索结果。用户只需提供关键词,系统将自动完成搜索操作并返回搜索结果。适用于需要快速获取百度搜索结果的场景。${secs1}","created_at":"2025-08-08T14:51:48","start_page_url":"https://www.baidu.com","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false}} 401 {}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -35,6 +35,6 @@ ${path} /api/v1/ability/update
[Tags] E
${secs1} Get Time epoch
create session URI ${URL}
${content} POST请求结果 ${path} {"active":true,"name":"outhagent","description":"此能力用于在百度搜索引擎中输入指定的关键词并获取搜索结果。用户只需提供关键词,系统将自动完成搜索操作并返回搜索结果。适用于需要快速获取百度搜索结果的场景。${secs1}","created_at":"2025-08-08T14:51:48","start_page_url":"https://www.baidu.com","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"steps":[{"activity_name":"起始页面","activity_icon":"open_browser","purpose":"打开百度首页以进行搜索","state":"ok","started_at":"2025-08-08T14:50:12.574046","ended_at":"2025-08-08T14:50:13.312051","duration":0,"files":null,"datas":null,"screenshots":["http://bitagent.sit.ninetechone.com/resources/common//P_TSK_497_local/afe2d22a43df4e568147767658f3112d/explore_step_0_0.jpeg"],"screenshot_remarks":null}]} 422 ${token}
${content} POST请求结果 ${path} {"active":true,"name":"outhagent","description":"此能力用于在百度搜索引擎中输入指定的关键词并获取搜索结果。用户只需提供关键词,系统将自动完成搜索操作并返回搜索结果。适用于需要快速获取百度搜索结果的场景。${secs1}","created_at":"2025-08-08T14:51:48","start_page_url":"https://www.baidu.com","parameters":[],"outputs":[],"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false}} 422 ${token}
log ${content}
Should Be Equal As Strings ${content["detail"][0]["type"]} missing
......@@ -12,7 +12,6 @@ ${path} /api/v1/web_instruction/list
${content} GET请求结果 ${path} {} 200 ${zh_token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["data"][-1]["id"]} ${WI_id}
反例-传入空白token
[Tags] E
......
......@@ -9,7 +9,7 @@ ${path} /api/v1/task/create
正例-正常创建任务
[Tags] F
create session URI ${URL}
${content} POST请求结果 ${path} {"ability_id":221,"executor_type":"client","dispatch_type":"immediate","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 200 ${token}
${content} POST请求结果 ${path} {"ability_id":${bid},"executor_type":"client","dispatch_type":"immediate","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Set Global Variable ${task_id} ${content["data"]}
......@@ -17,14 +17,14 @@ ${path} /api/v1/task/create
反例-不传入token
[Tags] E
create session URI ${URL}
${content} POST请求结果 ${path} {"ability_id":221,"executor_type":"client","dispatch_type":"immediate","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 401 ${EMPTY}
${content} POST请求结果 ${path} {"ability_id":${bid},"executor_type":"client","dispatch_type":"immediate","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 401 ${EMPTY}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
反例-传入空白token
[Tags] E
create session URI ${URL}
${content} POST请求结果 ${path} {"ability_id":221,"executor_type":"client","dispatch_type":"immediate","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 401 {}
${content} POST请求结果 ${path} {"ability_id":${bid},"executor_type":"client","dispatch_type":"immediate","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 401 {}
log ${content}
Should Be Equal As Strings ${content["code"]} 401
......@@ -38,13 +38,13 @@ ${path} /api/v1/task/create
反例-不传入executor_type参数
[Tags] E
create session URI ${URL}
${content} POST请求结果 ${path} {"ability_id":221,"dispatch_type":"immediate","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 422 ${token}
${content} POST请求结果 ${path} {"ability_id":${bid},"dispatch_type":"immediate","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 422 ${token}
log ${content}
Should Be Equal As Strings ${content["detail"][0]["type"]} missing
反例-不传入dispatch_type参数
[Tags] E
create session URI ${URL}
${content} POST请求结果 ${path} {"ability_id":221,"executor_type":"client","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 422 ${token}
${content} POST请求结果 ${path} {"ability_id":${bid},"executor_type":"client","parameters":{},"extensions":{"skipError":false,"useIncognito":false,"closePage":true,"stepInterval":1000,"autoFocus":false},"outputs_schema":[]} 422 ${token}
log ${content}
Should Be Equal As Strings ${content["detail"][0]["type"]} missing
......@@ -13,7 +13,6 @@ ${path} /api/v1/ability/page
${content} POST请求结果 ${path} {"page_index":0,"page_size":10} 200 ${token}
log ${content}
Should Be Equal As Strings ${content["code"]} 200
Should Be Equal As Strings ${content["data"][0]["name"]} outhagent
反例-不传入token
[Tags] E
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论