@uipath/test-manager-tool 1.202.1 → 1.203.0-preview.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.js +1 -1
- package/dist/{tool-e10p1581.js → tool-5gpp9znw.js} +569 -206
- package/dist/tool.js +1 -1
- package/package.json +3 -2
|
@@ -11178,8 +11178,9 @@ var require_lib3 = __commonJS(function(exports, module) {
|
|
|
11178
11178
|
// package.json
|
|
11179
11179
|
var package_default = {
|
|
11180
11180
|
name: "@uipath/test-manager-tool",
|
|
11181
|
+
author: "UiPath",
|
|
11181
11182
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
11182
|
-
version: "1.
|
|
11183
|
+
version: "1.203.0-preview.180",
|
|
11183
11184
|
description: "Manage test cases, test sets, executions, and results.",
|
|
11184
11185
|
private: false,
|
|
11185
11186
|
repository: {
|
|
@@ -11738,7 +11739,7 @@ var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{1
|
|
|
11738
11739
|
var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
11739
11740
|
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
11740
11741
|
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
11741
|
-
var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
11742
|
+
var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
11742
11743
|
var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
11743
11744
|
var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
11744
11745
|
var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
@@ -11785,7 +11786,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
|
|
|
11785
11786
|
`(?<![A-Za-z0-9])"(?:[^\\
|
|
11786
11787
|
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
11787
11788
|
].join("|"), "g");
|
|
11788
|
-
var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
11789
|
+
var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
|
|
11789
11790
|
var COLLAPSED_BODY = "{…}";
|
|
11790
11791
|
var COLLAPSED_BODY_MARKER = "\x01body\x01";
|
|
11791
11792
|
var MAX_BODY_NESTING = 8;
|
|
@@ -11800,10 +11801,13 @@ function collapseJsonBodies(text) {
|
|
|
11800
11801
|
}
|
|
11801
11802
|
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
11802
11803
|
}
|
|
11803
|
-
var TRAILING_PROSE_PUNCT =
|
|
11804
|
+
var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
|
|
11804
11805
|
function peelTrailingPunctuation(match) {
|
|
11805
|
-
|
|
11806
|
-
|
|
11806
|
+
let end = match.length;
|
|
11807
|
+
while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
|
|
11808
|
+
end -= 1;
|
|
11809
|
+
}
|
|
11810
|
+
return [match.slice(0, end), match.slice(end)];
|
|
11807
11811
|
}
|
|
11808
11812
|
function redactUrl(raw) {
|
|
11809
11813
|
try {
|
|
@@ -12106,6 +12110,22 @@ function parseHttpStatusFromMessage(message) {
|
|
|
12106
12110
|
const status = Number(match[1]);
|
|
12107
12111
|
return Number.isInteger(status) && status >= 100 && status <= 599 ? status : undefined;
|
|
12108
12112
|
}
|
|
12113
|
+
function findHttpStatusInGraph(error) {
|
|
12114
|
+
for (const node of walkErrorGraph(error)) {
|
|
12115
|
+
const response = node.response;
|
|
12116
|
+
const explicit = typeof node.status === "number" ? node.status : response?.status;
|
|
12117
|
+
if (typeof explicit === "number" && explicit >= 400 && explicit <= 599) {
|
|
12118
|
+
return explicit;
|
|
12119
|
+
}
|
|
12120
|
+
if (typeof node.message === "string") {
|
|
12121
|
+
const parsed = parseHttpStatusFromMessage(node.message);
|
|
12122
|
+
if (parsed !== undefined && parsed >= 400) {
|
|
12123
|
+
return parsed;
|
|
12124
|
+
}
|
|
12125
|
+
}
|
|
12126
|
+
}
|
|
12127
|
+
return;
|
|
12128
|
+
}
|
|
12109
12129
|
function isHtmlDocument(body) {
|
|
12110
12130
|
return /^\s*(<!doctype html|<html\b)/i.test(body);
|
|
12111
12131
|
}
|
|
@@ -12219,7 +12239,8 @@ async function extractErrorDetails(error, options) {
|
|
|
12219
12239
|
}
|
|
12220
12240
|
let message;
|
|
12221
12241
|
let result = "Failure";
|
|
12222
|
-
const
|
|
12242
|
+
const classificationStatus = status ?? findHttpStatusInGraph(error);
|
|
12243
|
+
const classification = classifyError(classificationStatus, error);
|
|
12223
12244
|
let retry = classification.retry;
|
|
12224
12245
|
if (status === 401) {
|
|
12225
12246
|
message = DEFAULT_401;
|
|
@@ -12295,8 +12316,8 @@ async function extractErrorDetails(error, options) {
|
|
|
12295
12316
|
details = describeThrownValue(error);
|
|
12296
12317
|
}
|
|
12297
12318
|
const context = {};
|
|
12298
|
-
if (
|
|
12299
|
-
context.httpStatus =
|
|
12319
|
+
if (classificationStatus) {
|
|
12320
|
+
context.httpStatus = classificationStatus;
|
|
12300
12321
|
}
|
|
12301
12322
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
12302
12323
|
context.errorCode = parsedBody.errorCode;
|
|
@@ -12878,7 +12899,8 @@ function readRegistryValue(keyPath, valueName) {
|
|
|
12878
12899
|
}
|
|
12879
12900
|
const [error, output] = catchError(() => execFileSync("reg", ["query", keyPath, "/v", valueName], {
|
|
12880
12901
|
encoding: "utf-8",
|
|
12881
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
12902
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
12903
|
+
windowsHide: true
|
|
12882
12904
|
}));
|
|
12883
12905
|
if (error) {
|
|
12884
12906
|
return "";
|
|
@@ -13582,28 +13604,32 @@ function isPlainRecord(value) {
|
|
|
13582
13604
|
const prototype = Object.getPrototypeOf(value);
|
|
13583
13605
|
return prototype === Object.prototype || prototype === null;
|
|
13584
13606
|
}
|
|
13585
|
-
function
|
|
13607
|
+
function splitPagedEnvelope(value) {
|
|
13586
13608
|
if (Array.isArray(value) || !isPlainRecord(value))
|
|
13587
13609
|
return null;
|
|
13588
|
-
const entries = Object.
|
|
13610
|
+
const entries = Object.entries(value);
|
|
13589
13611
|
if (entries.length === 0)
|
|
13590
13612
|
return null;
|
|
13591
|
-
let
|
|
13592
|
-
|
|
13593
|
-
for (const entry of entries) {
|
|
13613
|
+
let found = null;
|
|
13614
|
+
const meta = Object.create(null);
|
|
13615
|
+
for (const [key, entry] of entries) {
|
|
13594
13616
|
if (Array.isArray(entry)) {
|
|
13595
|
-
if (
|
|
13617
|
+
if (found !== null)
|
|
13596
13618
|
return null;
|
|
13597
|
-
|
|
13619
|
+
found = { key, rows: entry };
|
|
13598
13620
|
} else if (entry !== null && typeof entry === "object") {
|
|
13599
13621
|
return null;
|
|
13600
13622
|
} else {
|
|
13601
|
-
|
|
13623
|
+
meta[key] = entry;
|
|
13602
13624
|
}
|
|
13603
13625
|
}
|
|
13604
|
-
if (
|
|
13626
|
+
if (found === null || Object.keys(meta).length === 0)
|
|
13605
13627
|
return null;
|
|
13606
|
-
return
|
|
13628
|
+
return { ...found, meta };
|
|
13629
|
+
}
|
|
13630
|
+
function extractPagedRows(value) {
|
|
13631
|
+
const paged = splitPagedEnvelope(value);
|
|
13632
|
+
return paged === null ? null : paged.rows;
|
|
13607
13633
|
}
|
|
13608
13634
|
function toLowerCamelCaseKey(key) {
|
|
13609
13635
|
if (!key)
|
|
@@ -13707,6 +13733,9 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
13707
13733
|
}
|
|
13708
13734
|
break;
|
|
13709
13735
|
}
|
|
13736
|
+
case "markdown":
|
|
13737
|
+
logFn(renderMarkdown(data));
|
|
13738
|
+
break;
|
|
13710
13739
|
default: {
|
|
13711
13740
|
const hasData = "Data" in data && data.Data != null;
|
|
13712
13741
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
@@ -13731,6 +13760,10 @@ function logOutput(data, format = "json", tableRowStyle) {
|
|
|
13731
13760
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
13732
13761
|
`), needsAsciiSafeJson(sink), styleFn);
|
|
13733
13762
|
}
|
|
13763
|
+
var PLUMBING_KEYS = new Set(["code", "log"]);
|
|
13764
|
+
function isPlumbingKey(key) {
|
|
13765
|
+
return PLUMBING_KEYS.has(key.toLowerCase());
|
|
13766
|
+
}
|
|
13734
13767
|
function cellToString(val) {
|
|
13735
13768
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
13736
13769
|
}
|
|
@@ -13746,7 +13779,7 @@ function wrapText(text, width) {
|
|
|
13746
13779
|
function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
13747
13780
|
if (data.length === 0)
|
|
13748
13781
|
return;
|
|
13749
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
13782
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
13750
13783
|
const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
|
|
13751
13784
|
const header = keys.map((key, i) => key.padEnd(maxWidths[i])).join(" | ");
|
|
13752
13785
|
logFn(header);
|
|
@@ -13768,7 +13801,7 @@ function isNonEmptyPlainObject(value) {
|
|
|
13768
13801
|
}
|
|
13769
13802
|
var NESTED_INDENT = " ";
|
|
13770
13803
|
function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
13771
|
-
const keys = Object.keys(data).filter((key) => !
|
|
13804
|
+
const keys = Object.keys(data).filter((key) => !isPlumbingKey(key));
|
|
13772
13805
|
if (keys.length === 0)
|
|
13773
13806
|
return;
|
|
13774
13807
|
const isBlockValue = (value) => isPlainObjectArray(value) || isNonEmptyPlainObject(value);
|
|
@@ -13799,7 +13832,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
|
|
|
13799
13832
|
function printResizableTable(data, logFn = console.log, externalLogValue, availableWidth, tableRowStyle) {
|
|
13800
13833
|
if (data.length === 0)
|
|
13801
13834
|
return;
|
|
13802
|
-
const keys = Object.keys(data[0]).filter((key) => !
|
|
13835
|
+
const keys = Object.keys(data[0]).filter((key) => !isPlumbingKey(key));
|
|
13803
13836
|
if (keys.length === 0)
|
|
13804
13837
|
return;
|
|
13805
13838
|
if (!process.stdout.isTTY) {
|
|
@@ -13873,6 +13906,220 @@ function printResizableTable(data, logFn = console.log, externalLogValue, availa
|
|
|
13873
13906
|
logFn(`Log: ${externalLogValue}`);
|
|
13874
13907
|
}
|
|
13875
13908
|
}
|
|
13909
|
+
var MARKDOWN_MAX_CELL = 200;
|
|
13910
|
+
var MARKDOWN_MAX_DEPTH = 3;
|
|
13911
|
+
function markdownHeading(depth) {
|
|
13912
|
+
return "#".repeat(Math.min(3 + depth, 6));
|
|
13913
|
+
}
|
|
13914
|
+
var BACKTICK_RUN = /`+/g;
|
|
13915
|
+
function fencedBlock(text) {
|
|
13916
|
+
const first = text.trimStart()[0];
|
|
13917
|
+
const language = first === "<" ? "xml" : first === "{" || first === "[" ? "json" : "";
|
|
13918
|
+
const longestRun = Math.max(0, ...Array.from(text.matchAll(BACKTICK_RUN), (match) => match[0].length));
|
|
13919
|
+
const fence = "`".repeat(Math.max(3, longestRun + 1));
|
|
13920
|
+
return `${fence}${language}
|
|
13921
|
+
${text}
|
|
13922
|
+
${fence}`;
|
|
13923
|
+
}
|
|
13924
|
+
function collapseNewlineRuns(text) {
|
|
13925
|
+
return text.split(/(\s+)/).map((part, index) => index % 2 === 1 && part.includes(`
|
|
13926
|
+
`) ? " " : part).join("");
|
|
13927
|
+
}
|
|
13928
|
+
function markdownCell(value) {
|
|
13929
|
+
const text = value instanceof Date ? value.toISOString() : cellToString(value);
|
|
13930
|
+
return collapseNewlineRuns(text).replace(/\|/g, "\\|");
|
|
13931
|
+
}
|
|
13932
|
+
function markdownLabel(key) {
|
|
13933
|
+
return collapseNewlineRuns(key).replace(/[\\`*|]/g, "\\$&");
|
|
13934
|
+
}
|
|
13935
|
+
function withoutPlumbing(record) {
|
|
13936
|
+
const kept = Object.create(null);
|
|
13937
|
+
for (const [key, value] of Object.entries(record)) {
|
|
13938
|
+
if (!isPlumbingKey(key))
|
|
13939
|
+
kept[key] = value;
|
|
13940
|
+
}
|
|
13941
|
+
return kept;
|
|
13942
|
+
}
|
|
13943
|
+
function rowsWithoutPlumbing(rows) {
|
|
13944
|
+
return rows.map((row) => isPlainRecord(row) ? withoutPlumbing(row) : row);
|
|
13945
|
+
}
|
|
13946
|
+
function markdownTable(rows) {
|
|
13947
|
+
const columns = [];
|
|
13948
|
+
const seen = new Set;
|
|
13949
|
+
for (const row of rows) {
|
|
13950
|
+
for (const key of Object.keys(row)) {
|
|
13951
|
+
if (!seen.has(key)) {
|
|
13952
|
+
seen.add(key);
|
|
13953
|
+
columns.push(key);
|
|
13954
|
+
}
|
|
13955
|
+
}
|
|
13956
|
+
}
|
|
13957
|
+
if (columns.length === 0)
|
|
13958
|
+
return null;
|
|
13959
|
+
const cells = rows.map((row) => columns.map((key) => markdownCell(row[key])));
|
|
13960
|
+
if (cells.some((row) => row.some((c) => c.length > MARKDOWN_MAX_CELL))) {
|
|
13961
|
+
return null;
|
|
13962
|
+
}
|
|
13963
|
+
return [
|
|
13964
|
+
`| ${columns.map(markdownLabel).join(" | ")} |`,
|
|
13965
|
+
`| ${columns.map(() => "---").join(" | ")} |`,
|
|
13966
|
+
...cells.map((row) => `| ${row.join(" | ")} |`)
|
|
13967
|
+
].join(`
|
|
13968
|
+
`);
|
|
13969
|
+
}
|
|
13970
|
+
function extractMessageSequence(rows) {
|
|
13971
|
+
const messages = [];
|
|
13972
|
+
for (const row of rows) {
|
|
13973
|
+
const message = extractSingleMessage(row);
|
|
13974
|
+
if (message === null)
|
|
13975
|
+
return null;
|
|
13976
|
+
messages.push(message);
|
|
13977
|
+
}
|
|
13978
|
+
return messages.join(`
|
|
13979
|
+
|
|
13980
|
+
`);
|
|
13981
|
+
}
|
|
13982
|
+
function markdownRows(rows, depth) {
|
|
13983
|
+
if (rows.length === 0)
|
|
13984
|
+
return "(none)";
|
|
13985
|
+
if (!isPlainObjectArray(rows)) {
|
|
13986
|
+
return rows.map((item) => `- ${markdownCell(item)}`).join(`
|
|
13987
|
+
`);
|
|
13988
|
+
}
|
|
13989
|
+
const prose = extractMessageSequence(rows);
|
|
13990
|
+
if (prose !== null)
|
|
13991
|
+
return prose;
|
|
13992
|
+
const table = markdownTable(rows);
|
|
13993
|
+
if (table !== null)
|
|
13994
|
+
return table;
|
|
13995
|
+
if (depth >= MARKDOWN_MAX_DEPTH) {
|
|
13996
|
+
return fencedBlock(JSON.stringify(rows, null, 2));
|
|
13997
|
+
}
|
|
13998
|
+
return rows.map((row, index) => [
|
|
13999
|
+
`${markdownHeading(depth)} ${index + 1}`,
|
|
14000
|
+
markdownObject(row, depth + 1)
|
|
14001
|
+
].join(`
|
|
14002
|
+
|
|
14003
|
+
`)).join(`
|
|
14004
|
+
|
|
14005
|
+
`);
|
|
14006
|
+
}
|
|
14007
|
+
function markdownObject(obj, depth) {
|
|
14008
|
+
const scalars = [];
|
|
14009
|
+
const blocks = [];
|
|
14010
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
14011
|
+
if (value === undefined)
|
|
14012
|
+
continue;
|
|
14013
|
+
const label = markdownLabel(key);
|
|
14014
|
+
if (Array.isArray(value)) {
|
|
14015
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
14016
|
+
|
|
14017
|
+
${markdownRows(value, depth + 1)}`);
|
|
14018
|
+
} else if (isNonEmptyPlainObject(value)) {
|
|
14019
|
+
const nested = depth < MARKDOWN_MAX_DEPTH ? markdownObject(value, depth + 1) : fencedBlock(JSON.stringify(value, null, 2));
|
|
14020
|
+
if (nested !== "") {
|
|
14021
|
+
blocks.push(`${markdownHeading(depth)} ${label}
|
|
14022
|
+
|
|
14023
|
+
${nested}`);
|
|
14024
|
+
}
|
|
14025
|
+
} else if (typeof value === "string" && value.includes(`
|
|
14026
|
+
`)) {
|
|
14027
|
+
blocks.push(`**${label}:**
|
|
14028
|
+
|
|
14029
|
+
${fencedBlock(value)}`);
|
|
14030
|
+
} else {
|
|
14031
|
+
scalars.push(`**${label}:** ${markdownCell(value)}`);
|
|
14032
|
+
}
|
|
14033
|
+
}
|
|
14034
|
+
const sections = scalars.length > 0 ? [scalars.join(`
|
|
14035
|
+
`)] : [];
|
|
14036
|
+
sections.push(...blocks);
|
|
14037
|
+
return sections.join(`
|
|
14038
|
+
|
|
14039
|
+
`);
|
|
14040
|
+
}
|
|
14041
|
+
function extractSingleMessage(payload) {
|
|
14042
|
+
if (!isPlainRecord(payload))
|
|
14043
|
+
return null;
|
|
14044
|
+
const keys = Object.keys(payload);
|
|
14045
|
+
if (keys.length !== 1 || keys[0].toLowerCase() !== "message")
|
|
14046
|
+
return null;
|
|
14047
|
+
const value = payload[keys[0]];
|
|
14048
|
+
return typeof value === "string" ? value : null;
|
|
14049
|
+
}
|
|
14050
|
+
function markdownPayload(payload) {
|
|
14051
|
+
const message = extractSingleMessage(payload);
|
|
14052
|
+
if (message !== null)
|
|
14053
|
+
return message;
|
|
14054
|
+
if (Array.isArray(payload)) {
|
|
14055
|
+
return markdownRows(rowsWithoutPlumbing(payload), 0);
|
|
14056
|
+
}
|
|
14057
|
+
const visible = withoutPlumbing(payload);
|
|
14058
|
+
const paged = splitPagedEnvelope(visible);
|
|
14059
|
+
if (paged !== null) {
|
|
14060
|
+
const meta = markdownObject(paged.meta, 0);
|
|
14061
|
+
const rows = `${markdownHeading(0)} ${markdownLabel(paged.key)}
|
|
14062
|
+
|
|
14063
|
+
${markdownRows(rowsWithoutPlumbing(paged.rows), 1)}`;
|
|
14064
|
+
return meta === "" ? rows : `${meta}
|
|
14065
|
+
|
|
14066
|
+
${rows}`;
|
|
14067
|
+
}
|
|
14068
|
+
return markdownObject(visible, 0);
|
|
14069
|
+
}
|
|
14070
|
+
function isPaginationWorthShowing(value) {
|
|
14071
|
+
if (typeof value !== "object" || value === null)
|
|
14072
|
+
return false;
|
|
14073
|
+
const page = value;
|
|
14074
|
+
return page.HasMore === true || typeof page.Offset === "number" && page.Offset > 0;
|
|
14075
|
+
}
|
|
14076
|
+
function markdownEnvelopeNotes(data) {
|
|
14077
|
+
const envelope = data;
|
|
14078
|
+
const notes = [];
|
|
14079
|
+
const warning = envelope.Warning;
|
|
14080
|
+
if (typeof warning === "string" && warning !== "") {
|
|
14081
|
+
notes.push(`> **Warning:** ${warning}`);
|
|
14082
|
+
}
|
|
14083
|
+
const instructions = envelope.Instructions;
|
|
14084
|
+
if (typeof instructions === "string" && instructions !== "") {
|
|
14085
|
+
notes.push(`> ${instructions}`);
|
|
14086
|
+
}
|
|
14087
|
+
const pagination = envelope.Pagination;
|
|
14088
|
+
if (isPaginationWorthShowing(pagination)) {
|
|
14089
|
+
const body = markdownObject(pagination, 1);
|
|
14090
|
+
if (body !== "") {
|
|
14091
|
+
notes.push(`${markdownHeading(0)} Pagination
|
|
14092
|
+
|
|
14093
|
+
${body}`);
|
|
14094
|
+
}
|
|
14095
|
+
}
|
|
14096
|
+
const log = envelope.Log;
|
|
14097
|
+
if (typeof log === "string" && log !== "") {
|
|
14098
|
+
notes.push(`**Log:** ${log}`);
|
|
14099
|
+
}
|
|
14100
|
+
return notes;
|
|
14101
|
+
}
|
|
14102
|
+
function renderMarkdown(data) {
|
|
14103
|
+
if (data.Result !== RESULTS.Success) {
|
|
14104
|
+
const failure = data;
|
|
14105
|
+
const sections = [`**Failed:** ${failure.Message}`];
|
|
14106
|
+
if (failure.Data != null) {
|
|
14107
|
+
sections.push(markdownPayload(failure.Data));
|
|
14108
|
+
}
|
|
14109
|
+
if (failure.Instructions) {
|
|
14110
|
+
sections.push(`> ${failure.Instructions}`);
|
|
14111
|
+
}
|
|
14112
|
+
return sections.filter((section) => section !== "").join(`
|
|
14113
|
+
|
|
14114
|
+
`);
|
|
14115
|
+
}
|
|
14116
|
+
if (!("Data" in data) || data.Data == null) {
|
|
14117
|
+
return markdownObject(withoutPlumbing(data), 0);
|
|
14118
|
+
}
|
|
14119
|
+
return [markdownPayload(data.Data), ...markdownEnvelopeNotes(data)].filter((section) => section !== "").join(`
|
|
14120
|
+
|
|
14121
|
+
`);
|
|
14122
|
+
}
|
|
13876
14123
|
function toYaml(data) {
|
|
13877
14124
|
const codec = getYamlCodec();
|
|
13878
14125
|
if (!codec) {
|
|
@@ -15763,8 +16010,9 @@ class TextApiResponse {
|
|
|
15763
16010
|
// ../test-manager-sdk/package.json
|
|
15764
16011
|
var package_default2 = {
|
|
15765
16012
|
name: "@uipath/test-manager-sdk",
|
|
16013
|
+
author: "UiPath",
|
|
15766
16014
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
15767
|
-
version: "1.
|
|
16015
|
+
version: "1.203.0",
|
|
15768
16016
|
repository: {
|
|
15769
16017
|
type: "git",
|
|
15770
16018
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -24402,16 +24650,7 @@ var resolveEnvFilePathAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) =
|
|
|
24402
24650
|
errorMessage: location.source === "absolute" ? `Environment file not found: ${envFilePath}` : `Unable to locate environment file: ${envFilePath}. Run 'uip login' to authenticate.`
|
|
24403
24651
|
};
|
|
24404
24652
|
};
|
|
24405
|
-
var
|
|
24406
|
-
const fs2 = getFileSystem();
|
|
24407
|
-
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
24408
|
-
if (!await fs2.exists(absolutePath)) {
|
|
24409
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
24410
|
-
}
|
|
24411
|
-
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
24412
|
-
if (content === null) {
|
|
24413
|
-
throw new Error(`Environment file not found: ${envPath}`);
|
|
24414
|
-
}
|
|
24653
|
+
var parseEnvContent = (content) => {
|
|
24415
24654
|
const env = {};
|
|
24416
24655
|
for (const line of content.split(`
|
|
24417
24656
|
`)) {
|
|
@@ -24432,6 +24671,18 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
24432
24671
|
}
|
|
24433
24672
|
return env;
|
|
24434
24673
|
};
|
|
24674
|
+
var loadEnvFileAsync = async ({ envPath }) => {
|
|
24675
|
+
const fs2 = getFileSystem();
|
|
24676
|
+
const absolutePath = fs2.path.isAbsolute(envPath) ? envPath : fs2.path.join(fs2.env.cwd(), envPath);
|
|
24677
|
+
if (!await fs2.exists(absolutePath)) {
|
|
24678
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
24679
|
+
}
|
|
24680
|
+
const content = await fs2.readFile(absolutePath, "utf-8");
|
|
24681
|
+
if (content === null) {
|
|
24682
|
+
throw new Error(`Environment file not found: ${envPath}`);
|
|
24683
|
+
}
|
|
24684
|
+
return parseEnvContent(content);
|
|
24685
|
+
};
|
|
24435
24686
|
var saveEnvFileAsync = async ({
|
|
24436
24687
|
envPath,
|
|
24437
24688
|
data,
|
|
@@ -25172,18 +25423,66 @@ async function initializeContext(options) {
|
|
|
25172
25423
|
configureLoggerFromOptions(options.logLevel);
|
|
25173
25424
|
return resolveAuth(options);
|
|
25174
25425
|
}
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25426
|
+
function selectProject(options) {
|
|
25427
|
+
if (options.projectId !== undefined) {
|
|
25428
|
+
const projectId = options.projectId.trim();
|
|
25429
|
+
if (projectId.length === 0) {
|
|
25430
|
+
OutputFormatter.error({
|
|
25431
|
+
Result: RESULTS.Failure,
|
|
25432
|
+
Message: "--project-id was empty.",
|
|
25433
|
+
Instructions: "Pass the project ID, or name the project with --project-key instead.",
|
|
25434
|
+
ErrorCode: "invalid_argument",
|
|
25435
|
+
Retry: "RetryWillNotFix"
|
|
25436
|
+
});
|
|
25437
|
+
processContext.exit(1);
|
|
25438
|
+
return null;
|
|
25439
|
+
}
|
|
25440
|
+
return { kind: "id", projectId };
|
|
25441
|
+
}
|
|
25442
|
+
if (options.projectKey !== undefined) {
|
|
25443
|
+
const projectKey = options.projectKey.trim();
|
|
25444
|
+
if (projectKey.length === 0) {
|
|
25445
|
+
OutputFormatter.error({
|
|
25446
|
+
Result: RESULTS.Failure,
|
|
25447
|
+
Message: "--project-key was empty.",
|
|
25448
|
+
Instructions: "Pass the project key, or name the project with --project-id instead.",
|
|
25449
|
+
ErrorCode: "invalid_argument",
|
|
25450
|
+
Retry: "RetryWillNotFix"
|
|
25451
|
+
});
|
|
25452
|
+
processContext.exit(1);
|
|
25453
|
+
return null;
|
|
25454
|
+
}
|
|
25455
|
+
return { kind: "key", projectKey };
|
|
25456
|
+
}
|
|
25457
|
+
const derivedKey = options.testSetKey?.split(":")[0]?.trim() || options.scenarioKey?.split(":")[0]?.trim();
|
|
25458
|
+
if (!derivedKey) {
|
|
25180
25459
|
OutputFormatter.error({
|
|
25181
25460
|
Result: RESULTS.Failure,
|
|
25182
|
-
Message: "
|
|
25461
|
+
Message: "No project was given.",
|
|
25462
|
+
Instructions: "Pass --project-id or --project-key (or --test-set-key / --scenario-key, on the commands that take one).",
|
|
25463
|
+
ErrorCode: "invalid_argument",
|
|
25464
|
+
Retry: "RetryWillNotFix"
|
|
25183
25465
|
});
|
|
25184
25466
|
processContext.exit(1);
|
|
25185
25467
|
return null;
|
|
25186
25468
|
}
|
|
25469
|
+
return { kind: "key", projectKey: derivedKey };
|
|
25470
|
+
}
|
|
25471
|
+
async function initializeContextWithProject(options) {
|
|
25472
|
+
configureLoggerFromOptions(options.logLevel);
|
|
25473
|
+
const selection = selectProject(options);
|
|
25474
|
+
if (selection === null) {
|
|
25475
|
+
return null;
|
|
25476
|
+
}
|
|
25477
|
+
const base = await resolveAuth(options);
|
|
25478
|
+
if (selection.kind === "id") {
|
|
25479
|
+
return {
|
|
25480
|
+
...base,
|
|
25481
|
+
projectId: selection.projectId,
|
|
25482
|
+
projectKey: undefined
|
|
25483
|
+
};
|
|
25484
|
+
}
|
|
25485
|
+
const { projectKey } = selection;
|
|
25187
25486
|
const projectsApi = new ProjectsApi(base.tmConfig);
|
|
25188
25487
|
const [projectError, projectResponse] = await catchError(projectsApi.projectsGetProjectByProjectPrefixRaw({
|
|
25189
25488
|
projectPrefix: projectKey
|
|
@@ -25230,6 +25529,49 @@ async function resolveContextWithProject(options) {
|
|
|
25230
25529
|
}
|
|
25231
25530
|
return ctx;
|
|
25232
25531
|
}
|
|
25532
|
+
async function ensureProjectKey(ctx) {
|
|
25533
|
+
if (ctx.projectKey !== undefined) {
|
|
25534
|
+
return ctx.projectKey;
|
|
25535
|
+
}
|
|
25536
|
+
const projectsApi = new ProjectsApi(ctx.tmConfig);
|
|
25537
|
+
const [error, project] = await catchError(projectsApi.projectsGetById({ id: ctx.projectId }));
|
|
25538
|
+
if (error) {
|
|
25539
|
+
const { result, errorCode: errorCode2, message, retry, details } = await extractErrorDetails2(error, {
|
|
25540
|
+
forbiddenMessage: TM_FORBIDDEN_MESSAGE
|
|
25541
|
+
});
|
|
25542
|
+
OutputFormatter.error({
|
|
25543
|
+
Result: result,
|
|
25544
|
+
Message: message,
|
|
25545
|
+
Instructions: details,
|
|
25546
|
+
ErrorCode: errorCode2,
|
|
25547
|
+
Retry: retry
|
|
25548
|
+
});
|
|
25549
|
+
processContext.exit(1);
|
|
25550
|
+
return null;
|
|
25551
|
+
}
|
|
25552
|
+
const projectKey = project.projectPrefix?.trim();
|
|
25553
|
+
if (!projectKey) {
|
|
25554
|
+
OutputFormatter.error({
|
|
25555
|
+
Result: RESULTS.Failure,
|
|
25556
|
+
Message: `Project '${ctx.projectId}' came back without a project key.`,
|
|
25557
|
+
Instructions: "Name the project with --project-key instead of --project-id.",
|
|
25558
|
+
ErrorCode: "server_error",
|
|
25559
|
+
Retry: "RetryWillNotFix"
|
|
25560
|
+
});
|
|
25561
|
+
processContext.exit(1);
|
|
25562
|
+
return null;
|
|
25563
|
+
}
|
|
25564
|
+
logger.info(`Resolved project ${ctx.projectId} → '${projectKey}'`);
|
|
25565
|
+
return projectKey;
|
|
25566
|
+
}
|
|
25567
|
+
|
|
25568
|
+
// src/utils/project-scope.ts
|
|
25569
|
+
function projectKeyOption(description = "Test Manager project key (e.g. DEMO)") {
|
|
25570
|
+
return new Option("--project-key <key>", `${description}. Ignored if --project-id is also given.`);
|
|
25571
|
+
}
|
|
25572
|
+
function projectIdOption() {
|
|
25573
|
+
return new Option("--project-id <id>", "Test Manager project ID. Use instead of --project-key, and wins if both are given.");
|
|
25574
|
+
}
|
|
25233
25575
|
|
|
25234
25576
|
// src/commands/attachment.ts
|
|
25235
25577
|
var ATTACHMENT_UPLOAD_EXAMPLES = [
|
|
@@ -25247,7 +25589,7 @@ var ATTACHMENT_UPLOAD_EXAMPLES = [
|
|
|
25247
25589
|
},
|
|
25248
25590
|
{
|
|
25249
25591
|
Description: "Upload an autonomous-execution trace with source and attachment type",
|
|
25250
|
-
Command: "uip tm attachment upload --object-id a1b2c3d4-0000-0000-0000-000000000001 --object-type testCaseLog --project-
|
|
25592
|
+
Command: "uip tm attachment upload --object-id a1b2c3d4-0000-0000-0000-000000000001 --object-type testCaseLog --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --file ./trace.png --source autonomousExecution --attachment-type stepExecutionTrace",
|
|
25251
25593
|
Output: {
|
|
25252
25594
|
Code: "AttachmentUpload",
|
|
25253
25595
|
Data: {
|
|
@@ -25280,7 +25622,7 @@ var uploadSourceChoices = Object.values(UiPathTestManagementHubAttachmentAbstrac
|
|
|
25280
25622
|
var attachmentTypeChoices = Object.values(UiPathTestManagementHubAttachmentAbstractionsEnumsAttachmentType);
|
|
25281
25623
|
var registerAttachmentCommand = (program2) => {
|
|
25282
25624
|
const attachmentCmd = program2.command("attachment").description("Manage Test Manager test case attachments");
|
|
25283
|
-
attachmentCmd.command("download").description("Download attachments for test cases in an execution.").requiredOption("--execution-id <uuid>", "Test execution UUID to download attachments for").
|
|
25625
|
+
attachmentCmd.command("download").description("Download attachments for test cases in an execution.").requiredOption("--execution-id <uuid>", "Test execution UUID to download attachments for").addOption(projectKeyOption()).addOption(projectIdOption()).option("--test-set-key <key>", "Test set key to derive project key from (e.g. DEMO:42 → DEMO)").option("--test-case-name <name>", "Filter by test case name (case-insensitive substring). Can be repeated for multiple names.", (val, acc) => {
|
|
25284
25626
|
acc.push(val);
|
|
25285
25627
|
return acc;
|
|
25286
25628
|
}, []).option("--only-failed", "Download attachments only for failed test cases").option("--result-path <path>", "Output directory for downloaded files (default: current directory)", ".").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(ATTACHMENT_DOWNLOAD_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
@@ -25403,7 +25745,7 @@ var registerAttachmentCommand = (program2) => {
|
|
|
25403
25745
|
return;
|
|
25404
25746
|
}
|
|
25405
25747
|
});
|
|
25406
|
-
attachmentCmd.command("upload").description("Upload a file as an attachment to a Test Manager object.").requiredOption("--object-id <uuid>", "UUID of the object to attach the file to").addOption(new Option("--object-type <type>", `Object type (${objectTypeChoices.join(", ")})`).choices(objectTypeChoices).makeOptionMandatory()).requiredOption("--file <path>", "Path to the file to upload").
|
|
25748
|
+
attachmentCmd.command("upload").description("Upload a file as an attachment to a Test Manager object.").requiredOption("--object-id <uuid>", "UUID of the object to attach the file to").addOption(new Option("--object-type <type>", `Object type (${objectTypeChoices.join(", ")})`).choices(objectTypeChoices).makeOptionMandatory()).requiredOption("--file <path>", "Path to the file to upload").addOption(projectKeyOption()).addOption(projectIdOption()).option("--test-set-key <key>", "Test set key to derive project key from (e.g. DEMO:42 → DEMO)").addOption(new Option("--source <source>", `Upload source for a tagged attachment (${uploadSourceChoices.join(", ")}). Routes to the tagged-upload endpoint.`).choices(uploadSourceChoices)).addOption(new Option("--attachment-type <type>", `Attachment type for a tagged attachment (${attachmentTypeChoices.join(", ")}). Routes to the tagged-upload endpoint.`).choices(attachmentTypeChoices)).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(ATTACHMENT_UPLOAD_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
25407
25749
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
25408
25750
|
if (authError) {
|
|
25409
25751
|
OutputFormatter.error({
|
|
@@ -25890,7 +26232,7 @@ var LABEL_BULK_REMOVE_EXAMPLES = [
|
|
|
25890
26232
|
];
|
|
25891
26233
|
var registerCustomFieldLabelCommand = (parent) => {
|
|
25892
26234
|
const cmd = parent.command("label").description("Manage Test Manager custom field label rows (Label-type fields).");
|
|
25893
|
-
cmd.command("get").description("Get a custom field label row by --label-id. To look up by object, use `customfield label list --object-id <uuid>` (returns the same row as a 1-element array).").
|
|
26235
|
+
cmd.command("get").description("Get a custom field label row by --label-id. To look up by object, use `customfield label list --object-id <uuid>` (returns the same row as a 1-element array).").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).requiredOption("--label-id <uuid>", "Custom field label row UUID").option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(LABEL_GET_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
25894
26236
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
25895
26237
|
if (authError) {
|
|
25896
26238
|
OutputFormatter.error({
|
|
@@ -25930,7 +26272,7 @@ var registerCustomFieldLabelCommand = (parent) => {
|
|
|
25930
26272
|
}
|
|
25931
26273
|
OutputFormatter.success(new SuccessOutput("CustomFieldLabelGet", toLabelOutput(dto)));
|
|
25932
26274
|
});
|
|
25933
|
-
cmd.command("list").description("List custom field label rows for an object type, optionally filtered by object id.").
|
|
26275
|
+
cmd.command("list").description("List custom field label rows for an object type, optionally filtered by object id.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).option("--object-id <uuid>", "Filter to a specific object UUID").option("--filter <text>", "Search label rows by value").option("--sort-by <expr>", "Sort results (e.g. 'name asc')").option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(LABEL_LIST_FILTERED_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
25934
26276
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
25935
26277
|
if (authError) {
|
|
25936
26278
|
OutputFormatter.error({
|
|
@@ -25980,7 +26322,7 @@ var registerCustomFieldLabelCommand = (parent) => {
|
|
|
25980
26322
|
}
|
|
25981
26323
|
OutputFormatter.success(new SuccessOutput("CustomFieldLabelsList", toLabelListOutput(page.data ?? [])));
|
|
25982
26324
|
});
|
|
25983
|
-
cmd.command("create").description("Upsert label values for an object. The backend merges new keys into any existing row.").
|
|
26325
|
+
cmd.command("create").description("Upsert label values for an object. The backend merges new keys into any existing row.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).requiredOption("--object-id <uuid>", "Object UUID to attach labels to").requiredOption("--values <json>", `JSON object mapping field names to label arrays, e.g. '{"Priority":["High"],"Tags":["smoke","critical"]}'`, (value) => {
|
|
25984
26326
|
try {
|
|
25985
26327
|
return JSON.parse(value);
|
|
25986
26328
|
} catch {
|
|
@@ -26039,7 +26381,7 @@ var registerCustomFieldLabelCommand = (parent) => {
|
|
|
26039
26381
|
}
|
|
26040
26382
|
OutputFormatter.success(new SuccessOutput("CustomFieldLabelCreate", toLabelOutput(dto)));
|
|
26041
26383
|
});
|
|
26042
|
-
cmd.command("add").description("Add label values to one named custom field across multiple objects.").
|
|
26384
|
+
cmd.command("add").description("Add label values to one named custom field across multiple objects.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).requiredOption("--custom-field-name <name>", "Existing custom field definition name (must already exist for this object type)").requiredOption("--object-ids <uuid...>", "Object UUIDs to apply the labels to (space-separated)").requiredOption("--values <value...>", "Label values to add (space-separated)").option("--replace-existing-values", "Replace existing values instead of merging", false).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(LABEL_BULK_ADD_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26043
26385
|
const objectIds = options.objectIds;
|
|
26044
26386
|
const values = options.values;
|
|
26045
26387
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
@@ -26078,7 +26420,7 @@ var registerCustomFieldLabelCommand = (parent) => {
|
|
|
26078
26420
|
}
|
|
26079
26421
|
OutputFormatter.success(new SuccessOutput("CustomFieldLabelAdd", toBulkLabelResultOutput(options.customFieldName, objectIds.length, "Added")));
|
|
26080
26422
|
});
|
|
26081
|
-
cmd.command("remove").description("Remove label values from one named custom field across multiple objects. " + "Pass --remove-all-values to clear every value for the field.").
|
|
26423
|
+
cmd.command("remove").description("Remove label values from one named custom field across multiple objects. " + "Pass --remove-all-values to clear every value for the field.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).requiredOption("--custom-field-name <name>", "Existing custom field definition name").requiredOption("--object-ids <uuid...>", "Object UUIDs to remove labels from (space-separated)").option("--values <value...>", "Label values to remove (space-separated). Required unless --remove-all-values is set.").option("--remove-all-values", "Clear all values for this field on the listed objects", false).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(LABEL_BULK_REMOVE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26082
26424
|
const objectIds = options.objectIds;
|
|
26083
26425
|
if (!requireConfirmation(options, `remove custom field label '${options.customFieldName}' values from ${objectIds.length} object(s)`))
|
|
26084
26426
|
return;
|
|
@@ -26213,7 +26555,7 @@ var VALUE_GET_EXAMPLES = [
|
|
|
26213
26555
|
},
|
|
26214
26556
|
{
|
|
26215
26557
|
Description: "Get a custom field value row by name + object-id",
|
|
26216
|
-
Command: "uip tm customfield value get --project-
|
|
26558
|
+
Command: "uip tm customfield value get --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --object-type TestCase --name Priority --object-id a1b2c3d4-...",
|
|
26217
26559
|
Output: {
|
|
26218
26560
|
Code: "CustomFieldValueGet",
|
|
26219
26561
|
Data: VALUE_EXAMPLE_RECORD
|
|
@@ -26241,7 +26583,7 @@ var VALUE_UPDATE_EXAMPLES = [
|
|
|
26241
26583
|
},
|
|
26242
26584
|
{
|
|
26243
26585
|
Description: "Update a custom field value by name + object-id",
|
|
26244
|
-
Command: "uip tm customfield value update --project-
|
|
26586
|
+
Command: "uip tm customfield value update --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --object-type TestCase --name Priority --object-id a1b2c3d4-... --value Critical",
|
|
26245
26587
|
Output: {
|
|
26246
26588
|
Code: "CustomFieldValueUpdate",
|
|
26247
26589
|
Data: { Id: "v1", Result: "Updated" }
|
|
@@ -26259,7 +26601,7 @@ var VALUE_DELETE_EXAMPLES = [
|
|
|
26259
26601
|
},
|
|
26260
26602
|
{
|
|
26261
26603
|
Description: "Delete a custom field value row by name + object-id",
|
|
26262
|
-
Command: "uip tm customfield value delete --project-
|
|
26604
|
+
Command: "uip tm customfield value delete --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --object-type TestCase --name Priority --object-id a1b2c3d4-...",
|
|
26263
26605
|
Output: {
|
|
26264
26606
|
Code: "CustomFieldValueDelete",
|
|
26265
26607
|
Data: { Id: "v1", Result: "Deleted" }
|
|
@@ -26268,7 +26610,7 @@ var VALUE_DELETE_EXAMPLES = [
|
|
|
26268
26610
|
];
|
|
26269
26611
|
var registerCustomFieldValueCommand = (parent) => {
|
|
26270
26612
|
const cmd = parent.command("value").description("Manage Test Manager custom field value rows (Text-type fields).");
|
|
26271
|
-
cmd.command("list").description("List Text custom field values for an object type. " + "Results are empty unless --object-id is provided.").
|
|
26613
|
+
cmd.command("list").description("List Text custom field values for an object type. " + "Results are empty unless --object-id is provided.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).option("--object-id <uuid>", "Object UUID whose values to list. Required in practice — results are empty when this is omitted.").option("--filter <text>", "Search values by content").option("--sort-by <expr>", "Sort results (e.g. 'name asc')").option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(VALUE_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26272
26614
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
26273
26615
|
if (authError) {
|
|
26274
26616
|
OutputFormatter.error({
|
|
@@ -26318,7 +26660,7 @@ var registerCustomFieldValueCommand = (parent) => {
|
|
|
26318
26660
|
}
|
|
26319
26661
|
OutputFormatter.success(new SuccessOutput("CustomFieldValuesList", toValueListOutput(page.data ?? [])));
|
|
26320
26662
|
});
|
|
26321
|
-
cmd.command("get").description("Get a custom field value row. Identify by --value-id, OR by --name + --object-id.").
|
|
26663
|
+
cmd.command("get").description("Get a custom field value row. Identify by --value-id, OR by --name + --object-id.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).option("--value-id <uuid>", "Custom field value row UUID").option("--name <name>", "Custom field name (used with --object-id)").option("--object-id <uuid>", "Object UUID (used with --name)").option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(VALUE_GET_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26322
26664
|
const identityError = validateValueIdentity(options);
|
|
26323
26665
|
if (identityError) {
|
|
26324
26666
|
OutputFormatter.error(identityError);
|
|
@@ -26359,7 +26701,7 @@ var registerCustomFieldValueCommand = (parent) => {
|
|
|
26359
26701
|
}
|
|
26360
26702
|
OutputFormatter.success(new SuccessOutput("CustomFieldValueGet", toValueOutput(dto)));
|
|
26361
26703
|
});
|
|
26362
|
-
cmd.command("create").description("Create a custom field value row on an object.").
|
|
26704
|
+
cmd.command("create").description("Create a custom field value row on an object.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).requiredOption("--name <name>", "Custom field name (must match an existing definition)").requiredOption("--object-id <uuid>", "Object UUID this value attaches to").requiredOption("--data-type <type>", "Data type: Text or Label (must match the definition)", parseCustomFieldDataType).option("--value <text>", "Value content").option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(VALUE_CREATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26363
26705
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
26364
26706
|
if (authError) {
|
|
26365
26707
|
OutputFormatter.error({
|
|
@@ -26396,7 +26738,7 @@ var registerCustomFieldValueCommand = (parent) => {
|
|
|
26396
26738
|
}
|
|
26397
26739
|
OutputFormatter.success(new SuccessOutput("CustomFieldValueCreate", toValueOutput(dto)));
|
|
26398
26740
|
});
|
|
26399
|
-
cmd.command("update").description("Update a custom field value row. Identify by --value-id, OR by --name + --object-id. " + "Note: an empty --value can cause the row to be deleted instead of updated when its field name no longer maps to a definition. " + "Use --clear to acknowledge that intent.").
|
|
26741
|
+
cmd.command("update").description("Update a custom field value row. Identify by --value-id, OR by --name + --object-id. " + "Note: an empty --value can cause the row to be deleted instead of updated when its field name no longer maps to a definition. " + "Use --clear to acknowledge that intent.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).option("--value-id <uuid>", "Custom field value row UUID").option("--name <name>", "Custom field name (used with --object-id)").option("--object-id <uuid>", "Object UUID (used with --name)").option("--data-type <type>", "Data type: Text or Label (defaults to the row's current data type)", parseCustomFieldDataType).option("--value <text>", "New value content").option("--clear", "Acknowledge that an empty --value may delete the row if its field name no longer maps to a definition", false).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(VALUE_UPDATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26400
26742
|
const identityError = validateValueIdentity(options);
|
|
26401
26743
|
if (identityError) {
|
|
26402
26744
|
OutputFormatter.error(identityError);
|
|
@@ -26474,7 +26816,7 @@ var registerCustomFieldValueCommand = (parent) => {
|
|
|
26474
26816
|
Result: "Updated"
|
|
26475
26817
|
}));
|
|
26476
26818
|
});
|
|
26477
|
-
cmd.command("delete").description("Delete a custom field value row. Identify by --value-id, OR by --name + --object-id.").
|
|
26819
|
+
cmd.command("delete").description("Delete a custom field value row. Identify by --value-id, OR by --name + --object-id.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet", parseCustomFieldObjectType).option("--value-id <uuid>", "Custom field value row UUID").option("--name <name>", "Custom field name (used with --object-id)").option("--object-id <uuid>", "Object UUID (used with --name)").option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(VALUE_DELETE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26478
26820
|
const valueRef = options.valueId ? `'${options.valueId}'` : `'${options.name}' on object '${options.objectId}'`;
|
|
26479
26821
|
if (!requireConfirmation(options, `delete custom field value ${valueRef}`))
|
|
26480
26822
|
return;
|
|
@@ -26598,7 +26940,7 @@ var CUSTOMFIELD_LIST_EXAMPLES = [
|
|
|
26598
26940
|
},
|
|
26599
26941
|
{
|
|
26600
26942
|
Description: "Filter by multiple object types and data types",
|
|
26601
|
-
Command: "uip tm customfield list --project-
|
|
26943
|
+
Command: "uip tm customfield list --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --object-types TestCase TestSet --data-types Label",
|
|
26602
26944
|
Output: {
|
|
26603
26945
|
Code: "CustomFieldDefinitionsList",
|
|
26604
26946
|
Data: [DEFINITION_EXAMPLE_RECORD]
|
|
@@ -26616,7 +26958,7 @@ var CUSTOMFIELD_GET_EXAMPLES = [
|
|
|
26616
26958
|
},
|
|
26617
26959
|
{
|
|
26618
26960
|
Description: "Get a custom field definition by name and object type",
|
|
26619
|
-
Command: "uip tm customfield get --project-
|
|
26961
|
+
Command: "uip tm customfield get --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --name Priority --object-type TestCase",
|
|
26620
26962
|
Output: {
|
|
26621
26963
|
Code: "CustomFieldDefinitionGet",
|
|
26622
26964
|
Data: DEFINITION_EXAMPLE_RECORD
|
|
@@ -26648,7 +26990,7 @@ var CUSTOMFIELD_UPDATE_EXAMPLES = [
|
|
|
26648
26990
|
},
|
|
26649
26991
|
{
|
|
26650
26992
|
Description: "Edit the description of a custom field by id (other fields preserved)",
|
|
26651
|
-
Command: 'uip tm customfield update --project-
|
|
26993
|
+
Command: 'uip tm customfield update --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --field-id a1b2c3d4-0000-0000-0000-000000000001 --description "new description"',
|
|
26652
26994
|
Output: {
|
|
26653
26995
|
Code: "CustomFieldDefinitionUpdate",
|
|
26654
26996
|
Data: {
|
|
@@ -26678,7 +27020,7 @@ var CUSTOMFIELD_DELETE_EXAMPLES = [
|
|
|
26678
27020
|
},
|
|
26679
27021
|
{
|
|
26680
27022
|
Description: "Delete a custom field definition by name and object type",
|
|
26681
|
-
Command: "uip tm customfield delete --project-
|
|
27023
|
+
Command: "uip tm customfield delete --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --name Priority --object-type TestCase",
|
|
26682
27024
|
Output: {
|
|
26683
27025
|
Code: "CustomFieldDefinitionsDelete",
|
|
26684
27026
|
Data: { Passed: 1, Failed: 0 }
|
|
@@ -26689,7 +27031,7 @@ var registerCustomFieldCommand = (program2) => {
|
|
|
26689
27031
|
const cmd = program2.command("customfield").description("Manage Test Manager custom fields. Top-level verbs operate on definitions (the schema); nested `label` and `value` subcommands operate on the per-object rows.");
|
|
26690
27032
|
registerCustomFieldLabelCommand(cmd);
|
|
26691
27033
|
registerCustomFieldValueCommand(cmd);
|
|
26692
|
-
cmd.command("list").description("List custom field definitions in a project. Filters: --object-types and --data-types accept one or more values. Use --name for an exact-name lookup (returns one row per object-type the field is defined on).").
|
|
27034
|
+
cmd.command("list").description("List custom field definitions in a project. Filters: --object-types and --data-types accept one or more values. Use --name for an exact-name lookup (returns one row per object-type the field is defined on).").addOption(projectKeyOption()).addOption(projectIdOption()).option("--object-types <type...>", "Filter by one or more object types (space-separated): Requirement, TestCase, TestSet").option("--data-types <type...>", "Filter by one or more data types (space-separated): Text, Label").option("--name <name>", 'Exact-name match (client-side filter; pairs well with --output-filter "Data[].ObjectType" to discover which types support a given field name)').option("--filter <text>", "Substring search across definition fields (server-side)").option("--sort-by <expr>", "Sort results (e.g. 'name asc')").option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(CUSTOMFIELD_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26693
27035
|
const objectTypes = parseVariadicEnumOrEmit(options.objectTypes, (v) => parseCustomFieldObjectType(v), "--object-types");
|
|
26694
27036
|
if (objectTypes === null)
|
|
26695
27037
|
return;
|
|
@@ -26770,7 +27112,7 @@ var registerCustomFieldCommand = (program2) => {
|
|
|
26770
27112
|
}
|
|
26771
27113
|
OutputFormatter.success(new SuccessOutput("CustomFieldDefinitionsList", toDefinitionListOutput(collected)));
|
|
26772
27114
|
});
|
|
26773
|
-
cmd.command("get").description("Get a custom field definition. Identify by --field-id, OR by --name + --object-type.").
|
|
27115
|
+
cmd.command("get").description("Get a custom field definition. Identify by --field-id, OR by --name + --object-type.").addOption(projectKeyOption()).addOption(projectIdOption()).option("--field-id <uuid>", "Custom field definition UUID").option("--name <name>", "Custom field name (used with --object-type)").option("--object-type <type>", "Object type: Requirement, TestCase, TestSet (used with --name)", parseCustomFieldObjectType).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(CUSTOMFIELD_GET_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26774
27116
|
const identityError = validateDefinitionIdentity(options);
|
|
26775
27117
|
if (identityError) {
|
|
26776
27118
|
OutputFormatter.error(identityError);
|
|
@@ -26811,7 +27153,7 @@ var registerCustomFieldCommand = (program2) => {
|
|
|
26811
27153
|
}
|
|
26812
27154
|
OutputFormatter.success(new SuccessOutput("CustomFieldDefinitionGet", toDefinitionOutput(dto)));
|
|
26813
27155
|
});
|
|
26814
|
-
cmd.command("create").description("Create a new custom field definition. Provide --object-type or --scope-list.").
|
|
27156
|
+
cmd.command("create").description("Create a new custom field definition. Provide --object-type or --scope-list.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--name <name>", "Custom field name").requiredOption("--data-type <type>", "Data type: Text or Label", parseCustomFieldDataType).option("--object-type <type>", "Object type the field applies to: Requirement, TestCase, TestSet", parseCustomFieldObjectType).option("--scope-list <type...>", "Multi-object scope (space-separated). Used in place of --object-type when set: Requirement, TestCase, TestSet").option("--description <text>", "Field description").option("--default-value <text>", "Default value seeded onto every existing object of the field's type.").option("--value-hints <text>", "UI hint text shown next to the field").option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(CUSTOMFIELD_CREATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26815
27157
|
const scopeList = parseVariadicEnumOrEmit(options.scopeList, (v) => parseCustomFieldObjectType(v), "--scope-list");
|
|
26816
27158
|
if (scopeList === null)
|
|
26817
27159
|
return;
|
|
@@ -26878,7 +27220,7 @@ var registerCustomFieldCommand = (program2) => {
|
|
|
26878
27220
|
}
|
|
26879
27221
|
OutputFormatter.success(new SuccessOutput("CustomFieldDefinitionCreate", toDefinitionOutput(dto)));
|
|
26880
27222
|
});
|
|
26881
|
-
cmd.command("update").description("Update a custom field definition. Identify by --field-id, OR by --name + --object-type. " + "Unspecified fields keep their current values").
|
|
27223
|
+
cmd.command("update").description("Update a custom field definition. Identify by --field-id, OR by --name + --object-type. " + "Unspecified fields keep their current values").addOption(projectKeyOption()).addOption(projectIdOption()).option("--field-id <uuid>", "Custom field definition UUID").option("--name <name>", "Custom field name (used with --object-type)").option("--object-type <type>", "Object type: Requirement, TestCase, TestSet (used with --name)", parseCustomFieldObjectType).option("--rename-to <name>", "New name (omit to keep current name)").option("--description <text>", "Field description").option("--default-value <text>", "Default value").option("--value-hints <text>", "UI hint text").option("--scope-list <type...>", "Multi-object scope (space-separated): Requirement, TestCase, TestSet").option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(CUSTOMFIELD_UPDATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26882
27224
|
const identityError = validateDefinitionIdentity(options);
|
|
26883
27225
|
if (identityError) {
|
|
26884
27226
|
OutputFormatter.error(identityError);
|
|
@@ -26944,7 +27286,7 @@ var registerCustomFieldCommand = (program2) => {
|
|
|
26944
27286
|
Result: "Updated"
|
|
26945
27287
|
}));
|
|
26946
27288
|
});
|
|
26947
|
-
cmd.command("delete").description("Delete one or more custom field definitions. Identify by --field-ids (one or many UUIDs), OR by --name + --object-type (single by natural key). " + "Hard delete with no cascade — orphan label/value rows are NOT cleaned up.").
|
|
27289
|
+
cmd.command("delete").description("Delete one or more custom field definitions. Identify by --field-ids (one or many UUIDs), OR by --name + --object-type (single by natural key). " + "Hard delete with no cascade — orphan label/value rows are NOT cleaned up.").addOption(projectKeyOption()).addOption(projectIdOption()).option("--field-ids <uuid...>", "Custom field definition UUIDs to delete (one or more, space-separated)").option("--name <name>", "Custom field name (used with --object-type)").option("--object-type <type>", "Object type: Requirement, TestCase, TestSet (used with --name)", parseCustomFieldObjectType).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(CUSTOMFIELD_DELETE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
26948
27290
|
const fieldIdsCount = Array.isArray(options.fieldIds) ? options.fieldIds.length : 0;
|
|
26949
27291
|
const target = fieldIdsCount > 0 ? `${fieldIdsCount} custom field(s)` : `custom field '${options.name}'`;
|
|
26950
27292
|
if (!requireConfirmation(options, `delete ${target}`))
|
|
@@ -27198,7 +27540,7 @@ var EXECUTION_EXECUTE_EXAMPLES = [
|
|
|
27198
27540
|
},
|
|
27199
27541
|
{
|
|
27200
27542
|
Description: "runs an execution with all or specific testcaselogs",
|
|
27201
|
-
Command: "uip tm executions run --execution-id a1b2c3d4-0000-0000-0000-000000000001 --project-
|
|
27543
|
+
Command: "uip tm executions run --execution-id a1b2c3d4-0000-0000-0000-000000000001 --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --execution-type automated --test-case-log-ids c3d4e5f6-0000-0000-0000-000000000001 c3d4e5f6-0000-0000-0000-000000000002 --async",
|
|
27202
27544
|
Output: {
|
|
27203
27545
|
Code: "ExecutionRun",
|
|
27204
27546
|
Data: {
|
|
@@ -27245,7 +27587,7 @@ var EXECUTION_LIST_EXAMPLES = [
|
|
|
27245
27587
|
},
|
|
27246
27588
|
{
|
|
27247
27589
|
Description: "List executions for a test set",
|
|
27248
|
-
Command: "uip tm executions list --project-
|
|
27590
|
+
Command: "uip tm executions list --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --test-set-id a1b2c3d4-0000-0000-0000-000000000001 --limit 2",
|
|
27249
27591
|
Output: {
|
|
27250
27592
|
Code: "ExecutionsList",
|
|
27251
27593
|
Data: [
|
|
@@ -27301,7 +27643,7 @@ var EXECUTION_LIST_FILTERED_EXAMPLES = [
|
|
|
27301
27643
|
},
|
|
27302
27644
|
{
|
|
27303
27645
|
Description: "List executions using every available filter and a full output row",
|
|
27304
|
-
Command: "uip tm executions list-filtered --project-
|
|
27646
|
+
Command: "uip tm executions list-filtered --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --test-set-id a1b2c3d4-0000-0000-0000-000000000001 --updated-by 11111111-2222-3333-4444-555555555555 --status finished --execution-type automated --execution-finished-interval lastDay --labels nightly regression --test-execution-ids b2c3d4e5-0000-0000-0000-000000000001 --search smoke --sort-by 'executionFinished desc' --limit 25 --offset 0",
|
|
27305
27647
|
Output: {
|
|
27306
27648
|
Code: "ExecutionsListFiltered",
|
|
27307
27649
|
Data: [
|
|
@@ -27428,7 +27770,7 @@ var EXECUTION_LIST_TESTCASELOGS_EXAMPLES = [
|
|
|
27428
27770
|
];
|
|
27429
27771
|
var registerExecutionCommand = (program2) => {
|
|
27430
27772
|
const executionCmd = program2.command("executions").description("Manage Test Manager test executions");
|
|
27431
|
-
executionCmd.command("get-stats").description("Get a test execution by ID with aggregated pass/fail/none stats.").requiredOption("--execution-id <uuid>", "Test execution UUID").
|
|
27773
|
+
executionCmd.command("get-stats").description("Get a test execution by ID with aggregated pass/fail/none stats.").requiredOption("--execution-id <uuid>", "Test execution UUID").addOption(projectKeyOption()).addOption(projectIdOption()).examples(EXECUTION_GET_STATS_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
27432
27774
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
27433
27775
|
if (authError) {
|
|
27434
27776
|
OutputFormatter.error({
|
|
@@ -27460,7 +27802,7 @@ var registerExecutionCommand = (program2) => {
|
|
|
27460
27802
|
}
|
|
27461
27803
|
OutputFormatter.success(new SuccessOutput("ExecutionStats", toOutput2(stats)));
|
|
27462
27804
|
});
|
|
27463
|
-
executionCmd.command("run").description("Run a test execution. Optionally run only specific test case logs.").requiredOption("--execution-id <uuid>", "Test execution UUID to execute").
|
|
27805
|
+
executionCmd.command("run").description("Run a test execution. Optionally run only specific test case logs.").requiredOption("--execution-id <uuid>", "Test execution UUID to execute").addOption(projectKeyOption()).addOption(projectIdOption()).addOption(new Option("--execution-type <type>", `Execution type: ${Object.values(UiPathTestManagementHubCommonEnumsExecutionType).join(", ")}`).choices(Object.values(UiPathTestManagementHubCommonEnumsExecutionType)).makeOptionMandatory()).option("--test-case-log-ids <ids...>", "Space-separated test case log UUIDs to re-run (omit to run all)", []).option("--async", "Run in async mode (return immediately)").examples(EXECUTION_EXECUTE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
27464
27806
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
27465
27807
|
if (authError) {
|
|
27466
27808
|
OutputFormatter.error({
|
|
@@ -27499,7 +27841,7 @@ var registerExecutionCommand = (program2) => {
|
|
|
27499
27841
|
Status: "Succeeded"
|
|
27500
27842
|
}));
|
|
27501
27843
|
});
|
|
27502
|
-
executionCmd.command("retry").description("Retry only the failed test cases of a finished execution.").requiredOption("--execution-id <uuid>", "Test execution UUID to retry").
|
|
27844
|
+
executionCmd.command("retry").description("Retry only the failed test cases of a finished execution.").requiredOption("--execution-id <uuid>", "Test execution UUID to retry").addOption(projectKeyOption()).addOption(projectIdOption()).option("--test-set-key <key>", "Test set key to derive project key from (e.g. DEMO:42 → DEMO)").option("--execution-type <type>", "Execution type for the retry: automated, manual, mixed, none", "automated").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(EXECUTION_RETRY_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
27503
27845
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
27504
27846
|
if (authError) {
|
|
27505
27847
|
OutputFormatter.error({
|
|
@@ -27594,7 +27936,7 @@ var registerExecutionCommand = (program2) => {
|
|
|
27594
27936
|
RetriedCount: failedLogIds.length
|
|
27595
27937
|
}));
|
|
27596
27938
|
});
|
|
27597
|
-
executionCmd.command("list").description("List top n executions for a project or test set.").
|
|
27939
|
+
executionCmd.command("list").description("List top n executions for a project or test set.").addOption(projectKeyOption()).addOption(projectIdOption()).option("--test-set-id <uuid>", "Test set UUID to filter executions").option("--filter <text>", "Search executions by name").addOption(new Option("--status <status>", `Filter by execution status (${Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionStatus).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionStatus))).addOption(new Option("--execution-type <type>", `Filter by execution type (${Object.values(UiPathTestManagementHubCommonEnumsExecutionType).join(", ")})`).choices(Object.values(UiPathTestManagementHubCommonEnumsExecutionType))).addOption(new Option("--execution-finished-interval <interval>", `Filter by execution finished interval (${Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionFinishedInterval).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionFinishedInterval))).option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(EXECUTION_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
27598
27940
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
27599
27941
|
if (authError) {
|
|
27600
27942
|
OutputFormatter.error({
|
|
@@ -27649,7 +27991,7 @@ var registerExecutionCommand = (program2) => {
|
|
|
27649
27991
|
const rows = items.map(toOutput2);
|
|
27650
27992
|
OutputFormatter.success(new SuccessOutput("ExecutionsList", rows));
|
|
27651
27993
|
});
|
|
27652
|
-
executionCmd.command("list-filtered").description("List test executions for a project using the full filtered API (no test set required).").
|
|
27994
|
+
executionCmd.command("list-filtered").description("List test executions for a project using the full filtered API (no test set required).").addOption(projectKeyOption()).addOption(projectIdOption()).option("--test-set-id <uuid>", "Limit results to a single test set UUID").option("--updated-by <userId>", "Filter by the user UUID who last updated the execution").option("--search <text>", "Search executions by name").addOption(new Option("--status <status>", `Filter by execution status (${Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionStatus).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionStatus))).addOption(new Option("--execution-type <type>", `Filter by execution type (${Object.values(UiPathTestManagementHubCommonEnumsExecutionType).join(", ")})`).choices(Object.values(UiPathTestManagementHubCommonEnumsExecutionType))).addOption(new Option("--execution-finished-interval <interval>", `Filter by execution finished interval (${Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionFinishedInterval).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsTestExecutionFinishedInterval))).option("--labels <labels...>", "Space-separated list of labels to filter by").option("--test-execution-ids <ids...>", "Space-separated list of test execution UUIDs to fetch").option("--sort-by <expr>", "Sort results by field (e.g. 'executionFinished desc')").option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).examples(EXECUTION_LIST_FILTERED_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
27653
27995
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
27654
27996
|
if (authError) {
|
|
27655
27997
|
OutputFormatter.error({
|
|
@@ -27709,7 +28051,7 @@ var registerExecutionCommand = (program2) => {
|
|
|
27709
28051
|
OutputFormatter.success(new SuccessOutput("ExecutionsListFiltered", rows));
|
|
27710
28052
|
});
|
|
27711
28053
|
const testcaselogs = executionCmd.command("testcaselogs").description("Inspect test case logs produced by a test execution.");
|
|
27712
|
-
testcaselogs.command("list").description("List test case logs for a test execution.").requiredOption("--execution-id <uuid>", "Test execution UUID").
|
|
28054
|
+
testcaselogs.command("list").description("List test case logs for a test execution.").requiredOption("--execution-id <uuid>", "Test execution UUID").addOption(projectKeyOption()).addOption(projectIdOption()).option("--only-failed", "Show only failed test case logs").option("--filter <text>", "Search test case logs by name").addOption(new Option("--results <results...>", `Filter by results (space-separated: ${Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult).join(" ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult))).addOption(new Option("--statuses <statuses...>", `Filter by execution statuses (space-separated: ${Object.values(UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus).join(" ")})`).choices(Object.values(UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus))).addOption(new Option("--duration-period <period>", `Filter by duration period (${Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod))).option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(EXECUTION_LIST_TESTCASELOGS_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
27713
28055
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
27714
28056
|
if (authError) {
|
|
27715
28057
|
OutputFormatter.error({
|
|
@@ -27959,7 +28301,7 @@ var LIST_EXAMPLES = [
|
|
|
27959
28301
|
},
|
|
27960
28302
|
{
|
|
27961
28303
|
Description: "Narrow by label-types and target object UUIDs",
|
|
27962
|
-
Command: "uip tm objectlabel list --project-
|
|
28304
|
+
Command: "uip tm objectlabel list --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --object-type TestCase --label-types userLabel --object-ids id1 id2",
|
|
27963
28305
|
Output: {
|
|
27964
28306
|
Code: "ObjectLabelsList",
|
|
27965
28307
|
Data: [{ Name: "smoke" }, { Name: "regression" }]
|
|
@@ -27984,7 +28326,7 @@ var ADD_EXAMPLES = [
|
|
|
27984
28326
|
},
|
|
27985
28327
|
{
|
|
27986
28328
|
Description: "Add a label with a specific label type (assigns each label individually)",
|
|
27987
|
-
Command: "uip tm objectlabel add --project-
|
|
28329
|
+
Command: "uip tm objectlabel add --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --object-type TestCase --object-ids id1 id2 --labels smoke --label-type systemLabel",
|
|
27988
28330
|
Output: {
|
|
27989
28331
|
Code: "ObjectLabelsAdd",
|
|
27990
28332
|
Data: {
|
|
@@ -28007,7 +28349,7 @@ var REMOVE_EXAMPLES = [
|
|
|
28007
28349
|
},
|
|
28008
28350
|
{
|
|
28009
28351
|
Description: "Clear every non-system label on the listed objects (use without --labels — the two flags are mutually exclusive)",
|
|
28010
|
-
Command: "uip tm objectlabel remove --project-
|
|
28352
|
+
Command: "uip tm objectlabel remove --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --object-type TestCase --object-ids id1 id2 --remove-all-labels",
|
|
28011
28353
|
Output: {
|
|
28012
28354
|
Code: "ObjectLabelsRemove",
|
|
28013
28355
|
Data: {
|
|
@@ -28020,7 +28362,7 @@ var REMOVE_EXAMPLES = [
|
|
|
28020
28362
|
];
|
|
28021
28363
|
var registerObjectLabelCommand = (program2) => {
|
|
28022
28364
|
const cmd = program2.command("objectlabel").description("Manage Test Manager object labels (tags applied to requirements, test cases, test sets, executions, and case logs).");
|
|
28023
|
-
cmd.command("list").description("List distinct label names for one object type (paginated). Use --limit/--offset to page; --filter to narrow by name prefix.").
|
|
28365
|
+
cmd.command("list").description("List distinct label names for one object type (paginated). Use --limit/--offset to page; --filter to narrow by name prefix.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet, TestExecution, TestCaseLog", parseObjectLabelObjectType).option("--object-ids <uuid...>", "Restrict to labels assigned to these objects (space-separated)").addOption(new Option("--label-types <type...>", `Filter by label types (${labelTypeChoices.join(", ")}). Defaults to userLabel + systemLabel.`).choices(labelTypeChoices)).option("--filter <text>", "Prefix to match label names against (server-side StartsWith)").option("--sort-by <expr>", "Sort results (e.g. 'name asc')").option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
28024
28366
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
28025
28367
|
if (authError) {
|
|
28026
28368
|
OutputFormatter.error({
|
|
@@ -28083,7 +28425,7 @@ var registerObjectLabelCommand = (program2) => {
|
|
|
28083
28425
|
const labels = Array.isArray(envelope?.data) ? envelope.data : [];
|
|
28084
28426
|
OutputFormatter.success(new SuccessOutput("ObjectLabelsList", labels.map((Name) => ({ Name }))));
|
|
28085
28427
|
});
|
|
28086
|
-
cmd.command("get").description("Get a single label assignment row by its label id.").
|
|
28428
|
+
cmd.command("get").description("Get a single label assignment row by its label id.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet, TestExecution, TestCaseLog", parseObjectLabelObjectType).requiredOption("--label-id <uuid>", "Label assignment UUID").option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(GET_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
28087
28429
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
28088
28430
|
if (authError) {
|
|
28089
28431
|
OutputFormatter.error({
|
|
@@ -28113,7 +28455,7 @@ var registerObjectLabelCommand = (program2) => {
|
|
|
28113
28455
|
}
|
|
28114
28456
|
OutputFormatter.success(new SuccessOutput("ObjectLabelGet", toObjectLabelOutput(dto)));
|
|
28115
28457
|
});
|
|
28116
|
-
cmd.command("add").description("Add labels to one or more objects. " + "Pass --label-type to set a specific label type (each label is then assigned " + "individually and --remove-other-labels is ignored); otherwise labels are added " + "in bulk and --remove-other-labels can make this an authoritative set " + "(deletes any non-system labels not present in --labels).").
|
|
28458
|
+
cmd.command("add").description("Add labels to one or more objects. " + "Pass --label-type to set a specific label type (each label is then assigned " + "individually and --remove-other-labels is ignored); otherwise labels are added " + "in bulk and --remove-other-labels can make this an authoritative set " + "(deletes any non-system labels not present in --labels).").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet, TestExecution, TestCaseLog", parseObjectLabelObjectType).requiredOption("--object-ids <uuid...>", "Target object UUIDs (space-separated)").requiredOption("--labels <name...>", "Label names to add (space-separated)").addOption(new Option("--label-type <type>", `Label type (${labelTypeChoices.join(", ")}). When set, each label is assigned individually via the assign API and --remove-other-labels is ignored.`).choices(labelTypeChoices)).option("--remove-other-labels", "After adding, delete any non-system labels on these objects that are not in --labels (ignored when --label-type is set)", false).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(ADD_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
28117
28459
|
const objectIds = options.objectIds;
|
|
28118
28460
|
const labels = options.labels;
|
|
28119
28461
|
const labelType = options.labelType;
|
|
@@ -28164,7 +28506,7 @@ var registerObjectLabelCommand = (program2) => {
|
|
|
28164
28506
|
Result: "Added"
|
|
28165
28507
|
}));
|
|
28166
28508
|
});
|
|
28167
|
-
cmd.command("remove").description("Remove labels from multiple objects. " + "Pass --labels <name...> to remove specific labels, or --remove-all-labels to clear every non-system label on the listed objects. The two flags are mutually exclusive.").
|
|
28509
|
+
cmd.command("remove").description("Remove labels from multiple objects. " + "Pass --labels <name...> to remove specific labels, or --remove-all-labels to clear every non-system label on the listed objects. The two flags are mutually exclusive.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet, TestExecution, TestCaseLog", parseObjectLabelObjectType).requiredOption("--object-ids <uuid...>", "Target object UUIDs (space-separated)").option("--labels <name...>", "Label names to remove (space-separated). Mutually exclusive with --remove-all-labels; pass exactly one.").option("--remove-all-labels", "Clear every non-system label on the listed objects. Mutually exclusive with --labels.", false).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(REMOVE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
28168
28510
|
const objectIdCount = Array.isArray(options.objectIds) ? options.objectIds.length : 0;
|
|
28169
28511
|
if (!requireConfirmation(options, `remove labels from ${objectIdCount} object(s)`))
|
|
28170
28512
|
return;
|
|
@@ -28361,7 +28703,7 @@ var MESSAGES = {
|
|
|
28361
28703
|
runnerDependencyMissing: (keys) => `None of the framework's test-runner packages (${keys.join(", ")}) is declared in package.json dependencies or devDependencies. Add the runner to your project before packing.`,
|
|
28362
28704
|
TMH_PROJECT_KEY_REQUIRED: "--project-key is required when --create-test-cases is enabled (the default). Pass --project-key <ProjectKey> with the destination TestManager project's URL prefix, or pass --no-create-test-cases to skip auto-creation.",
|
|
28363
28705
|
tmhProjectKeyInvalid: (key) => `--project-key '${key}' is not a valid Test Manager project key. Keys are uppercase letters and digits only (A-Z, 0-9) — check the URL prefix of the destination project. Packing is offline, so a key that is well-formed but does not exist is only detected when the package is ingested.`,
|
|
28364
|
-
PLAYWRIGHT_CONFIG_MISSING: "No playwright.config file found at the project root (looked for playwright.config.{ts,js,mts,cts,mjs,cjs}). Playwright projects are read from that config; without it every test packs with an empty projects list and --playwright-
|
|
28706
|
+
PLAYWRIGHT_CONFIG_MISSING: "No playwright.config file found at the project root (looked for playwright.config.{ts,js,mts,cts,mjs,cjs}). Playwright projects are read from that config; without it every test packs with an empty projects list and --playwright-project has nothing to select at run time.",
|
|
28365
28707
|
PACK_FAILED: "Failed to create package"
|
|
28366
28708
|
},
|
|
28367
28709
|
SUCCESS: {
|
|
@@ -29292,7 +29634,7 @@ var PACK_EXAMPLES = [
|
|
|
29292
29634
|
}
|
|
29293
29635
|
];
|
|
29294
29636
|
var registerPackCommand = (program2) => {
|
|
29295
|
-
program2.command("pack").description("Pack a Playwright test suite into a UiPath .nupkg for Test Manager. " + "For UiPath Studio test automation projects, use `rpa-legacy pack` instead.").requiredOption("--project-path <path>", "Path to the test project root (for playwright: the directory containing package.json, a lockfile, and playwright.config). All three are required — the config is what defines the Playwright projects that --playwright-
|
|
29637
|
+
program2.command("pack").description("Pack a Playwright test suite into a UiPath .nupkg for Test Manager. " + "For UiPath Studio test automation projects, use `rpa-legacy pack` instead.").requiredOption("--project-path <path>", "Path to the test project root (for playwright: the directory containing package.json, a lockfile, and playwright.config). All three are required — the config is what defines the Playwright projects that --playwright-project can later select.").addOption(new Option("--type <type>", "Test framework").choices(SUPPORTED_TYPES).makeOptionMandatory()).option("-n, --name <name>", "Package name (default: project folder name)").option("--package-version <version>", "Package version", DEFAULT_VERSION).option("-o, --output <dir>", "Output directory", DEFAULT_OUTPUT_DIR).option("--author <author>", "Package author", DEFAULT_AUTHOR).option("--description <desc>", "Package description").option("--no-create-test-cases", "Do not auto-create Test Cases in Test Manager when this package is uploaded. Per-test label metadata is still embedded, so labels can be applied later when Test Cases are created.").option("--project-key <key>", "Test Manager project key that auto-created Test Cases land in (e.g. MYPROJ) - uppercase letters and digits only. Required when --create-test-cases is on (the default). Packing is offline, so the format is checked here; whether the project exists is confirmed when the package is ingested.").option("--dry-run", "Preview what would be packaged without creating it. Applies the same validation as a real pack, so a dry run that succeeds will pack.").examples(PACK_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
29296
29638
|
const [error, result] = await catchError(executePack({
|
|
29297
29639
|
projectPath: options.projectPath,
|
|
29298
29640
|
type: options.type,
|
|
@@ -30643,8 +30985,9 @@ class TextApiResponse2 {
|
|
|
30643
30985
|
// ../orchestrator-sdk/package.json
|
|
30644
30986
|
var package_default3 = {
|
|
30645
30987
|
name: "@uipath/orchestrator-sdk",
|
|
30988
|
+
author: "UiPath",
|
|
30646
30989
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
30647
|
-
version: "1.
|
|
30990
|
+
version: "1.203.0",
|
|
30648
30991
|
repository: {
|
|
30649
30992
|
type: "git",
|
|
30650
30993
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -33081,7 +33424,7 @@ var DRY_RUN_REPORTS_EXAMPLES = [
|
|
|
33081
33424
|
}
|
|
33082
33425
|
];
|
|
33083
33426
|
var registerPerfScenarioManageCommands = (scenarioCmd, loadGroupCmd) => {
|
|
33084
|
-
scenarioCmd.command("create").examples(CREATE_EXAMPLES).description("Create a performance scenario in a Test Manager project.").
|
|
33427
|
+
scenarioCmd.command("create").examples(CREATE_EXAMPLES).description("Create a performance scenario in a Test Manager project.").addOption(projectKeyOption("Test Manager project key (e.g. SP1)")).addOption(projectIdOption()).requiredOption("--name <name>", "Scenario name").option("--description <text>", "Scenario description", "").option("--version <version>", "Scenario version", "1.0").addOption(new Option("--app-type <type>", "Application type").choices(Object.values(UiPathTestManagementHubPerformanceServiceAbstractionsEnumsApplicationType)).default("web")).addOption(new Option("--perf-test-type <type>", "Performance test type").choices(Object.values(UiPathTestManagementHubPerformanceServiceAbstractionsEnumsPerformanceTestType)).default("loadTesting")).addOption(new Option("--responsiveness <level>", "Responsiveness").choices(Object.values(UiPathTestManagementHubPerformanceServiceAbstractionsEnumsResponsiveness)).default("fast")).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").trackedAction(processContext, async (options) => {
|
|
33085
33428
|
if (!validateScenarioFields(options.description, options.version))
|
|
33086
33429
|
return;
|
|
33087
33430
|
const ctx = await resolveContextWithProject(options);
|
|
@@ -33407,7 +33750,7 @@ var registerPerfScenarioManageCommands = (scenarioCmd, loadGroupCmd) => {
|
|
|
33407
33750
|
}
|
|
33408
33751
|
OutputFormatter.success(new SuccessOutput("ScenarioGet", toScenarioGetRow(scenario, scenarioKey, loadGroups)));
|
|
33409
33752
|
});
|
|
33410
|
-
loadGroupCmd.command("update").examples(UPDATE_EXAMPLES).description("Update one load group's load profile in place (virtual users, ramp / peak / ramp-down minutes, SLO thresholds, robot type, etc.). Use this between a passing dry run and a full 'performanceTesting' run to dial in the real load profile. Only the flags you pass are changed; everything else is preserved.").requiredOption("--load-group-id <uuid>", "Load-group UUID (the 'LoadGroupId' field from 'perf-scenario get' / 'perf-scenario execute' / 'load-groups add'). This is the scenario's load group, not the per-execution id reported by 'load-groups list'.").
|
|
33753
|
+
loadGroupCmd.command("update").examples(UPDATE_EXAMPLES).description("Update one load group's load profile in place (virtual users, ramp / peak / ramp-down minutes, SLO thresholds, robot type, etc.). Use this between a passing dry run and a full 'performanceTesting' run to dial in the real load profile. Only the flags you pass are changed; everything else is preserved.").requiredOption("--load-group-id <uuid>", "Load-group UUID (the 'LoadGroupId' field from 'perf-scenario get' / 'perf-scenario execute' / 'load-groups add'). This is the scenario's load group, not the per-execution id reported by 'load-groups list'.").addOption(projectKeyOption("Test Manager project key (e.g. SP1)")).addOption(projectIdOption()).option("--virtual-users <n>", "Virtual user count", intArg("--virtual-users")).option("--ramp-up-minutes <n>", "Ramp-up duration in minutes", intArg("--ramp-up-minutes")).option("--peak-minutes <n>", "Peak duration in minutes", intArg("--peak-minutes")).option("--ramp-down-minutes <n>", "Ramp-down duration in minutes", intArg("--ramp-down-minutes")).option("--delay-minutes <n>", "Delay before start in minutes", intArg("--delay-minutes")).option("--max-response-time-ms <ms>", "Max response time SLO in ms (server requires >= 100)", intArg("--max-response-time-ms")).option("--max-error-rate <rate>", "Max error rate SLO (server requires >= 0.0001)", floatArg("--max-error-rate")).option("--multiplexing-factor <n>", "Multiplexing factor (recommended value emitted at end of dry run).", intArg("--multiplexing-factor")).addOption(new Option("--robot-type <type>", "Robot type").choices(Object.values(UiPathTestManagementHubPerformanceServiceAbstractionsEnumsLoadGroupRobotType))).addOption(new Option("--enabled <bool>", "Enable/disable this load group").choices(["true", "false"])).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").trackedAction(processContext, async (options) => {
|
|
33411
33754
|
const ctx = await resolveContextWithProject(options);
|
|
33412
33755
|
if (!ctx)
|
|
33413
33756
|
return;
|
|
@@ -33429,7 +33772,7 @@ var registerPerfScenarioManageCommands = (scenarioCmd, loadGroupCmd) => {
|
|
|
33429
33772
|
}
|
|
33430
33773
|
OutputFormatter.success(new SuccessOutput("LoadGroupUpdate", toLoadGroupUpdateRow(loadGroupId, merged)));
|
|
33431
33774
|
});
|
|
33432
|
-
loadGroupCmd.command("remove").examples(REMOVE_EXAMPLES2).description("Remove a load group from a scenario. Detaches the test case and its load profile; the test case itself and any past execution data are left untouched.").requiredOption("--load-group-id <uuid>", "Load-group UUID (the 'LoadGroupId' field from 'perf-scenario get' / 'load-groups add'). This is the scenario's load group, not the per-execution id reported by 'load-groups list'.").
|
|
33775
|
+
loadGroupCmd.command("remove").examples(REMOVE_EXAMPLES2).description("Remove a load group from a scenario. Detaches the test case and its load profile; the test case itself and any past execution data are left untouched.").requiredOption("--load-group-id <uuid>", "Load-group UUID (the 'LoadGroupId' field from 'perf-scenario get' / 'load-groups add'). This is the scenario's load group, not the per-execution id reported by 'load-groups list'.").addOption(projectKeyOption("Test Manager project key (e.g. SP1)")).addOption(projectIdOption()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").trackedAction(processContext, async (options) => {
|
|
33433
33776
|
const ctx = await resolveContextWithProject(options);
|
|
33434
33777
|
if (!ctx)
|
|
33435
33778
|
return;
|
|
@@ -33444,7 +33787,7 @@ var registerPerfScenarioManageCommands = (scenarioCmd, loadGroupCmd) => {
|
|
|
33444
33787
|
}
|
|
33445
33788
|
OutputFormatter.success(new SuccessOutput("LoadGroupRemove", toLoadGroupRemoveRow(loadGroupId)));
|
|
33446
33789
|
});
|
|
33447
|
-
scenarioCmd.command("stop").examples(STOP_EXAMPLES).description("Cancel a running scenario execution. Useful when a long full-load run needs to be aborted (e.g. from another terminal while 'scenario execute --wait' is polling, or when an agent is blocked waiting on a long run).").requiredOption("--execution-id <uuid>", "Scenario execution UUID (returned by 'scenario execute' as 'ExecutionId').").
|
|
33790
|
+
scenarioCmd.command("stop").examples(STOP_EXAMPLES).description("Cancel a running scenario execution. Useful when a long full-load run needs to be aborted (e.g. from another terminal while 'scenario execute --wait' is polling, or when an agent is blocked waiting on a long run).").requiredOption("--execution-id <uuid>", "Scenario execution UUID (returned by 'scenario execute' as 'ExecutionId').").addOption(projectKeyOption("Test Manager project key (e.g. SP1)")).addOption(projectIdOption()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").trackedAction(processContext, async (options) => {
|
|
33448
33791
|
const ctx = await resolveContextWithProject(options);
|
|
33449
33792
|
if (!ctx)
|
|
33450
33793
|
return;
|
|
@@ -33747,7 +34090,7 @@ var registerPerfScenarioCommand = (program2) => {
|
|
|
33747
34090
|
const perf = program2.command("perf-scenario").description("Manage performance scenarios: create and run them, fetch execution data, and generate reports");
|
|
33748
34091
|
const loadGroups = perf.command("load-groups").description("Manage the load groups bound to a performance scenario, and read per-load-group status for an execution");
|
|
33749
34092
|
registerPerfScenarioManageCommands(perf, loadGroups);
|
|
33750
|
-
perf.command("list").description("List the performance scenarios in a Test Manager project.").
|
|
34093
|
+
perf.command("list").description("List the performance scenarios in a Test Manager project.").addOption(projectKeyOption()).addOption(projectIdOption()).option("--search <text>", "Filter scenarios by name or key").option("--limit <n>", "Max results to return (defaults to the service page size when omitted)", parseLimit).option("--offset <n>", "Results to skip for paging (default: 0)", parseOffset).option("--query <expr>", "jq-style filter applied to the output data").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(LIST_EXAMPLES2).trackedAction(processContext, async (options) => {
|
|
33751
34094
|
const ctx = await resolveContextWithProject(options);
|
|
33752
34095
|
if (!ctx)
|
|
33753
34096
|
return;
|
|
@@ -33771,7 +34114,7 @@ var registerPerfScenarioCommand = (program2) => {
|
|
|
33771
34114
|
min: 0,
|
|
33772
34115
|
max: Number.MAX_SAFE_INTEGER
|
|
33773
34116
|
});
|
|
33774
|
-
perf.command("executions").description("Performance scenario executions").command("list").description("List scenario executions (filter dry vs full via --execution-type).").
|
|
34117
|
+
perf.command("executions").description("Performance scenario executions").command("list").description("List scenario executions (filter dry vs full via --execution-type).").addOption(projectKeyOption()).addOption(projectIdOption()).option("--scenario-id <uuid>", "Filter to one scenario (UUID)").addOption(new Option("--execution-type <type>", "Filter by execution type").choices(Object.values(UiPathTestManagementHubPerformanceServiceAbstractionsEnumsScenarioExecutionType))).option("--limit <n>", "Max results to return (defaults to the service page size when omitted)", parseLimit).option("--offset <n>", "Results to skip for paging (default: 0)", parseOffset).option("--query <expr>", "jq-style filter applied to the output data").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(EXECUTIONS_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
33775
34118
|
const ctx = await resolveContextWithProject(options);
|
|
33776
34119
|
if (!ctx)
|
|
33777
34120
|
return;
|
|
@@ -33787,7 +34130,7 @@ var registerPerfScenarioCommand = (program2) => {
|
|
|
33787
34130
|
return emitError(error);
|
|
33788
34131
|
emit(options, "PerfExecutionsList", pascalCaseKeys(data));
|
|
33789
34132
|
});
|
|
33790
|
-
loadGroups.command("list").description("List load groups (test case, SUT, VUs, thresholds, status) for an execution. Note this reports the load groups of one execution; for the load groups configured on the scenario itself use 'perf-scenario get'.").
|
|
34133
|
+
loadGroups.command("list").description("List load groups (test case, SUT, VUs, thresholds, status) for an execution. Note this reports the load groups of one execution; for the load groups configured on the scenario itself use 'perf-scenario get'.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--execution-id <uuid>", "Scenario execution id").option("--query <expr>", "jq-style filter applied to the output data").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(LOAD_GROUPS_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
33791
34134
|
const ctx = await resolveContextWithProject(options);
|
|
33792
34135
|
if (!ctx)
|
|
33793
34136
|
return;
|
|
@@ -34291,19 +34634,13 @@ var registerProjectCommand = (program2) => {
|
|
|
34291
34634
|
Result: "Deleted"
|
|
34292
34635
|
}));
|
|
34293
34636
|
});
|
|
34294
|
-
projectCmd.command("set-default-folder").description("Set the default Orchestrator folder for a project.").
|
|
34295
|
-
const
|
|
34296
|
-
if (authError) {
|
|
34297
|
-
OutputFormatter.error({
|
|
34298
|
-
Result: RESULTS.Failure,
|
|
34299
|
-
Message: authError.message,
|
|
34300
|
-
Instructions: instructionsFor("auth")
|
|
34301
|
-
});
|
|
34302
|
-
processContext.exit(1);
|
|
34303
|
-
return;
|
|
34304
|
-
}
|
|
34637
|
+
projectCmd.command("set-default-folder").description("Set the default Orchestrator folder for a project.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--folder-key <uuid>", "Orchestrator folder key UUID (from 'uip or folders list')").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(PROJECT_SET_DEFAULT_FOLDER_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
34638
|
+
const ctx = await resolveContextWithProject(options);
|
|
34305
34639
|
if (!ctx)
|
|
34306
34640
|
return;
|
|
34641
|
+
const projectKey = await ensureProjectKey(ctx);
|
|
34642
|
+
if (projectKey === null)
|
|
34643
|
+
return;
|
|
34307
34644
|
const { tmConfig, projectId } = ctx;
|
|
34308
34645
|
const [error] = await catchError(new ProjectSettingsApi(tmConfig).projectSettingsUpdateProjectFolder(toUpdateProjectFolderRequest(projectId, options.folderKey)));
|
|
34309
34646
|
if (error) {
|
|
@@ -34319,24 +34656,18 @@ var registerProjectCommand = (program2) => {
|
|
|
34319
34656
|
return;
|
|
34320
34657
|
}
|
|
34321
34658
|
OutputFormatter.success(new SuccessOutput("ProjectSetDefaultFolder", {
|
|
34322
|
-
ProjectKey:
|
|
34659
|
+
ProjectKey: projectKey,
|
|
34323
34660
|
FolderKey: options.folderKey,
|
|
34324
34661
|
Result: "Updated"
|
|
34325
34662
|
}));
|
|
34326
34663
|
});
|
|
34327
|
-
projectCmd.command("clear-default-folder").description("Clear the default Orchestrator folder from a project.").
|
|
34328
|
-
const
|
|
34329
|
-
if (authError) {
|
|
34330
|
-
OutputFormatter.error({
|
|
34331
|
-
Result: RESULTS.Failure,
|
|
34332
|
-
Message: authError.message,
|
|
34333
|
-
Instructions: instructionsFor("auth")
|
|
34334
|
-
});
|
|
34335
|
-
processContext.exit(1);
|
|
34336
|
-
return;
|
|
34337
|
-
}
|
|
34664
|
+
projectCmd.command("clear-default-folder").description("Clear the default Orchestrator folder from a project.").addOption(projectKeyOption()).addOption(projectIdOption()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(PROJECT_CLEAR_DEFAULT_FOLDER_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
34665
|
+
const ctx = await resolveContextWithProject(options);
|
|
34338
34666
|
if (!ctx)
|
|
34339
34667
|
return;
|
|
34668
|
+
const projectKey = await ensureProjectKey(ctx);
|
|
34669
|
+
if (projectKey === null)
|
|
34670
|
+
return;
|
|
34340
34671
|
const { tmConfig, projectId } = ctx;
|
|
34341
34672
|
const [error] = await catchError(new ProjectSettingsApi(tmConfig).projectSettingsUpdateProjectFolder(toClearProjectFolderRequest(projectId)));
|
|
34342
34673
|
if (error) {
|
|
@@ -34352,7 +34683,7 @@ var registerProjectCommand = (program2) => {
|
|
|
34352
34683
|
return;
|
|
34353
34684
|
}
|
|
34354
34685
|
OutputFormatter.success(new SuccessOutput("ProjectClearDefaultFolder", {
|
|
34355
|
-
ProjectKey:
|
|
34686
|
+
ProjectKey: projectKey,
|
|
34356
34687
|
Result: "Cleared"
|
|
34357
34688
|
}));
|
|
34358
34689
|
});
|
|
@@ -34424,7 +34755,7 @@ var REPORT_GET_EXAMPLES = [
|
|
|
34424
34755
|
];
|
|
34425
34756
|
var registerReportCommand = (program2) => {
|
|
34426
34757
|
const reportCmd = program2.command("report").description("Manage Test Manager execution reports");
|
|
34427
|
-
reportCmd.command("get").description("Get a summary report for a completed test execution.").requiredOption("--execution-id <uuid>", "Test execution UUID (from 'testset execute' output)").
|
|
34758
|
+
reportCmd.command("get").description("Get a summary report for a completed test execution.").requiredOption("--execution-id <uuid>", "Test execution UUID (from 'testset execute' output)").addOption(projectKeyOption()).addOption(projectIdOption()).option("--test-set-key <key>", "Test set key to derive project key from (e.g. DEMO:42 → project key DEMO)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("--query <expr>", "jq-style filter applied to the output data — prints raw JSON, bypassing the envelope. " + "Supported: field access (.Field), object construction ({key: .Field}). " + 'Example: --query "{total: .TotalTests, passed: .Passed}"').examples(REPORT_GET_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
34428
34759
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
34429
34760
|
if (authError) {
|
|
34430
34761
|
OutputFormatter.error({
|
|
@@ -34762,7 +35093,7 @@ var REQUIREMENT_LIST_EXAMPLES = [
|
|
|
34762
35093
|
},
|
|
34763
35094
|
{
|
|
34764
35095
|
Description: "Look up specific requirements by UUID (routes through the rich-filter endpoint)",
|
|
34765
|
-
Command: "uip tm requirements list --project-
|
|
35096
|
+
Command: "uip tm requirements list --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --requirement-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002",
|
|
34766
35097
|
Output: {
|
|
34767
35098
|
Code: "RequirementsList",
|
|
34768
35099
|
Data: [REQUIREMENT_DATA_SAMPLE]
|
|
@@ -34782,7 +35113,7 @@ var REQUIREMENT_LIST_BY_EXECUTION_EXAMPLES = [
|
|
|
34782
35113
|
var REQUIREMENT_GET_EXAMPLES = [
|
|
34783
35114
|
{
|
|
34784
35115
|
Description: "Get a requirement by id",
|
|
34785
|
-
Command: "uip tm requirements get --project-
|
|
35116
|
+
Command: "uip tm requirements get --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --requirement-id a1b2c3d4-0000-0000-0000-000000000001",
|
|
34786
35117
|
Output: {
|
|
34787
35118
|
Code: "RequirementGet",
|
|
34788
35119
|
Data: REQUIREMENT_DATA_SAMPLE
|
|
@@ -34808,7 +35139,7 @@ var REQUIREMENT_CREATE_EXAMPLES = [
|
|
|
34808
35139
|
},
|
|
34809
35140
|
{
|
|
34810
35141
|
Description: "Create a requirement linked to a connector (e.g. Jira). --external-reference is free-form; --connector-requirement-uuid must be a UUID identifying the requirement in the connector system.",
|
|
34811
|
-
Command: 'uip tm requirements create --project-
|
|
35142
|
+
Command: 'uip tm requirements create --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --name "Password reset via email" --external-reference JIRA-1234 --connector-requirement-uuid 00000000-0000-0000-0000-000000001234',
|
|
34812
35143
|
Output: {
|
|
34813
35144
|
Code: "RequirementCreate",
|
|
34814
35145
|
Data: REQUIREMENT_DATA_SAMPLE
|
|
@@ -34840,7 +35171,7 @@ var REQUIREMENT_DELETE_EXAMPLES = [
|
|
|
34840
35171
|
},
|
|
34841
35172
|
{
|
|
34842
35173
|
Description: "Delete multiple requirements in one call",
|
|
34843
|
-
Command: "uip tm requirements delete --project-
|
|
35174
|
+
Command: "uip tm requirements delete --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --requirement-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002",
|
|
34844
35175
|
Output: {
|
|
34845
35176
|
Code: "RequirementDelete",
|
|
34846
35177
|
Data: { Passed: 2, Failed: 0 }
|
|
@@ -34891,7 +35222,7 @@ var REQUIREMENT_TESTCASES_EXAMPLES = [
|
|
|
34891
35222
|
},
|
|
34892
35223
|
{
|
|
34893
35224
|
Description: "Detach test cases from a requirement",
|
|
34894
|
-
Command: "uip tm requirements testcases --project-
|
|
35225
|
+
Command: "uip tm requirements testcases --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --requirement-id a1b2c3d4-0000-0000-0000-000000000001 --remove-testcase-ids c1c2c3c4-0000-0000-0000-000000000001",
|
|
34895
35226
|
Output: {
|
|
34896
35227
|
Code: "RequirementUnassignTestCases",
|
|
34897
35228
|
Data: {
|
|
@@ -34904,7 +35235,7 @@ var REQUIREMENT_TESTCASES_EXAMPLES = [
|
|
|
34904
35235
|
];
|
|
34905
35236
|
var registerRequirementCommand = (program2) => {
|
|
34906
35237
|
const requirementCmd = program2.command("requirements").description("Manage Test Manager requirements");
|
|
34907
|
-
requirementCmd.command("list").description("List requirements in a Test Manager project. The CLI picks the most specific backend endpoint based on the filter flag(s) you supply.").
|
|
35238
|
+
requirementCmd.command("list").description("List requirements in a Test Manager project. The CLI picks the most specific backend endpoint based on the filter flag(s) you supply.").addOption(projectKeyOption()).addOption(projectIdOption()).option("--filter <text>", "Search requirements by name or key").option("--requirement-ids <uuid...>", "Filter by requirement UUIDs (space-separated). Routes through the filtered endpoint.").option("--labels <label...>", "Filter by labels (space-separated). When supplied alone, uses a label-only fast path.").option("--updated-by <user-id>", "Filter by user id that last updated").option("--test-case-id <uuid>", "Filter by linked test case id").option("--changed-since <iso-date>", "Return only requirements updated after this ISO-8601 timestamp").option("--sort-by <expression>", "Sort results (e.g. 'name asc')").option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REQUIREMENT_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
34908
35239
|
if (options.changedSince !== undefined) {
|
|
34909
35240
|
const parsed = new Date(options.changedSince);
|
|
34910
35241
|
if (Number.isNaN(parsed.getTime())) {
|
|
@@ -34994,7 +35325,7 @@ var registerRequirementCommand = (program2) => {
|
|
|
34994
35325
|
}
|
|
34995
35326
|
OutputFormatter.success(new SuccessOutput("RequirementsList", toListOutput(page.data ?? [])));
|
|
34996
35327
|
});
|
|
34997
|
-
requirementCmd.command("list-by-test-execution").description("List requirements covered by a test execution.").
|
|
35328
|
+
requirementCmd.command("list-by-test-execution").description("List requirements covered by a test execution.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--execution-id <uuid>", "Test execution UUID").option("--labels <label...>", "Filter by labels (space-separated)").option("--updated-by <user-id>", "Filter by user id that last updated").option("--filter <text>", "Search requirements by name or key").option("--sort-by <expression>", "Sort results (e.g. 'name asc')").option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REQUIREMENT_LIST_BY_EXECUTION_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
34998
35329
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
34999
35330
|
if (authError) {
|
|
35000
35331
|
OutputFormatter.error({
|
|
@@ -35068,7 +35399,7 @@ var registerRequirementCommand = (program2) => {
|
|
|
35068
35399
|
}
|
|
35069
35400
|
OutputFormatter.success(new SuccessOutput("RequirementsListByTestExecution", toListOutput(data)));
|
|
35070
35401
|
});
|
|
35071
|
-
requirementCmd.command("get").description("Get a requirement by id or key. Identify via --requirement-id OR --requirement-key (mutually exclusive).").
|
|
35402
|
+
requirementCmd.command("get").description("Get a requirement by id or key. Identify via --requirement-id OR --requirement-key (mutually exclusive).").addOption(projectKeyOption()).addOption(projectIdOption()).option("--requirement-id <uuid>", "Requirement UUID").option("--requirement-key <key>", "Requirement key (e.g. DEMO:1)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REQUIREMENT_GET_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
35072
35403
|
const hasId = options.requirementId !== undefined;
|
|
35073
35404
|
const hasKey = options.requirementKey !== undefined;
|
|
35074
35405
|
if (hasId === hasKey) {
|
|
@@ -35109,7 +35440,7 @@ var registerRequirementCommand = (program2) => {
|
|
|
35109
35440
|
}
|
|
35110
35441
|
OutputFormatter.success(new SuccessOutput("RequirementGet", toRequirementOutput(requirement)));
|
|
35111
35442
|
});
|
|
35112
|
-
requirementCmd.command("create").description("Create a new requirement.").
|
|
35443
|
+
requirementCmd.command("create").description("Create a new requirement.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--name <name>", "Name of the requirement").option("--description <text>", "Description for the requirement").option("--container-id <uuid>", "Container UUID to place the requirement in").option("--external-reference <ref>", "External reference (e.g. JIRA issue key)").option("--connector-requirement-uuid <uuid>", "UUID identifying the requirement in the linked connector system (must be a valid UUID; the server rejects free-form strings).").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REQUIREMENT_CREATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
35113
35444
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
35114
35445
|
if (authError) {
|
|
35115
35446
|
OutputFormatter.error({
|
|
@@ -35145,7 +35476,7 @@ var registerRequirementCommand = (program2) => {
|
|
|
35145
35476
|
}
|
|
35146
35477
|
OutputFormatter.success(new SuccessOutput("RequirementCreate", toRequirementOutput(requirement)));
|
|
35147
35478
|
});
|
|
35148
|
-
requirementCmd.command("update").description("Update a requirement name or description.").
|
|
35479
|
+
requirementCmd.command("update").description("Update a requirement name or description.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--requirement-id <uuid>", "Requirement UUID").option("--name <name>", "New requirement name").option("--description <text>", "New requirement description").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REQUIREMENT_UPDATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
35149
35480
|
if (options.name === undefined && options.description === undefined) {
|
|
35150
35481
|
OutputFormatter.error({
|
|
35151
35482
|
Result: RESULTS.ValidationError,
|
|
@@ -35194,7 +35525,7 @@ var registerRequirementCommand = (program2) => {
|
|
|
35194
35525
|
Result: "Updated"
|
|
35195
35526
|
}));
|
|
35196
35527
|
});
|
|
35197
|
-
requirementCmd.command("delete").description("Delete one or more requirements. --requirement-ids is variadic — pass one UUID for a singleton delete or several for a bulk delete; both route through the same TMH bulk endpoint.").
|
|
35528
|
+
requirementCmd.command("delete").description("Delete one or more requirements. --requirement-ids is variadic — pass one UUID for a singleton delete or several for a bulk delete; both route through the same TMH bulk endpoint.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--requirement-ids <uuid...>", "Requirement UUIDs to delete (space-separated). Pass a single UUID for a singleton delete.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(REQUIREMENT_DELETE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
35198
35529
|
const ids = Array.isArray(options.requirementIds) ? options.requirementIds : [];
|
|
35199
35530
|
if (!requireConfirmation(options, `delete ${ids.length} requirement(s)`))
|
|
35200
35531
|
return;
|
|
@@ -35236,23 +35567,17 @@ var registerRequirementCommand = (program2) => {
|
|
|
35236
35567
|
}
|
|
35237
35568
|
OutputFormatter.success(new SuccessOutput("RequirementDelete", await toBulkDeleteOutput2(response.raw, ids.length)));
|
|
35238
35569
|
});
|
|
35239
|
-
requirementCmd.command("export").description("Export requirements to an .xlsx file.").
|
|
35570
|
+
requirementCmd.command("export").description("Export requirements to an .xlsx file.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--output-file <path>", "Destination file path for the exported .xlsx").option("--requirement-ids <uuid...>", "Filter by requirement UUIDs (space-separated)").option("--updated-by <user-id>", "Filter by user id that last updated").option("--test-case-id <uuid>", "Filter by linked test case id").option("--labels <label...>", "Filter by labels (space-separated)").option("--filter <text>", "Search requirements by name or key").option("--sort-by <expression>", "Sort results (e.g. 'name asc')").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REQUIREMENT_EXPORT_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
35240
35571
|
if (options.top !== undefined || options.skip !== undefined) {
|
|
35241
35572
|
getOutputSink().writeErr("[WARN] --top / --skip on `requirement export` are deprecated and have no effect (the server paginates internally).\n");
|
|
35242
35573
|
}
|
|
35243
|
-
const
|
|
35244
|
-
if (authError) {
|
|
35245
|
-
OutputFormatter.error({
|
|
35246
|
-
Result: RESULTS.Failure,
|
|
35247
|
-
Message: authError.message,
|
|
35248
|
-
Instructions: instructionsFor("auth")
|
|
35249
|
-
});
|
|
35250
|
-
processContext.exit(1);
|
|
35251
|
-
return;
|
|
35252
|
-
}
|
|
35574
|
+
const ctx = await resolveContextWithProject(options);
|
|
35253
35575
|
if (!ctx)
|
|
35254
35576
|
return;
|
|
35255
|
-
const
|
|
35577
|
+
const projectKey = await ensureProjectKey(ctx);
|
|
35578
|
+
if (projectKey === null)
|
|
35579
|
+
return;
|
|
35580
|
+
const { tmConfig, projectId } = ctx;
|
|
35256
35581
|
const api = new RequirementsApi(tmConfig);
|
|
35257
35582
|
const [error, response] = await catchError(api.requirementsExportRaw(toExportRequest(projectId, projectKey, {
|
|
35258
35583
|
ids: options.requirementIds,
|
|
@@ -35317,7 +35642,7 @@ var registerRequirementCommand = (program2) => {
|
|
|
35317
35642
|
Result: "Exported"
|
|
35318
35643
|
}));
|
|
35319
35644
|
});
|
|
35320
|
-
requirementCmd.command("list-testcase-ids").description("List the test case UUIDs assigned to a requirement.").
|
|
35645
|
+
requirementCmd.command("list-testcase-ids").description("List the test case UUIDs assigned to a requirement.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--requirement-id <uuid>", "Requirement UUID").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REQUIREMENT_LIST_TESTCASE_IDS_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
35321
35646
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
35322
35647
|
if (authError) {
|
|
35323
35648
|
OutputFormatter.error({
|
|
@@ -35347,7 +35672,7 @@ var registerRequirementCommand = (program2) => {
|
|
|
35347
35672
|
}
|
|
35348
35673
|
OutputFormatter.success(new SuccessOutput("RequirementTestCaseIdsList", toTestCaseIdsOutput(testCaseIds ?? [])));
|
|
35349
35674
|
});
|
|
35350
|
-
requirementCmd.command("testcases").description("Attach or detach test cases on a requirement. Pass --add-testcase-ids OR --remove-testcase-ids (mutually exclusive); both accept one or more test case UUIDs (space-separated).").
|
|
35675
|
+
requirementCmd.command("testcases").description("Attach or detach test cases on a requirement. Pass --add-testcase-ids OR --remove-testcase-ids (mutually exclusive); both accept one or more test case UUIDs (space-separated).").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--requirement-id <uuid>", "Requirement UUID").option("--add-testcase-ids <uuid...>", "Test case UUIDs to attach to the requirement (space-separated)").option("--remove-testcase-ids <uuid...>", "Test case UUIDs to detach from the requirement (space-separated)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REQUIREMENT_TESTCASES_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
35351
35676
|
const addIds = Array.isArray(options.addTestcaseIds) ? options.addTestcaseIds : [];
|
|
35352
35677
|
const removeIds = Array.isArray(options.removeTestcaseIds) ? options.removeTestcaseIds : [];
|
|
35353
35678
|
if (addIds.length === 0 && removeIds.length === 0) {
|
|
@@ -35527,23 +35852,16 @@ var RESULT_DOWNLOAD_EXAMPLES = [
|
|
|
35527
35852
|
];
|
|
35528
35853
|
var registerResultCommand = (program2) => {
|
|
35529
35854
|
const resultCmd = program2.command("result").description("Manage Test Manager execution results");
|
|
35530
|
-
resultCmd.command("download").description("Download test execution results as JUnit XML.").requiredOption("--execution-id <uuid>", "Test execution UUID to download results for").
|
|
35531
|
-
const
|
|
35532
|
-
if (authError) {
|
|
35533
|
-
OutputFormatter.error({
|
|
35534
|
-
Result: RESULTS.Failure,
|
|
35535
|
-
Message: authError.message,
|
|
35536
|
-
Instructions: instructionsFor("auth")
|
|
35537
|
-
});
|
|
35538
|
-
processContext.exit(1);
|
|
35539
|
-
return;
|
|
35540
|
-
}
|
|
35855
|
+
resultCmd.command("download").description("Download test execution results as JUnit XML.").requiredOption("--execution-id <uuid>", "Test execution UUID to download results for").addOption(projectKeyOption()).addOption(projectIdOption()).option("--test-set-key <key>", "Test set key to derive project key from (e.g. DEMO:42 → DEMO)").option("--result-path <path>", "Output file or directory (default: current working directory)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(RESULT_DOWNLOAD_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
35856
|
+
const ctx = await resolveContextWithProject(options);
|
|
35541
35857
|
if (!ctx)
|
|
35542
35858
|
return;
|
|
35859
|
+
const projectKey = await ensureProjectKey(ctx);
|
|
35860
|
+
if (projectKey === null)
|
|
35861
|
+
return;
|
|
35543
35862
|
const {
|
|
35544
35863
|
tmConfig,
|
|
35545
35864
|
projectId,
|
|
35546
|
-
projectKey,
|
|
35547
35865
|
organizationName,
|
|
35548
35866
|
organizationId,
|
|
35549
35867
|
baseUrl,
|
|
@@ -36159,6 +36477,24 @@ var TESTCASE_LIST_EXAMPLES = [
|
|
|
36159
36477
|
}
|
|
36160
36478
|
]
|
|
36161
36479
|
}
|
|
36480
|
+
},
|
|
36481
|
+
{
|
|
36482
|
+
Description: "Name the project by ID instead of key — same result, and the key lookup is skipped. Worth it in a script that runs several commands against one project.",
|
|
36483
|
+
Command: "uip tm testcases list --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723",
|
|
36484
|
+
Output: {
|
|
36485
|
+
Code: "TestCasesList",
|
|
36486
|
+
Data: [
|
|
36487
|
+
{
|
|
36488
|
+
Id: "a1b2c3d4-0000-0000-0000-000000000001",
|
|
36489
|
+
TestCaseKey: "DEMO:1",
|
|
36490
|
+
Name: "Login smoke",
|
|
36491
|
+
Version: "1.0.0",
|
|
36492
|
+
Description: "Logs in and out",
|
|
36493
|
+
FeedId: "f1e2d3c4-0000-0000-0000-000000000001",
|
|
36494
|
+
IsAutomated: false
|
|
36495
|
+
}
|
|
36496
|
+
]
|
|
36497
|
+
}
|
|
36162
36498
|
}
|
|
36163
36499
|
];
|
|
36164
36500
|
var TESTCASE_LIST_RESULT_HISTORY_EXAMPLES = [
|
|
@@ -36328,7 +36664,7 @@ var TESTCASE_UPDATE_EXAMPLES = [
|
|
|
36328
36664
|
},
|
|
36329
36665
|
{
|
|
36330
36666
|
Description: "Set the pre/post-condition of a test case",
|
|
36331
|
-
Command: 'uip tm testcases update --project-
|
|
36667
|
+
Command: 'uip tm testcases update --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --test-case-key DEMO:1 --pre-condition "User account exists and app is reachable" --post-condition "User is logged out"',
|
|
36332
36668
|
Output: {
|
|
36333
36669
|
Code: "TestCaseUpdate",
|
|
36334
36670
|
Data: {
|
|
@@ -36412,7 +36748,7 @@ var TESTCASE_EXECUTE_EXAMPLES = [
|
|
|
36412
36748
|
},
|
|
36413
36749
|
{
|
|
36414
36750
|
Description: "Start an execution using every available option (async, target overrides and [JSON] --test-set-packages)",
|
|
36415
|
-
Command: `uip tm testcases run --project-
|
|
36751
|
+
Command: `uip tm testcases run --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --test-case-id a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 --execution-type automated --async --name "Smoke run" --folder-key f0f0f0f0-0000-0000-0000-000000000001 --runtime-type Unattended --robot-user-key 22222222-3333-4444-5555-666666666666 --machine-key 33333333-4444-5555-6666-777777777777 --host-machine-name BOT-01 --service-user-name svc-runner --test-set-packages '[{"packageName":"InvoiceTests","version":"1.0.2"}]'`,
|
|
36416
36752
|
Output: {
|
|
36417
36753
|
Code: "TestCaseRun",
|
|
36418
36754
|
Data: {
|
|
@@ -36519,7 +36855,7 @@ var STEPS_ADD_EXAMPLES = [
|
|
|
36519
36855
|
},
|
|
36520
36856
|
{
|
|
36521
36857
|
Description: "Add several steps inline. Each --step is a JSON object with a required `description` plus optional `expectedResult`, `clipboardData`, and `orderNo`. Steps append in the order given.",
|
|
36522
|
-
Command: `uip tm testcases steps add --project-
|
|
36858
|
+
Command: `uip tm testcases steps add --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --test-case-id a1b2c3d4-0000-0000-0000-000000000001 --step '{"description":"Open login page","expectedResult":"Login form is shown"}' --step '{"description":"Enter credentials","clipboardData":"user@acme.com"}' --step '{"description":"Click submit","expectedResult":"Dashboard loads"}'`,
|
|
36523
36859
|
Output: {
|
|
36524
36860
|
Code: "TestStepAdd",
|
|
36525
36861
|
Data: {
|
|
@@ -36614,7 +36950,7 @@ var TESTCASE_LIST_AUTOMATIONS_EXAMPLES = [
|
|
|
36614
36950
|
},
|
|
36615
36951
|
{
|
|
36616
36952
|
Description: "List available automations in an Orchestrator folder of type tenant feed",
|
|
36617
|
-
Command: "uip tm testcases list-automations --project-
|
|
36953
|
+
Command: "uip tm testcases list-automations --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723",
|
|
36618
36954
|
Output: {
|
|
36619
36955
|
Code: "TestAutomationsList",
|
|
36620
36956
|
Data: [
|
|
@@ -36683,7 +37019,7 @@ function describeEmptySelection(options) {
|
|
|
36683
37019
|
}
|
|
36684
37020
|
var registerTestcaseCommand = (program2) => {
|
|
36685
37021
|
const testcaseCmd = program2.command("testcases").description("Manage Test Manager test cases");
|
|
36686
|
-
testcaseCmd.command("create").description("Create a new test case in a Test Manager project.").
|
|
37022
|
+
testcaseCmd.command("create").description("Create a new test case in a Test Manager project.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--name <name>", "Name of the test case").option("--description <text>", "Description for the test case").option("--version <version>", "Version of the test case", DEFAULT_TEST_CASE_VERSION).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_CREATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
36687
37023
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
36688
37024
|
if (authError) {
|
|
36689
37025
|
OutputFormatter.error({
|
|
@@ -36727,7 +37063,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
36727
37063
|
Version: testCase.version ?? ""
|
|
36728
37064
|
}));
|
|
36729
37065
|
});
|
|
36730
|
-
testcaseCmd.command("list").description("List all test cases in a Test Manager project.").
|
|
37066
|
+
testcaseCmd.command("list").description("List all test cases in a Test Manager project.").addOption(projectKeyOption()).addOption(projectIdOption()).option("--filter <text>", "Filter test cases by name or key").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
36731
37067
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
36732
37068
|
if (authError) {
|
|
36733
37069
|
OutputFormatter.error({
|
|
@@ -36792,7 +37128,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
36792
37128
|
}));
|
|
36793
37129
|
OutputFormatter.success(new SuccessOutput("TestCasesList", outputRows));
|
|
36794
37130
|
});
|
|
36795
|
-
testcaseCmd.command("list-result-history").description("List testcase log result history for a specific test case.").
|
|
37131
|
+
testcaseCmd.command("list-result-history").description("List testcase log result history for a specific test case.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-id <uuid>", "Test case UUID").option("--filter <text>", "Search test case logs by name").option("--only-failed", "Show only failed test case logs", false).addOption(new Option("--results <results...>", `Filter by results (space-separated: ${Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult).join(" ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult))).addOption(new Option("--statuses <statuses...>", `Filter by execution statuses (space-separated: ${Object.values(UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus).join(" ")})`).choices(Object.values(UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus))).addOption(new Option("--duration-period <period>", `Filter by duration period (${Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod))).option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_LIST_RESULT_HISTORY_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
36796
37132
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
36797
37133
|
if (authError) {
|
|
36798
37134
|
OutputFormatter.error({
|
|
@@ -36842,7 +37178,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
36842
37178
|
}
|
|
36843
37179
|
OutputFormatter.success(new SuccessOutput("TestCaseResultHistory", toOutput3(page.data ?? [])));
|
|
36844
37180
|
});
|
|
36845
|
-
testcaseCmd.command("delete").description("Delete a test case by its key.").
|
|
37181
|
+
testcaseCmd.command("delete").description("Delete a test case by its key.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-key <key>", "Test case object key (e.g. DEMO:42)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(TESTCASE_DELETE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
36846
37182
|
if (!requireConfirmation(options, `delete test case '${options.testCaseKey}'`))
|
|
36847
37183
|
return;
|
|
36848
37184
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
@@ -36906,7 +37242,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
36906
37242
|
Result: "Deleted"
|
|
36907
37243
|
}));
|
|
36908
37244
|
});
|
|
36909
|
-
testcaseCmd.command("link-automation").description("Link an Orchestrator package automation to a test case.").
|
|
37245
|
+
testcaseCmd.command("link-automation").description("Link an Orchestrator package automation to a test case.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-key <key>", "Test case object key (e.g. DEMO:2)").requiredOption("--folder-key <uuid>", "Orchestrator folder key UUID (from 'uip or folders list')").requiredOption("--package-name <name>", "Orchestrator package identifier (e.g. ProjCSCrossTestCases)").requiredOption("--test-name <name>", "Test case name inside the package (e.g. MyDemoTest2)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_LINK_AUTOMATION_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
36910
37246
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
36911
37247
|
if (authError) {
|
|
36912
37248
|
OutputFormatter.error({
|
|
@@ -37065,7 +37401,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37065
37401
|
Result: "Linked"
|
|
37066
37402
|
}));
|
|
37067
37403
|
});
|
|
37068
|
-
testcaseCmd.command("link-package").description("Create and link a test case for every test in an Orchestrator package, in one call.").
|
|
37404
|
+
testcaseCmd.command("link-package").description("Create and link a test case for every test in an Orchestrator package, in one call.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--folder-key <uuid>", "Orchestrator folder key UUID (from 'uip or folders list')").option("--package-name <name>", "Only link tests from this package (case-insensitive exact match). Omit to link every test the folder exposes.").option("--test-name <name...>", "Only link these tests (case-insensitive). Omit to link all of them.").option("--dry-run", "Preview which test cases would be created, reused and linked, without writing anything.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_LINK_PACKAGE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37069
37405
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
37070
37406
|
if (authError) {
|
|
37071
37407
|
OutputFormatter.error({
|
|
@@ -37078,7 +37414,8 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37078
37414
|
}
|
|
37079
37415
|
if (!ctx)
|
|
37080
37416
|
return;
|
|
37081
|
-
const { tmConfig, projectId } = ctx;
|
|
37417
|
+
const { tmConfig, projectId, projectKey } = ctx;
|
|
37418
|
+
const projectFlag = projectKey !== undefined ? `--project-key ${projectKey}` : `--project-id ${projectId}`;
|
|
37082
37419
|
const [error, rows] = await catchError(linkPackage(tmConfig, projectId, options));
|
|
37083
37420
|
if (error) {
|
|
37084
37421
|
const { result, errorCode: errorCode2, message, retry, details } = await extractErrorDetails2(error, {
|
|
@@ -37089,7 +37426,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37089
37426
|
Result: result,
|
|
37090
37427
|
ErrorCode: stated.errorCode ?? errorCode2,
|
|
37091
37428
|
Message: message,
|
|
37092
|
-
Instructions: readInstructions(error) ?? (details && details !== message ? details : `Run 'uip tm testcases list-automations
|
|
37429
|
+
Instructions: readInstructions(error) ?? (details && details !== message ? details : `Run 'uip tm testcases list-automations ${projectFlag} --folder-key ${options.folderKey}' to see the tests this folder exposes.`),
|
|
37093
37430
|
Retry: stated.retry ?? retry
|
|
37094
37431
|
});
|
|
37095
37432
|
processContext.exit(1);
|
|
@@ -37097,7 +37434,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37097
37434
|
}
|
|
37098
37435
|
OutputFormatter.success(new SuccessOutput(options.dryRun ? "TestCaseLinkPackageDryRun" : "TestCaseLinkPackage", rows));
|
|
37099
37436
|
});
|
|
37100
|
-
testcaseCmd.command("update").description("Update a test case's name, description, or pre/post-condition.").
|
|
37437
|
+
testcaseCmd.command("update").description("Update a test case's name, description, or pre/post-condition.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-key <key>", "Test case key (e.g. DEMO:1)").option("--name <name>", "New test case name").option("--description <text>", "New test case description").option("--pre-condition <text>", "New precondition (what must be true before running the test)").option("--post-condition <text>", "New postcondition (what should be true after running the test)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_UPDATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37101
37438
|
const operations = [];
|
|
37102
37439
|
if (options.name !== undefined)
|
|
37103
37440
|
operations.push({
|
|
@@ -37182,7 +37519,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37182
37519
|
Result: "Updated"
|
|
37183
37520
|
}));
|
|
37184
37521
|
});
|
|
37185
|
-
testcaseCmd.command("list-testsets").description("List test sets that contain a given test case.").
|
|
37522
|
+
testcaseCmd.command("list-testsets").description("List test sets that contain a given test case.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-key <key>", "Test case key (e.g. DEMO:1)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_LIST_TESTSETS_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37186
37523
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
37187
37524
|
if (authError) {
|
|
37188
37525
|
OutputFormatter.error({
|
|
@@ -37245,7 +37582,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37245
37582
|
}));
|
|
37246
37583
|
OutputFormatter.success(new SuccessOutput("TestCaseTestSetsList", rows));
|
|
37247
37584
|
});
|
|
37248
|
-
testcaseCmd.command("unlink-automation").description("Unlink the automation from a test case.").
|
|
37585
|
+
testcaseCmd.command("unlink-automation").description("Unlink the automation from a test case.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-key <key>", "Test case object key (e.g. DEMO:2)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_UNLINK_AUTOMATION_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37249
37586
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
37250
37587
|
if (authError) {
|
|
37251
37588
|
OutputFormatter.error({
|
|
@@ -37309,7 +37646,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37309
37646
|
Result: "Unlinked"
|
|
37310
37647
|
}));
|
|
37311
37648
|
});
|
|
37312
|
-
testcaseCmd.command("list-automations").description("List test entry points available in an Orchestrator folder (use with link-automation).").
|
|
37649
|
+
testcaseCmd.command("list-automations").description("List test entry points available in an Orchestrator folder (use with link-automation).").addOption(projectKeyOption()).addOption(projectIdOption()).option("--folder-key <uuid>", "Orchestrator folder key UUID (from 'uip or folders list')").option("--package-name <name>", "Filter by package name (case-insensitive substring)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTCASE_LIST_AUTOMATIONS_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37313
37650
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
37314
37651
|
if (authError) {
|
|
37315
37652
|
OutputFormatter.error({
|
|
@@ -37346,7 +37683,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37346
37683
|
}));
|
|
37347
37684
|
OutputFormatter.success(new SuccessOutput("TestAutomationsList", rows));
|
|
37348
37685
|
});
|
|
37349
|
-
testcaseCmd.command("run").description("Run a new execution for one or more test cases.").
|
|
37686
|
+
testcaseCmd.command("run").description("Run a new execution for one or more test cases.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-id <uuid...>", "Test case UUID to execute. space separated: --test-case-id <uuid1> <uuid2>", []).requiredOption("--name <name>", "Test set name for the new execution").addOption(new Option("--execution-type <type>", `Execution type (${Object.values(UiPathTestManagementHubCommonEnumsExecutionType).join(", ")})`).choices(Object.values(UiPathTestManagementHubCommonEnumsExecutionType)).makeOptionMandatory()).option("--async", "Start execution asynchronously", false).option("--folder-key <key>", "Orchestrator folder key to run the execution in").addOption(new Option("--runtime-type <type>", `Robot runtime type (${Object.values(UiPathTestManagementHubCommonEnumsRobotType).join(", ")})`).choices(Object.values(UiPathTestManagementHubCommonEnumsRobotType))).option("--robot-user-key <key>", "Robot user key for the execution target").option("--machine-key <key>", "Machine key for the execution target").option("--host-machine-name <name>", "Host machine name for the execution target").option("--service-user-name <name>", "Service user name for the execution target").option("--test-set-packages <json>", "[JSON] Packages to use for the execution.", (value) => JSON.parse(value)).examples(TESTCASE_EXECUTE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37350
37687
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
37351
37688
|
if (authError) {
|
|
37352
37689
|
OutputFormatter.error({
|
|
@@ -37411,9 +37748,9 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37411
37748
|
}
|
|
37412
37749
|
OutputFormatter.success(new SuccessOutput("TestCaseStepsList", toOutput6(steps ?? [])));
|
|
37413
37750
|
};
|
|
37414
|
-
stepsCmd.command("list").description("List the steps of a test case.").
|
|
37415
|
-
testcaseCmd.command("list-steps").description("List the steps of a test case (alias for 'steps list').").
|
|
37416
|
-
stepsCmd.command("get").description("Get a single test step by its id.").
|
|
37751
|
+
stepsCmd.command("list").description("List the steps of a test case.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-id <uuid>", "Test case UUID").examples(TESTCASE_LIST_STEPS_EXAMPLES).trackedAction(processContext, runListSteps);
|
|
37752
|
+
testcaseCmd.command("list-steps", { hidden: true }).description("List the steps of a test case (alias for 'steps list').").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-id <uuid>", "Test case UUID").examples(TESTCASE_LIST_STEPS_EXAMPLES).trackedAction(processContext, runListSteps);
|
|
37753
|
+
stepsCmd.command("get").description("Get a single test step by its id.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--step-id <uuid>", "Test step UUID").examples(STEPS_GET_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37417
37754
|
const ctx = await resolveContextOrExit(options);
|
|
37418
37755
|
if (!ctx)
|
|
37419
37756
|
return;
|
|
@@ -37426,7 +37763,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37426
37763
|
}
|
|
37427
37764
|
OutputFormatter.success(new SuccessOutput("TestStepGet", toStepOutput(step)));
|
|
37428
37765
|
});
|
|
37429
|
-
stepsCmd.command("add").description("Add one or more steps to a test case. Pass step flags for one step, or repeat --step for several.").
|
|
37766
|
+
stepsCmd.command("add").description("Add one or more steps to a test case. Pass step flags for one step, or repeat --step for several.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-case-id <uuid>", "Test case UUID").option("--description <text>", "Step description (one-step mode)").option("--expected-result <text>", "What should happen after the step (one-step mode)").option("--action-type <type>", "Step action type (one-step mode)").option("--clipboard-data <text>", "Test data to copy for the step (one-step mode)").option("--order-no <n>", "0-based position to insert the step at (one-step mode); omit to append at the end").option("--step <json...>", "A step as a JSON object; pass several (space-separated or by repeating --step) to add multiple in order").examples(STEPS_ADD_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37430
37767
|
const [parseError, records] = await catchError(resolveStepRecords(options));
|
|
37431
37768
|
if (parseError) {
|
|
37432
37769
|
OutputFormatter.error({
|
|
@@ -37442,7 +37779,8 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37442
37779
|
const ctx = await resolveContextOrExit(options);
|
|
37443
37780
|
if (!ctx)
|
|
37444
37781
|
return;
|
|
37445
|
-
const { tmConfig, projectId } = ctx;
|
|
37782
|
+
const { tmConfig, projectId, projectKey } = ctx;
|
|
37783
|
+
const projectFlag = projectKey !== undefined ? `--project-key ${projectKey}` : `--project-id ${projectId}`;
|
|
37446
37784
|
const testStepsApi = new TestStepsApi(tmConfig);
|
|
37447
37785
|
const created = [];
|
|
37448
37786
|
for (let i = 0;i < records.length; i++) {
|
|
@@ -37454,7 +37792,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37454
37792
|
OutputFormatter.error({
|
|
37455
37793
|
Result: RESULTS.Failure,
|
|
37456
37794
|
Message: `Added ${created.length} of ${records.length} step(s). Step ${i + 1} failed: ${message}`,
|
|
37457
|
-
Instructions: `Adding steps is not atomic, so the first ${created.length} step(s) were created and remain. Run 'uip tm testcases steps list
|
|
37795
|
+
Instructions: `Adding steps is not atomic, so the first ${created.length} step(s) were created and remain. Run 'uip tm testcases steps list ${projectFlag} --test-case-id ${options.testCaseId}' to review, then retry the rest.`
|
|
37458
37796
|
});
|
|
37459
37797
|
processContext.exit(1);
|
|
37460
37798
|
return;
|
|
@@ -37466,7 +37804,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37466
37804
|
Steps: toOutput6(created)
|
|
37467
37805
|
}));
|
|
37468
37806
|
});
|
|
37469
|
-
stepsCmd.command("update").description("Update a step. Only the fields you pass change; the rest stay as they are.").
|
|
37807
|
+
stepsCmd.command("update").description("Update a step. Only the fields you pass change; the rest stay as they are.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--step-id <uuid>", "Test step UUID").option("--description <text>", "New description").option("--expected-result <text>", "New expected result").option("--action-type <type>", "New action type").option("--clipboard-data <text>", "New test data to copy for the step").examples(STEPS_UPDATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37470
37808
|
if (options.description === undefined && options.expectedResult === undefined && options.actionType === undefined && options.clipboardData === undefined) {
|
|
37471
37809
|
OutputFormatter.error({
|
|
37472
37810
|
Result: RESULTS.Failure,
|
|
@@ -37505,7 +37843,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37505
37843
|
Result: "Updated"
|
|
37506
37844
|
}));
|
|
37507
37845
|
});
|
|
37508
|
-
stepsCmd.command("move").description("Move a step to a new position in the test case.").
|
|
37846
|
+
stepsCmd.command("move").description("Move a step to a new position in the test case.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--step-id <uuid>", "Test step UUID").requiredOption("--target-position <n>", "New 0-based position (0 = first), matching the OrderNo from 'steps list'").examples(STEPS_MOVE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37509
37847
|
const rawPosition = String(options.targetPosition).trim();
|
|
37510
37848
|
const targetPosition = Number(rawPosition);
|
|
37511
37849
|
if (rawPosition === "" || !Number.isInteger(targetPosition) || targetPosition < 0) {
|
|
@@ -37533,7 +37871,7 @@ var registerTestcaseCommand = (program2) => {
|
|
|
37533
37871
|
Result: "Moved"
|
|
37534
37872
|
}));
|
|
37535
37873
|
});
|
|
37536
|
-
stepsCmd.command("delete").description("Delete a step from a test case.").
|
|
37874
|
+
stepsCmd.command("delete").description("Delete a step from a test case.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--step-id <uuid>", "Test step UUID").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(STEPS_DELETE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37537
37875
|
if (!requireConfirmation(options, `delete test step '${options.stepId}'`))
|
|
37538
37876
|
return;
|
|
37539
37877
|
const ctx = await resolveContextOrExit(options);
|
|
@@ -37904,7 +38242,7 @@ var TESTCASELOG_FINISH_EXAMPLES = [
|
|
|
37904
38242
|
},
|
|
37905
38243
|
{
|
|
37906
38244
|
Description: "Finish a test case execution with step results loaded from a file",
|
|
37907
|
-
Command: "uip tm testcaselog finish --project-
|
|
38245
|
+
Command: "uip tm testcaselog finish --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723 --execution-id a1b2c3d4-0000-0000-0000-000000000001 --test-case-id b2c3d4e5-0000-0000-0000-000000000001 --result Failed --step-logs-file ./step-logs.json",
|
|
37908
38246
|
Output: {
|
|
37909
38247
|
Code: "TestCaseLogFinish",
|
|
37910
38248
|
Data: {
|
|
@@ -37968,7 +38306,7 @@ var TESTCASELOG_LIST_ASSERTIONS_EXAMPLES = [
|
|
|
37968
38306
|
];
|
|
37969
38307
|
var registerTestcaselogCommand = (program2) => {
|
|
37970
38308
|
const testcaselogCmd = program2.command("testcaselog").description("Manage Test Manager test case logs");
|
|
37971
|
-
testcaselogCmd.command("start").description("Start a test case execution within a test execution.").
|
|
38309
|
+
testcaselogCmd.command("start").description("Start a test case execution within a test execution.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--execution-id <uuid>", "Test execution UUID returned by 'testcase execute'").requiredOption("--test-case-id <uuid>", "Test case UUID").option("--run-id <number>", "Run Id", (v) => parseInt(v, 10)).examples(TESTCASELOG_START_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
37972
38310
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
37973
38311
|
if (authError) {
|
|
37974
38312
|
OutputFormatter.error({
|
|
@@ -38019,7 +38357,7 @@ var registerTestcaselogCommand = (program2) => {
|
|
|
38019
38357
|
}
|
|
38020
38358
|
OutputFormatter.success(new SuccessOutput("TestCaseLogStart", toOutput3(testCaseLog)));
|
|
38021
38359
|
});
|
|
38022
|
-
testcaselogCmd.command("finish").description("Finish a test case execution and record all step results in one call.").
|
|
38360
|
+
testcaselogCmd.command("finish").description("Finish a test case execution and record all step results in one call.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--execution-id <uuid>", "Test execution UUID returned by 'testcase execute'").requiredOption("--test-case-id <uuid>", "Test case UUID").addOption(new Option("--result <result>", `Overall result (${Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult)).makeOptionMandatory()).requiredOption("--has-error <boolean>", "Mark the execution as having an error", (v) => v.toLowerCase() === "true").requiredOption("--executed-by <name>", "Email of the user who executed the test").option("--detail-link <url>", "URL with additional execution details").option("--run-id <number>", "Run Id", (v) => parseInt(v, 10)).option("--is-post-condition-met <boolean>", "Mark that the post-condition was met", (v) => v.toLowerCase() === "true").addOption(new Option("--step-logs <json>", "[JSON] Step results to record for this test case execution.").argParser((value) => JSON.parse(value)).conflicts("stepLogsFile")).addOption(new Option("--step-logs-file <path>", "Path to a JSON file with the same shape as --step-logs. Mutually exclusive with --step-logs.").conflicts("stepLogs")).examples(TESTCASELOG_FINISH_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
38023
38361
|
let content;
|
|
38024
38362
|
if (options.stepLogsFile !== undefined) {
|
|
38025
38363
|
try {
|
|
@@ -38110,7 +38448,7 @@ var registerTestcaselogCommand = (program2) => {
|
|
|
38110
38448
|
}
|
|
38111
38449
|
OutputFormatter.success(new SuccessOutput("TestCaseLogFinish", toOutput3(testCaseLog)));
|
|
38112
38450
|
});
|
|
38113
|
-
testcaselogCmd.command("list-assertions").description("List assertions for a test case log.").requiredOption("--test-case-log-id <uuid>", "Test case log UUID").
|
|
38451
|
+
testcaselogCmd.command("list-assertions").description("List assertions for a test case log.").requiredOption("--test-case-log-id <uuid>", "Test case log UUID").addOption(projectKeyOption()).addOption(projectIdOption()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).examples(TESTCASELOG_LIST_ASSERTIONS_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
38114
38452
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
38115
38453
|
if (authError) {
|
|
38116
38454
|
OutputFormatter.error({
|
|
@@ -38165,17 +38503,16 @@ async function getPlaywrightProjectContext(testSetsApi, projectId, testSetId, te
|
|
|
38165
38503
|
}
|
|
38166
38504
|
}
|
|
38167
38505
|
var isPlaywrightContext = (context) => Boolean(context.packageIdentifier && context.version);
|
|
38168
|
-
async function applyPlaywrightProjectSelection(testSetsApi, projectId, testSetId, testSetKey,
|
|
38506
|
+
async function applyPlaywrightProjectSelection(testSetsApi, projectId, testSetId, testSetKey, requestedProject) {
|
|
38169
38507
|
const context = await getPlaywrightProjectContext(testSetsApi, projectId, testSetId, testSetKey);
|
|
38170
38508
|
if (!isPlaywrightContext(context)) {
|
|
38171
|
-
throw new PlaywrightSelectionUnsupportedError(`Test set '${testSetKey}' does not resolve to a single Playwright package — --playwright-
|
|
38509
|
+
throw new PlaywrightSelectionUnsupportedError(`Test set '${testSetKey}' does not resolve to a single Playwright package — --playwright-project needs every test case in the test set to come from one Playwright package.`);
|
|
38172
38510
|
}
|
|
38173
38511
|
const available = context.availablePlaywrightProjects ?? [];
|
|
38174
|
-
|
|
38175
|
-
|
|
38176
|
-
throw new PlaywrightSelectionUnsupportedError(`Unknown Playwright project(s) for test set '${testSetKey}': ${unknown.join(", ")}. Available projects: ${available.length > 0 ? available.join(", ") : "(none)"}.`);
|
|
38512
|
+
if (!available.includes(requestedProject)) {
|
|
38513
|
+
throw new PlaywrightSelectionUnsupportedError(`Unknown Playwright project for test set '${testSetKey}': ${requestedProject}. Available projects: ${available.length > 0 ? available.join(", ") : "(none)"}.`);
|
|
38177
38514
|
}
|
|
38178
|
-
await testSetsApi.testSetsUpdateTestSetPackages(toUpdateTestSetPackagesRequest(projectId, testSetId, context.packageIdentifier, context.version,
|
|
38515
|
+
await testSetsApi.testSetsUpdateTestSetPackages(toUpdateTestSetPackagesRequest(projectId, testSetId, context.packageIdentifier, context.version, [requestedProject]));
|
|
38179
38516
|
}
|
|
38180
38517
|
|
|
38181
38518
|
// src/utils/response.ts
|
|
@@ -38360,6 +38697,19 @@ var TESTSET_EXECUTE_EXAMPLES = [
|
|
|
38360
38697
|
StartTime: "2025-04-15T10:30:00Z"
|
|
38361
38698
|
}
|
|
38362
38699
|
}
|
|
38700
|
+
},
|
|
38701
|
+
{
|
|
38702
|
+
Description: "Run a Playwright test set against one project",
|
|
38703
|
+
Command: "uip tm testsets run --test-set-key DEMO:10 --playwright-project chromium",
|
|
38704
|
+
Output: {
|
|
38705
|
+
Code: "TestSetRun",
|
|
38706
|
+
Data: {
|
|
38707
|
+
ExecutionId: "a1b2c3d4-0000-0000-0000-000000000002",
|
|
38708
|
+
TestSetKey: "DEMO:10",
|
|
38709
|
+
Status: "Running",
|
|
38710
|
+
StartTime: "2025-04-15T10:30:00Z"
|
|
38711
|
+
}
|
|
38712
|
+
}
|
|
38363
38713
|
}
|
|
38364
38714
|
];
|
|
38365
38715
|
var TESTSET_LIST_EXAMPLES = [
|
|
@@ -38428,7 +38778,7 @@ async function resolveTestSetForCommand(options) {
|
|
|
38428
38778
|
}
|
|
38429
38779
|
var registerTestsetCommand = (program2) => {
|
|
38430
38780
|
const testsetCmd = program2.command("testsets").description("Manage Test Manager test sets");
|
|
38431
|
-
testsetCmd.command("create").description("Create a new test set in a Test Manager project.").
|
|
38781
|
+
testsetCmd.command("create").description("Create a new test set in a Test Manager project.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--name <name>", "Name of the test set").option("--description <text>", "Description for the test set").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTSET_CREATE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
38432
38782
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
38433
38783
|
if (authError) {
|
|
38434
38784
|
OutputFormatter.error({
|
|
@@ -38616,7 +38966,7 @@ var registerTestsetCommand = (program2) => {
|
|
|
38616
38966
|
Result: "Updated"
|
|
38617
38967
|
}));
|
|
38618
38968
|
});
|
|
38619
|
-
testsetCmd.command("list-testcases").description("List test cases assigned to a test set.").
|
|
38969
|
+
testsetCmd.command("list-testcases").description("List test cases assigned to a test set.").addOption(projectKeyOption()).addOption(projectIdOption()).requiredOption("--test-set-key <key>", "Test set object key (e.g. DEMO:42)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTSET_LIST_TESTCASES_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
38620
38970
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
38621
38971
|
if (authError) {
|
|
38622
38972
|
OutputFormatter.error({
|
|
@@ -38696,7 +39046,7 @@ var registerTestsetCommand = (program2) => {
|
|
|
38696
39046
|
}));
|
|
38697
39047
|
OutputFormatter.success(new SuccessOutput("TestSetTestCasesList", rows));
|
|
38698
39048
|
});
|
|
38699
|
-
testsetCmd.command("playwright-context"
|
|
39049
|
+
testsetCmd.command("playwright-context").description("Show the Playwright context of a test set: whether it resolves to a single Playwright package and which Playwright projects are available/selected.").requiredOption("--test-set-key <key>", "Test set object key (e.g. DEMO:42)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").trackedAction(processContext, async (options) => {
|
|
38700
39050
|
const resolved = await resolveTestSetForCommand(options);
|
|
38701
39051
|
if (!resolved)
|
|
38702
39052
|
return;
|
|
@@ -38722,7 +39072,7 @@ var registerTestsetCommand = (program2) => {
|
|
|
38722
39072
|
AvailablePlaywrightProjects: (context.availablePlaywrightProjects ?? []).join(", "),
|
|
38723
39073
|
SelectedPlaywrightProjects: (context.selectedPlaywrightProjects ?? []).join(", ")
|
|
38724
39074
|
} : {
|
|
38725
|
-
Details: "Not a Playwright test set (RPA, mixed, manual, or no single package). Run it without --playwright-
|
|
39075
|
+
Details: "Not a Playwright test set (RPA, mixed, manual, or no single package). Run it without --playwright-project."
|
|
38726
39076
|
}
|
|
38727
39077
|
}));
|
|
38728
39078
|
});
|
|
@@ -38733,13 +39083,13 @@ var registerTestsetCommand = (program2) => {
|
|
|
38733
39083
|
" mixed - run both automated and manual test cases",
|
|
38734
39084
|
" none - no specific type filter"
|
|
38735
39085
|
].join(`
|
|
38736
|
-
`), "automated").option("--input-path <file>", 'JSON file with parameter overrides: [{"name":"Param","type":"String","value":"v"}]').addOption(new Option("--playwright-
|
|
38737
|
-
const
|
|
38738
|
-
if (options.
|
|
39086
|
+
`), "automated").option("--input-path <file>", 'JSON file with parameter overrides: [{"name":"Param","type":"String","value":"v"}]').addOption(new Option("--playwright-project <name>", "PLAYWRIGHT ONLY. The one Playwright project to run (e.g. chromium); at most one per execution. Requires a test set whose cases all come from a single Playwright package. Saved on the test set and reused by later runs. See 'tm testsets playwright-context' for the available names. Omit to use the playwright.config defaults.")).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("--wait", "Block until the execution reaches a terminal state (finished, cancelled)").option("--timeout <seconds>", "Maximum seconds to wait (0 = no timeout). Requires --wait.", String(DEFAULT_TIMEOUT_MS2 / 1000)).option("--poll-interval <seconds>", "Seconds between status checks. Requires --wait.", String(DEFAULT_INTERVAL_MS / 1000)).examples(TESTSET_EXECUTE_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
39087
|
+
const requestedProject = options.playwrightProject?.trim();
|
|
39088
|
+
if (options.playwrightProject !== undefined && !requestedProject) {
|
|
38739
39089
|
OutputFormatter.error({
|
|
38740
39090
|
Result: RESULTS.Failure,
|
|
38741
|
-
Message: "--playwright-
|
|
38742
|
-
Instructions: "Pass
|
|
39091
|
+
Message: "--playwright-project was passed empty.",
|
|
39092
|
+
Instructions: "Pass one Playwright project name, e.g. --playwright-project chromium."
|
|
38743
39093
|
});
|
|
38744
39094
|
processContext.exit(1);
|
|
38745
39095
|
return;
|
|
@@ -38815,18 +39165,18 @@ var registerTestsetCommand = (program2) => {
|
|
|
38815
39165
|
processContext.exit(1);
|
|
38816
39166
|
return;
|
|
38817
39167
|
}
|
|
38818
|
-
if (
|
|
38819
|
-
const [selectError] = await catchError(applyPlaywrightProjectSelection(testSetsApi, projectId, testSet.id, testSetKey,
|
|
39168
|
+
if (requestedProject) {
|
|
39169
|
+
const [selectError] = await catchError(applyPlaywrightProjectSelection(testSetsApi, projectId, testSet.id, testSetKey, requestedProject));
|
|
38820
39170
|
if (selectError) {
|
|
38821
39171
|
OutputFormatter.error({
|
|
38822
39172
|
Result: RESULTS.Failure,
|
|
38823
39173
|
Message: selectError.message,
|
|
38824
|
-
Instructions: selectError instanceof PlaywrightSelectionUnsupportedError ? "Playwright project selection needs a Test Manager with Playwright support enabled and a test set whose test cases all come from one Playwright package. Re-run without --playwright-
|
|
39174
|
+
Instructions: selectError instanceof PlaywrightSelectionUnsupportedError ? "Playwright project selection needs a Test Manager with Playwright support enabled and a test set whose test cases all come from one Playwright package. Re-run without --playwright-project to use the package's playwright.config defaults." : "Re-run without --playwright-project to use the package's playwright.config defaults, or fix the selection and retry."
|
|
38825
39175
|
});
|
|
38826
39176
|
processContext.exit(1);
|
|
38827
39177
|
return;
|
|
38828
39178
|
}
|
|
38829
|
-
logger.info(`Playwright project selection applied: ${
|
|
39179
|
+
logger.info(`Playwright project selection applied: ${requestedProject}`);
|
|
38830
39180
|
}
|
|
38831
39181
|
if (options.inputPath) {
|
|
38832
39182
|
const [overrideError] = await catchError(overrideTestSetParameters(tmConfig, projectId, testSet.id, options.inputPath));
|
|
@@ -38883,7 +39233,7 @@ var registerTestsetCommand = (program2) => {
|
|
|
38883
39233
|
intervalMs
|
|
38884
39234
|
});
|
|
38885
39235
|
});
|
|
38886
|
-
testsetCmd.command("list").description("List test sets in a Test Manager project.").
|
|
39236
|
+
testsetCmd.command("list").description("List test sets in a Test Manager project.").addOption(projectKeyOption()).addOption(projectIdOption()).option("--folder-key <uuid>", "Filter by Orchestrator folder key (UUID, from 'or folders list')").option("--filter <text>", "Filter test sets by name").option("--include-last-execution", "Include the latest execution status and timestamp for each test set").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTSET_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
38887
39237
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
38888
39238
|
if (authError) {
|
|
38889
39239
|
OutputFormatter.error({
|
|
@@ -39077,7 +39427,7 @@ var TESTSTEPLOG_LIST_EXAMPLES = [
|
|
|
39077
39427
|
];
|
|
39078
39428
|
var registerTeststeplogCommand = (program2) => {
|
|
39079
39429
|
const teststeplogCmd = program2.command("teststeplog").description("Manage Test Manager test step logs");
|
|
39080
|
-
teststeplogCmd.command("list").description("List test step logs for a test case log.").requiredOption("--test-case-log-id <uuid>", "Test case log UUID").
|
|
39430
|
+
teststeplogCmd.command("list").description("List test step logs for a test case log.").requiredOption("--test-case-log-id <uuid>", "Test case log UUID").addOption(projectKeyOption()).addOption(projectIdOption()).examples(TESTSTEPLOG_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
39081
39431
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
39082
39432
|
if (authError) {
|
|
39083
39433
|
OutputFormatter.error({
|
|
@@ -39178,10 +39528,23 @@ var WAIT_EXAMPLES = [
|
|
|
39178
39528
|
Duration: "00:02:11"
|
|
39179
39529
|
}
|
|
39180
39530
|
}
|
|
39531
|
+
},
|
|
39532
|
+
{
|
|
39533
|
+
Description: "Name the project by ID — resolve it once, reuse it across the run",
|
|
39534
|
+
Command: "uip tm wait --execution-id a1b2c3d4-0000-0000-0000-000000000001 --project-id 9dfdc3ca-fc75-0100-2aae-0b46e318b723",
|
|
39535
|
+
Output: {
|
|
39536
|
+
Code: "WaitComplete",
|
|
39537
|
+
Data: {
|
|
39538
|
+
ExecutionId: "a1b2c3d4-0000-0000-0000-000000000001",
|
|
39539
|
+
Status: "Passed",
|
|
39540
|
+
EndTime: "2025-04-15T10:32:11Z",
|
|
39541
|
+
Duration: "00:02:11"
|
|
39542
|
+
}
|
|
39543
|
+
}
|
|
39181
39544
|
}
|
|
39182
39545
|
];
|
|
39183
39546
|
var registerWaitCommand = (program2) => {
|
|
39184
|
-
program2.command("wait").description("Wait for a test execution to reach a terminal state.").requiredOption("--execution-id <uuid>", "Test execution UUID (from 'testset execute' output)").
|
|
39547
|
+
program2.command("wait").description("Wait for a test execution to reach a terminal state.").requiredOption("--execution-id <uuid>", "Test execution UUID (from 'testset execute' output)").addOption(projectKeyOption()).addOption(projectIdOption()).option("--test-set-key <key>", "Test set key to derive project key from (e.g. DEMO:42 → project key DEMO)").option("--timeout <seconds>", "Maximum seconds to wait (0 = no timeout)", "1800").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(WAIT_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
39185
39548
|
const [authError, ctx] = await catchError(initializeContextWithProject(options));
|
|
39186
39549
|
if (authError) {
|
|
39187
39550
|
OutputFormatter.error({
|
|
@@ -39287,4 +39650,4 @@ var registerCommands = async (program2) => {
|
|
|
39287
39650
|
|
|
39288
39651
|
export { Command, metadata, registerCommands };
|
|
39289
39652
|
|
|
39290
|
-
//# debugId=
|
|
39653
|
+
//# debugId=0C415B1D21D15C3464756E2164756E21
|