更新时间:2025-12-12 GMT+08:00
分享

在CodeArts TestPlan接口脚本中调用WSRequest关键字

该关键字适用于Websocket客户端请求服务端操作。

参数

是否必选

参数类型

描述

Request Uri

是

String

websocket服务地址

Response Timeout

是

Long

响应超时时间

Header

是

String

请求头

Request Type

是

String

请求数据类型

Request Body

是

String

请求数据

Response Type

是

String

响应数据类型

WSRequest响应

状态:成功

参数

参数类型

描述

Body

String

WSRequest接口返回值

WSRequest响应示例

{ 
    "Write data to *** at port *** successfully! response: this is a response message." 
 }

默认检查点

名称

预期值

结果

成功

WSRequest使用示例

填写参数,访问websocker服务:

相关文档