UiPath Documentation
test-manager
2024.10
false
Test Manager 用户指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

Webhooks

独立 Test Manager 的 Webhook 参考涵盖两个事件(创建缺陷和缺陷 KPI),以及有效负载合同和连接配置步骤。

Test Manager 提供了 Webhook,允许外部工具订阅 Test Manager 中的事件。

目前,支持以下事件。

  • 创建缺陷:每当用户从测试用例结果中调用“创建缺陷”任务时,都会触发此事件。它允许外部缺陷管理工具从测试结果中接收带有日志信息的缺陷报告。
  • 缺陷 KPI:刷新 Test Manager 仪表板上的缺陷 KPI 时调用此事件。这允许加入来自外部缺陷管理系统的统计信息,以显示在 Test Manager 仪表板上。

合同​

在本节中,您可以找到每个事件的请求和响应有效负载详细信息。

创建缺陷。​

Test Manager 使用以下有效负载触发已注册的 Webhook:

使用 Test Manager REST API 获取有关失败测试的详细信息,以将信息添加到创建的缺陷中。

Request:
CreateDefectFromTestCaseLogRequest{
testExecutionId    string($uuid)
testCaseId    string($uuid)
variationId    string
nullable: true
linkToTestCaseLog    string
nullable: true
}
Response:
Returns a defect payload to allow Test Manager to add a link to the created defect in the test case log.
Request:
CreateDefectFromTestCaseLogRequest{
testExecutionId    string($uuid)
testCaseId    string($uuid)
variationId    string
nullable: true
linkToTestCaseLog    string
nullable: true
}
Response:
Returns a defect payload to allow Test Manager to add a link to the created defect in the test case log.

缺陷 KPI​

Test Manager 使用以下有效负载触发已注册的 Webhook:

Request:
api/kpis/project/<projectid>/defectstatus
Response:
KPIConnectorDefectsDto{
totalDefects    integer($int32)
criticalDefects    integer($int32)
moderateDefects    integer($int32)
openDefects    integer($int32)
closedDefects    integer($int32)
status    ConnectorKPIStatusstring
Enum:
Array [ 3 ]
criticalDefectsLink    string
nullable: true
}
Request:
api/kpis/project/<projectid>/defectstatus
Response:
KPIConnectorDefectsDto{
totalDefects    integer($int32)
criticalDefects    integer($int32)
moderateDefects    integer($int32)
openDefects    integer($int32)
closedDefects    integer($int32)
status    ConnectorKPIStatusstring
Enum:
Array [ 3 ]
criticalDefectsLink    string
nullable: true
}

配置 Webhook 连接​

  1. 以管理员身份登录 Test Manager。
  2. 打开项目。
  3. Navigate to Project Settings > Integration.
  4. 选择 New Connection(新建连接),然后从下拉列表中选择 Webhook。
  5. 配置以下连接设置:
    • Name: Enter a name for your WebHook connection.

    • 说明(可选): 添加说明以供参考。

    • Payload URL: Add the endpoint server URL. For example: https://company-name-serverRegion.cloudapp.azure.com.

    • Authentication Header Type: Select a hashing method between Client Secret and HMACSHA256.

    • Secret: Enter your client secret value.

    • Allow Insecure SSL: Choose whether to allow endpoints with insecure SSL connections.

    • Supports Defect Dashboard: Choose if KPIs needs to be shown in the project dashboard.

  6. 选择“保存”。
  7. 选择连接以展开面板,然后复制 API 密钥以备后用。

管理 WebHook 连接​

下表列出了可以用来管理 WebHooks 连接的操作。

操作

描述

程序

编辑

编辑连接设置。

  1. 以管理员身份登录 Test Manager。
  2. 打开项目。
  3. 前往“项目设置” 。
  4. 在“集成”列表中,单击 WebHook 连接以展开面板。
  5. 单击“编辑”以配置连接。
  6. 单击“保存”以确认。

删除

删除选定的连接及其关联的要求。

  1. 以管理员身份登录 Test Manager。
  2. 打开项目。
  3. 前往“项目设置” 。
  4. 在“集成”列表中,单击 WebHook 连接以展开面板。
  5. 单击“删除”以删除连接。
  6. 单击“确定”以确认。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新