UiPath Documentation
uipath-cli
latest
false
UiPath CLI ユーザー ガイド
重要 :
このコンテンツは機械翻訳によって処理されています。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

uip tm objectlabel

「uip tm objectlabel」の構文とオプション - テスト ケースや要件など、Test Manager オブジェクトに付加されたラベルを管理します。

uip tm objectlabel は、Test Manager オブジェクト (要件、テスト ケース、テスト セット、テスト実行、テスト ケースのログ) に添付されるラベルを管理します。ラベルは自由形式の文字列で、フィルター処理や検索のためにオブジェクトにタグを付けたりグループ化したりするために使用します。

重要:

--project-key と --object-type は、このグループ内の すべての動詞に必須 です。 getを含む。--object-ids と --labels は全体的に複数形でスペースで区切られています。単数形の --object-id と --label は存在しません。

概要​

uip tm objectlabel list --project-key <key> --object-type <type> [--object-ids <uuid...>] [--label-types <types...>] [--filter <text>] [--sort-by <expr>] [--limit <n>] [--offset <n>]
uip tm objectlabel get --project-key <key> --object-type <type> --label-id <uuid>
uip tm objectlabel add --project-key <key> --object-type <type> --object-ids <uuid...> --labels <name...> [--label-type <type>] [--remove-other-labels]
uip tm objectlabel remove --project-key <key> --object-type <type> --object-ids <uuid...> (--labels <name...> | --remove-all-labels) [-y]
uip tm objectlabel list --project-key <key> --object-type <type> [--object-ids <uuid...>] [--label-types <types...>] [--filter <text>] [--sort-by <expr>] [--limit <n>] [--offset <n>]
uip tm objectlabel get --project-key <key> --object-type <type> --label-id <uuid>
uip tm objectlabel add --project-key <key> --object-type <type> --object-ids <uuid...> --labels <name...> [--label-type <type>] [--remove-other-labels]
uip tm objectlabel remove --project-key <key> --object-type <type> --object-ids <uuid...> (--labels <name...> | --remove-all-labels) [-y]

すべての動詞は、 グローバル オプション と標準の 終了コードを尊重します。すべての動詞は、 --log-level <level> (既定 Information) と -t, --tenant <name> (既定では認証済みテナント) を受け入れます。

--object-type Requirement、 TestCase、 TestSet、 TestExecution、または TestCaseLogを使用できます。--label-type/--label-types は、この CLI の他の場所で使用されている PascalCase 形式ではなく、 、 systemLabel、 internalLabel userLabelワイヤ形式の値を受け入れます。

uip tm objectlabel list​

1 つのオブジェクトの種類に対して使用されている 一意のラベル名 を一覧表示します (ページ分割)。ラベルの割り当て行は返されません。1 つの行の詳細には get を使用します。

引数​

設定はありません。

