资源:EvaluationContext
评估套件或测试用例的评估上下文。
| JSON 表示法 |
|---|
{
"name": string,
"displayName": string,
"description": string,
"store": string,
"menu": string,
"testSessionStartTime": string,
"mockClientExecutions": [
{
object ( |
| 字段 | |
|---|---|
name |
标识符。评估上下文的完整资源名称。格式:projects/{project}/locations/{location}/brands/{brand}/evaluationContexts/{evaluationContext} |
displayName |
必需。评估情境的直观易懂的名称。 |
description |
可选。评估上下文的说明。 |
store |
必需。用于评估案例的商店的完整资源名称。格式:projects/{projectId}/locations/{location}/brands/{brandId}/stores/{storeId} |
menu |
可选。用于评估上下文的可选菜单。如果未提供,则使用商店的默认菜单。格式:projects/{projectId}/locations/{location}/brands/{brandId}/menus/{menuId} |
testSessionStartTime |
可选。食品订购会话的可选注入开始时间。如果设置,评估会话将假定测试会话在此时间开始。用于模拟一天中特定时间段的订购行为。如果未设置,评估会话将使用当前时间作为开始时间。 采用 RFC 3339 标准,生成的输出将始终进行 Z 规范化(即转换为 UTC 零时区格式并在末尾附加 Z),并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例: |
mockClientExecutions[] |
可选。在评估会话期间,食品订购服务发送的客户端执行请求的可选模拟客户端执行响应。 |
daypartId |
可选。用于评估上下文的可选时段 ID。如果提供,代理将在建立流程顺序配置时使用此时段 ID。 |
MockClientExecution
表示模拟的客户端执行请求和响应对。如果评估运行中食品订购服务发送的请求与模拟请求匹配,则系统会将模拟响应返回给该服务。请注意,在匹配过程中,系统会忽略 request.execution_id,因为它特定于会话。
| JSON 表示法 |
|---|
{ "rawJsonRequest": { object }, "rawJsonResponse": { object } } |
| 字段 | |
|---|---|
rawJsonRequest |
可选。模拟客户端执行的请求。 |
rawJsonResponse |
可选。模拟客户端执行的响应。 |
方法 |
|
|---|---|
|
创建 EvaluationContext。 |
|
删除指定的 EvaluationContext。 |
|
获取 EvaluationContext。 |
|
列出 EvaluationContext。 |
|
更新指定的 EvaluationContext。 |