---
title: "Add an app component to a test run."
method: PATCH
path: "/test-runs/{testRunId}/app-components"
tags: ["TestRun"]
---

# Add an app component to a test run.

`PATCH /test-runs/{testRunId}/app-components`

Add an app component to a test run by providing the resource Id, name and type.

## Path parameters

- `testRunId` string, required

## Query parameters

- `api-version` string, required

## Response `200`

The request has succeeded.

- TestRunAppComponents — Test run app component
  - `components` object, required — Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object }
  - `testRunId` string — Test run identifier
  - `createdDateTime` string, date-time — The creation datetime(RFC 3339 literal format).
  - `createdBy` string — The user that created.
  - `lastModifiedDateTime` string, date-time — The last Modified datetime(RFC 3339 literal format).
  - `lastModifiedBy` string — The user that last modified.

## Other responses

- `201` — The request has succeeded and a new resource has been created as a result.
- `default` — An unexpected error response.

---

[API](https://skmtc.dev/azure/apis/loadtestservice-loadtesting.md) · [All operations](https://skmtc.dev/azure/apis/loadtestservice-loadtesting/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/loadtestservice-loadtesting/revisions/a39805b6167f/schema)
