文档首页/ 测试计划 CodeArts TestPlan/ 用户指南/ 配置CodeArts TestPlan测试用例/ 创建接口自动化测试用例/ 接口自动化用例系统关键字说明/ 在CodeArts TestPlan接口脚本中调用WSWriteOnly关键字
更新时间:2025-12-12 GMT+08:00
在CodeArts TestPlan接口脚本中调用WSWriteOnly关键字
该关键字适用于访问Websocket服务端进行只写操作。
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| Request Uri | 是 | String | websocket服务地址 |
| Response Timeout | 是 | Long | 响应超时时间 |
| Header | 是 | String | 请求头 |
| Request Type | 是 | String | 请求数据类型 |
| Request Body | 是 | String | 请求数据 |
WSWriteOnly响应
状态:成功
| 参数 | 参数类型 | 描述 |
|---|---|---|
| Body | String | WSWriteOnly接口返回值 |
WSWriteOnly响应示例
{
"Write data to *** at port *** successfully! response: this is a response message."
} 默认检查点
| 名称 | 预期值 |
|---|---|
| 结果 | 成功 |
WSWriteOnly使用示例
填写参数,访问websocker服务:
