UiPath Documentation
uipath-cli
latest
false
UiPath-CLI-Benutzerhandbuch
Wichtig :
Dieser Inhalt wurde maschinell übersetzt. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

UIP-TM-Objektbeschriftung

Syntax und Optionen für „uip tm objectlabel“, das Beschriftungen verwaltet, die an Test Manager-Objekte wie Testfälle und Anforderungen angehängt sind.

uip tm objectlabel verwaltet Beschriftungen, die an Test Manager-Objekte angehängt sind (Anforderungen, Testfälle, Testsätze, Testausführungen und Testfallprotokolle). Bezeichnungen sind Freiform-Zeichenfolgen, die verwendet werden, um Objekte für die Filterung und Suche mit Tags zu versehen und zu gruppieren.

Wichtig:

Every verb in this group needs a project (--project-id or --project-key) and --object-type, including get. list, add, and remove take the plural, space-separated --object-ids; get takes a single --object-id. --labels is plural; there is no --label flag.

Zusammenfassung​

uip tm objectlabel list (--project-id <id> | --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-id <id> | --project-key <key>) --object-type <type> --object-id <uuid>
uip tm objectlabel add (--project-id <id> | --project-key <key>) --object-type <type> --object-ids <uuid...> --labels <name...> [--label-type <type>] [--remove-other-labels]
uip tm objectlabel remove (--project-id <id> | --project-key <key>) --object-type <type> --object-ids <uuid...> (--labels <name...> | --remove-all-labels) --yes
uip tm objectlabel list (--project-id <id> | --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-id <id> | --project-key <key>) --object-type <type> --object-id <uuid>
uip tm objectlabel add (--project-id <id> | --project-key <key>) --object-type <type> --object-ids <uuid...> --labels <name...> [--label-type <type>] [--remove-other-labels]
uip tm objectlabel remove (--project-id <id> | --project-key <key>) --object-type <type> --object-ids <uuid...> (--labels <name...> | --remove-all-labels) --yes

Alle Verben berücksichtigen die globalen Optionen und die Standardaustrittscodes. Jedes Verb akzeptiert --log-level <level> (Standard: Information).

When you pass both --project-id and --project-key, --project-id wins. If you pass neither, the command fails with ErrorCode: invalid_argument.

--object-type accepts Requirement, TestCase, TestSet, TestExecution, or TestCaseLog. --label-types on list accepts the wire-form values userLabel, systemLabel, internalLabel, and generatedLabel; --label-type on add accepts only userLabel. Both take the wire form, not the PascalCase forms used elsewhere in this CLI.

UIP-TM-Objektbeschriftungsliste​

List distinct label names in use for one object type (paginated). This does not return label assignment rows — use get for the labels on one object.

Argumente​

Keine.

Optionen​

  • --project-id <id> — Test Manager project ID. Wins if --project-key is also given.
  • --project-key <key> — Test Manager project key (for example, DEMO). Ignored if --project-id is also given.
  • --object-type <type> (erforderlich) – Objekttyp, für den Beschriftungen aufgelistet werden sollen.
  • --object-ids <uuid...> – auf Beschriftungen beschränken, die diesen Objekten zugewiesen sind (durch Leerzeichen getrennt). Lassen Sie die Suche über den gesamten Objekttyp weg.
  • --label-types <type...> — label types to include (userLabel, systemLabel, internalLabel, generatedLabel, space-separated). The server always returns systemLabel, userLabel, and generatedLabel names and adds the types passed here, so this flag widens the result rather than narrowing it.
  • --filter <text> – Präfix zum Abgleich von Beschriftungsnamen mit (serverseitiges StartsWith, keine allgemeine Teilstring-Suche).
  • --sort-by <expr> – Sortierausdruck, z. B. name asc.
  • --limit <n> – Seitengröße. Die Standardeinstellung ist 50.
  • --offset <n> – Ergebnisse, die übersprungen werden sollen. Die Standardeinstellung ist 0.

Beispiel​

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

Datenform​

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

Each row is only { "Name": "<label>" } — list returns no Id, ObjectId, or LabelType. To see the labels on one object with their ids and label types, use objectlabel get.

Abrufen der UIP-TM-Objektbeschriftung​

Get the visible labels on one object — user, system, and generated labels — including label ids and label types. Internal labels are not returned. list returns distinct label names for an object type; get returns the full assignment rows for a single object.

Argumente​

Keine.

Optionen​

  • --project-id <id> — Test Manager project ID. Wins if --project-key is also given.
  • --project-key <key> — Test Manager project key (for example, DEMO). Ignored if --project-id is also given.
  • --object-type <type> (erforderlich) – Der Objekttyp, zu dem die Beschriftung gehört.
  • --object-id <uuid> (required) — object UUID, for example the Id from uip tm testcases list (or the list verb matching --object-type).

Beispiel​

uip tm objectlabel get \
  --project-key DEMO \
  --object-type TestCase \
  --object-id f9e8d7c6-0000-0000-0000-000000000001
uip tm objectlabel get \
  --project-key DEMO \
  --object-type TestCase \
  --object-id f9e8d7c6-0000-0000-0000-000000000001

Datenform​

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

Data is an array with one row per label on the object, and an empty array when the object has no visible labels. LabelType is PascalCase (UserLabel, SystemLabel, GeneratedLabel) even though the --label-type/--label-types input flags take the camelCase wire form.

UIP-TM Object Label Add​