オプション​

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --object-type <type> (必須) — ラベルのリストを取得するオブジェクトの種類です。
  • --object-ids <uuid...> — これらのオブジェクトに割り当てられているラベル (スペース区切り) に制限します。オブジェクトの種類全体を検索する場合は省略します。
  • --label-types <type...> — ラベルの種類 (userLabel、 systemLabel、 internalLabel、 スペース区切り) でフィルター処理します。既定値は userLabel + systemLabelです。
  • --filter <text> — ラベル名を照合するためのプレフィックスです (サーバー側の StartsWith、一般的な部分文字列検索ではありません)。
  • --sort-by <expr> — 並べ替え式 (例: name asc)。
  • --limit <n> — ページ サイズ。既定値は [ 50です。
  • --offset <n> — スキップする結果。既定値は [ 0です。
uip tm objectlabel list \
  --project-key DEMO \
  --object-type TestCase \
  --filter smo \
  --limit 50
uip tm objectlabel list \
  --project-key DEMO \
  --object-type TestCase \
  --filter smo \
  --limit 50

データシェイプ​

{
  "Code": "ObjectLabelsList",
  "Data": [
    { "Name": "smoke" },
    { "Name": "smoke-test" }
  ]
}
{
  "Code": "ObjectLabelsList",
  "Data": [
    { "Name": "smoke" },
    { "Name": "smoke-test" }
  ]
}

各行は単なる{ "Name": "<label>" }です。listによってId、ObjectId、またはLabelTypeは返されません。特定の割り当て行の詳細 ( Idを含む) を取得するには、 を使用します objectlabel get。

uip tm objectlabel get​

割り当て UUID で 1 つのラベル割り当て行を取得します。

引数​

設定はありません。

オプション​

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --object-type <type> (必須) — ラベルが属するオブジェクトの種類です。
  • --label-id <uuid> (必須) — ラベル割り当て行の UUID です。これは割り当てレコードの UUID であり、ラベル名ではありません。
uip tm objectlabel get \
  --project-key DEMO \
  --object-type TestCase \
  --label-id a1b2c3d4-0000-0000-0000-000000000001
uip tm objectlabel get \
  --project-key DEMO \
  --object-type TestCase \
  --label-id a1b2c3d4-0000-0000-0000-000000000001

データシェイプ​

{
  "Code": "ObjectLabelGet",
  "Data": {
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "ProjectId": "p1",
    "ObjectId": "f9e8d7c6-0000-0000-0000-000000000001",
    "ObjectType": "TestCase",
    "Name": "smoke",
    "Description": "",
    "LabelType": "UserLabel"
  }
}
{
  "Code": "ObjectLabelGet",
  "Data": {
    "Id": "a1b2c3d4-0000-0000-0000-000000000001",
    "ProjectId": "p1",
    "ObjectId": "f9e8d7c6-0000-0000-0000-000000000001",
    "ObjectType": "TestCase",
    "Name": "smoke",
    "Description": "",
    "LabelType": "UserLabel"
  }
}

--label-type/--label-types 入力フラグがキャメルケースのワイヤ形式をとっている場合でも、この応答のLabelTypeはパスカルケース(UserLabel、SystemLabel、InternalLabel)です。

uip tm objectlabel add​

ラベルを 1 つ以上のオブジェクトに追加します。--label-typeが合格するかどうかによって 2 つの異なる動作があります。

  • --label-typeなし (既定): すべてのオブジェクトとラベルに対する 1 回の一括追加呼び出し。これを信頼できるセットにするために--remove-other-labelsを渡します。追加後、これらのオブジェクトの--labelsにない非システム ラベルはすべて削除されます。
  • --label-typeの場合: 各ラベルは個別に割り当てられるため (すべてのオブジェクト×ラベルのペアをループ処理)、特定のラベルの種類を記録できます。このモードでは--remove-other-labelsは無視されます。

引数​

設定はありません。

オプション​

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --object-type <type> (必須) — オブジェクトタイプ。
  • --object-ids <uuid...> (必須) — ラベルを適用するスペースで区切られたオブジェクトUUID。
  • --labels <name...> (必須) — 追加するスペース区切りのラベル名です。
  • --label-type <type> — ラベルの種類 (userLabel、 systemLabel、 internalLabel)。設定すると、上記のペアごとの割り当てパスに切り替わります。
  • --remove-other-labels — 追加後、これらのオブジェクトの に存在しない非システム ラベルをすべて削除 --labels。--label-typeが設定されている場合は無視されます。
# Bulk add — multiple labels to multiple objects in one call
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels smoke regression

# With a specific label type — assigns each label individually
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels smoke \
  --label-type systemLabel
# Bulk add — multiple labels to multiple objects in one call
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels smoke regression

# With a specific label type — assigns each label individually
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels smoke \
  --label-type systemLabel

データシェイプ​

{
  "Code": "ObjectLabelsAdd",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 2,
    "Result": "Added"
  }
}
{
  "Code": "ObjectLabelsAdd",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 2,
    "Result": "Added"
  }
}

--label-typeが渡されると、応答には以下が含まれます。

{
  "Code": "ObjectLabelsAdd",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "LabelType": "systemLabel",
    "Result": "Added"
  }
}
{
  "Code": "ObjectLabelsAdd",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "LabelType": "systemLabel",
    "Result": "Added"
  }
}

uip tm objectlabel remove​

1 つ以上のオブジェクトからラベルを削除します。これは 破壊的な 操作であり、 -y, --yesが必要です。CLI はプロンプトを表示しません。特定のラベルを削除する --labels を指定するか、指定したオブジェクトからすべての非システム ラベルをクリアする --remove-all-labels を指定します。この 2 つは相互に排他的です。

引数​

設定はありません。

オプション​

  • --project-key <key> (必須) — プロジェクトを所有しています。
  • --object-type <type> (必須) — オブジェクトタイプ。
  • --object-ids <uuid...> (必須) — スペースで区切られたオブジェクト UUID。
  • --labels <name...> — 削除するスペース区切りのラベル名です。--remove-all-labelsが設定されていない限り必須です。
  • --remove-all-labels — リストされたオブジェクトのシステム以外のラベルをすべてクリアします。--labelsと相互に排他的です。
  • -y, --yes — この元に戻せない操作を確定します。必須 — CLI はプロンプトを表示しません。
# remove specific labels
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels regression \
  --yes

# clear every non-system label
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --remove-all-labels \
  --yes
# remove specific labels
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels regression \
  --yes

# clear every non-system label
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --remove-all-labels \
  --yes

データシェイプ​

{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "Result": "Removed"
  }
}
{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "Result": "Removed"
  }
}

--remove-all-labelsの場合、応答は LabelCountではなく RemoveAllLabels を報告し、Result は次のようにAllRemovedされます。

{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "RemoveAllLabels": true,
    "Result": "AllRemoved"
  }
}
{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "RemoveAllLabels": true,
    "Result": "AllRemoved"
  }
}
  • 要件 — 要件にはオブジェクト ラベルを付けることができます。
  • customfield — ラベルの種類のカスタム フィールド値用の別のラベル メカニズム (customfield label) です。 objectlabelの自由形式のタグとは異なります。

参照​

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得