Fügen Sie Beschriftungen zu einem oder mehreren Objekten hinzu. Zwei unterschiedliche Verhaltensweisen, je nachdem, ob --label-type übergeben wird:

  • Without --label-type (default): a single bulk-add call across all objects and labels. Pass --remove-other-labels to make this an authoritative set — after adding, any non-system labels on these objects that are not in --labels are deleted.
  • With --label-type userLabel: each label is assigned individually (one call per object × label pair). --remove-other-labels is ignored in this mode.

Argumente​

Keine.

Optionen​

  • --project-id <id> — Test Manager project ID. Wins if --project-key is also given.
  • --project-key <key> — Test Manager project key (for example, DEMO). Ignored if --project-id is also given.
  • --object-type <type> (erforderlich) – Objekttyp.
  • --object-ids <uuid...> (erforderlich) – durch Leerzeichen getrennte Objekt-UUIDs, auf die die Beschriftungen angewendet werden sollen.
  • --labels <name...> (erforderlich) – durch Leerzeichen getrennte Beschriftungsnamen.
  • --label-type <type> — label type. Only userLabel is accepted: objectlabel remove cannot detach a system label, so the CLI writes user labels only. When set, switches to the per-pair assign path described above.
  • --remove-other-labels – Löschen Sie nach dem Hinzufügen alle Nicht-System-Beschriftungen für diese Objekte, die nicht in --labels vorhanden sind. Wird ignoriert, wenn --label-type festgelegt ist.

Beispiele​

# Bulk add — multiple labels to multiple objects in one call
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels smoke regression

# With an explicit label type — assigns each label individually
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels smoke \
  --label-type userLabel
# Bulk add — multiple labels to multiple objects in one call
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels smoke regression

# With an explicit label type — assigns each label individually
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels smoke \
  --label-type userLabel

Datenform​

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

LabelCount counts distinct label names, case-insensitively. When --label-type is passed, the response includes it:

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

UIP-TM-Objektbeschriftung entfernen​

Remove user and generated labels from up to 100 objects. Pass --labels to remove specific labels, or --remove-all-labels to remove every user and generated label on the listed objects; the two are mutually exclusive, and one is required. Names match case-insensitively. The removal is irreversible and requires -y, --yes.

  • System labels are never removed. Matching system label names are reported in SkippedSystemLabels.
  • Internal label names, and names of label types the CLI doesn't recognize, are never sent. With --labels, requested internal names are reported in SkippedInternalLabels; with --remove-all-labels, user or generated labels that share a name with an internal label are kept and reported there.
  • remove reads the objects' labels before writing — at least two read requests per object, five objects at a time — so it needs read access to the listed objects. If the labels can't be read, or an object carries 500 or more label names, nothing is removed.
  • If a removal request fails partway through, the error message lists the labels already removed.

Argumente​

Keine.

Optionen​

  • --project-id <id> — Test Manager project ID. Wins if --project-key is also given.
  • --project-key <key> — Test Manager project key (for example, DEMO). Ignored if --project-id is also given.
  • --object-type <type> (erforderlich) – Objekttyp.
  • --object-ids <uuid...> (required) — space-separated object UUIDs. At most 100 distinct ids per call; duplicates are ignored.
  • --labels <name...> – durch Leerzeichen getrennte Beschriftungsnamen, die entfernt werden sollen. Erforderlich, es sei denn, --remove-all-labels ist festgelegt.
  • --remove-all-labels — remove the user and generated labels on the listed objects, except any that share a name with an internal label. System and internal labels are kept, unlike clear-all in the Test Manager UI. Mutually exclusive with --labels.
  • -y, --yes (required) — confirms the irreversible operation. The CLI never prompts; without --yes the command returns Result: "Failure" and exits 1.

Beispiele​

# remove specific labels
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels regression \
  --yes

# remove every user and generated label
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --remove-all-labels \
  --yes
# remove specific labels
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels regression \
  --yes

# remove every user and generated label
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --remove-all-labels \
  --yes

Datenform​

{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "RemovedLabels": ["regression"],
    "Result": "Removed"
  }
}
{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "RemovedLabels": ["regression"],
    "Result": "Removed"
  }
}

Mit --remove-all-labels:

{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "RemoveAllLabels": true,
    "RemovedLabels": ["regression", "smoke"],
    "SkippedSystemLabels": ["automated"],
    "Result": "AllRemoved"
  }
}
{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "RemoveAllLabels": true,
    "RemovedLabels": ["regression", "smoke"],
    "SkippedSystemLabels": ["automated"],
    "Result": "AllRemoved"
  }
}
FeldBeschreibung
ObjectCountNumber of distinct object ids processed.
LabelCountWith --labels, the number of distinct requested names (case-insensitive). Replaced by RemoveAllLabels: true with --remove-all-labels.
RemovedLabelsLabel names removed, sorted.
SkippedSystemLabelsSystem label names that matched and were kept. Omitted when empty.
SkippedInternalLabelsNames kept because they are, or share a name with, an internal label. Omitted when empty.
ResultRemoved, AllRemoved (with --remove-all-labels), or Skipped when nothing was removed.
  • requirements – Anforderungen können Objektbeschriftungen enthalten.
  • customfield – ein separater Beschriftungsmechanismus (customfield label) für benutzerdefinierte Feldwerte des Beschriftungstyps; sich von den Freiform-Tags von objectlabel unterscheidet.

Siehe auch​

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support(opens in new window)

Möchten Sie lernen? UiPath Academy(opens in new window)

Haben Sie Fragen? UiPath-Forum(opens in new window)

Auf dem neuesten Stand bleiben