@copado/agentia-cli 0.37.0-alpha.0 → 0.40.0-alpha.0
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 +573 -136
- package/dist/commands/auth/set.d.ts +2 -13
- package/dist/commands/auth/set.js +42 -110
- package/dist/commands/auth/set.js.map +1 -1
- package/dist/commands/auth/unset.d.ts +15 -0
- package/dist/commands/auth/unset.js +64 -0
- package/dist/commands/auth/unset.js.map +1 -0
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.js +16 -7
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/testing/build/abort.d.ts +26 -0
- package/dist/commands/testing/build/abort.js +38 -0
- package/dist/commands/testing/build/abort.js.map +1 -0
- package/dist/commands/testing/build/list.js +2 -2
- package/dist/commands/testing/build/list.js.map +1 -1
- package/dist/commands/testing/build/run.d.ts +8 -0
- package/dist/commands/testing/build/run.js +4 -2
- package/dist/commands/testing/build/run.js.map +1 -1
- package/dist/commands/testing/job/create.d.ts +7 -0
- package/dist/commands/testing/job/create.js +11 -2
- package/dist/commands/testing/job/create.js.map +1 -1
- package/dist/commands/testing/job/delete.d.ts +24 -0
- package/dist/commands/testing/job/delete.js +30 -0
- package/dist/commands/testing/job/delete.js.map +1 -0
- package/dist/commands/testing/job/list.js +2 -2
- package/dist/commands/testing/job/list.js.map +1 -1
- package/dist/commands/testing/job/run.d.ts +1 -0
- package/dist/commands/testing/job/run.js +2 -0
- package/dist/commands/testing/job/run.js.map +1 -0
- package/dist/commands/testing/job/update.d.ts +42 -0
- package/dist/commands/testing/job/update.js +137 -0
- package/dist/commands/testing/job/update.js.map +1 -0
- package/dist/commands/testing/project/delete.d.ts +22 -0
- package/dist/commands/testing/project/delete.js +29 -0
- package/dist/commands/testing/project/delete.js.map +1 -0
- package/dist/commands/testing/robot/delete.d.ts +21 -0
- package/dist/commands/testing/robot/delete.js +30 -0
- package/dist/commands/testing/robot/delete.js.map +1 -0
- package/dist/commands/testing/run.d.ts +8 -0
- package/dist/commands/testing/run.js +4 -2
- package/dist/commands/testing/run.js.map +1 -1
- package/dist/commands/testing/status.js +2 -2
- package/dist/commands/testing/status.js.map +1 -1
- package/dist/commands/testing/test/run.d.ts +34 -1
- package/dist/commands/testing/test/run.js +58 -1
- package/dist/commands/testing/test/run.js.map +1 -1
- package/dist/commands/testing/variable/create.d.ts +1 -1
- package/dist/commands/testing/variable/update.d.ts +21 -0
- package/dist/commands/testing/variable/update.js +63 -0
- package/dist/commands/testing/variable/update.js.map +1 -0
- package/dist/lib/auth-config.d.ts +62 -0
- package/dist/lib/auth-config.js +246 -0
- package/dist/lib/auth-config.js.map +1 -0
- package/dist/lib/credential-store.d.ts +3 -0
- package/dist/lib/credential-store.js +9 -0
- package/dist/lib/credential-store.js.map +1 -1
- package/dist/lib/cursor-mcp-config.d.ts +62 -0
- package/dist/lib/cursor-mcp-config.js +173 -0
- package/dist/lib/cursor-mcp-config.js.map +1 -0
- package/dist/lib/mcp/testing-tools.d.ts +98 -2
- package/dist/lib/mcp/testing-tools.js +227 -15
- package/dist/lib/mcp/testing-tools.js.map +1 -1
- package/dist/lib/mcp/tools.d.ts +158 -0
- package/dist/lib/mcp/tools.js +10 -34
- package/dist/lib/mcp/tools.js.map +1 -1
- package/dist/lib/project-setup.d.ts +16 -14
- package/dist/lib/project-setup.js +101 -145
- package/dist/lib/project-setup.js.map +1 -1
- package/dist/lib/setup-prompts.d.ts +30 -0
- package/dist/lib/setup-prompts.js +13 -0
- package/dist/lib/setup-prompts.js.map +1 -0
- package/dist/lib/setup-wizard.d.ts +42 -0
- package/dist/lib/setup-wizard.js +422 -0
- package/dist/lib/setup-wizard.js.map +1 -0
- package/dist/lib/testing-config.d.ts +4 -2
- package/dist/lib/testing-config.js +23 -3
- package/dist/lib/testing-config.js.map +1 -1
- package/dist/lib/testing-flags.d.ts +35 -1
- package/dist/lib/testing-flags.js +85 -0
- package/dist/lib/testing-flags.js.map +1 -1
- package/dist/lib/testing-gateway.d.ts +13 -0
- package/dist/lib/testing-gateway.js +42 -1
- package/dist/lib/testing-gateway.js.map +1 -1
- package/dist/lib/testing-operations.d.ts +93 -5
- package/dist/lib/testing-operations.js +211 -19
- package/dist/lib/testing-operations.js.map +1 -1
- package/dist/lib/testing-types.d.ts +76 -5
- package/dist/lib/testing-types.js +65 -1
- package/dist/lib/testing-types.js.map +1 -1
- package/oclif.manifest.json +1237 -191
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAA;AACnE,OAAO,EAAC,mBAAmB,EAA8B,MAAM,+BAA+B,CAAA;AAE9F,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAc;IAC1D,MAAM,CAAU,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAA;AACnE,OAAO,EAAC,mBAAmB,EAA8B,MAAM,+BAA+B,CAAA;AAE9F,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAc;IA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ClC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,SAAS,EAAE,KAAK,CAAC,OAAO;YACxB,OAAO,EAAE,KAAK,CAAC,KAAK;SACrB,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;YAC/B,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;YACzC,IAAI,CAAC,GAAG,CAAC,mBAAmB,MAAM,CAAC,aAAa,EAAE,CAAC,CAAA;QACrD,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
type TestingJobDeleteResult = {
|
|
3
|
+
deleted: true;
|
|
4
|
+
jobId: number;
|
|
5
|
+
projectId: number;
|
|
6
|
+
};
|
|
7
|
+
export default class TestingJobDelete extends AgentiaCommand {
|
|
8
|
+
static args: {
|
|
9
|
+
id: import("@oclif/core/interfaces").Arg<number, {
|
|
10
|
+
max?: number;
|
|
11
|
+
min?: number;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
static description: string;
|
|
15
|
+
static examples: string[];
|
|
16
|
+
static flags: {
|
|
17
|
+
project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
};
|
|
22
|
+
run(): Promise<TestingJobDeleteResult>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
|
|
4
|
+
import { deleteTestingJob } from '../../../lib/testing-operations.js';
|
|
5
|
+
export default class TestingJobDelete extends AgentiaCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.integer({
|
|
8
|
+
description: 'CRT job/test ID.',
|
|
9
|
+
required: true,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Delete a Copado Robotic Testing job/test';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
|
|
16
|
+
];
|
|
17
|
+
static flags = {
|
|
18
|
+
...testingConnectionFlags,
|
|
19
|
+
...testingProjectFlag,
|
|
20
|
+
};
|
|
21
|
+
async run() {
|
|
22
|
+
const { args, flags } = await this.parse(TestingJobDelete);
|
|
23
|
+
const result = await this.withSpinner('Deleting testing job', () => deleteTestingJob({ ...testingConnectionOptions(flags), jobId: args.id, projectId: flags.project }));
|
|
24
|
+
this.display(() => {
|
|
25
|
+
this.log(`Deleted testing job ${result.jobId}.`);
|
|
26
|
+
});
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAA;AAQnE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAc;IAC1D,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,0CAA0C,CAAA;IACxE,MAAM,CAAU,QAAQ,GAAG;QACzB,qEAAqE;QACrE,4EAA4E;KAC7E,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;KACtB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;QACxD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,GAAG,EAAE,CACjE,gBAAgB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAC,CAAC,CACjG,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,uBAAuB,MAAM,CAAC,KAAK,GAAG,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Flags } from '@oclif/core';
|
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
3
|
import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
|
|
4
4
|
import { listTestingJobs } from '../../../lib/testing-operations.js';
|
|
5
|
-
import {
|
|
5
|
+
import { formatTestingJobTable } from '../../../lib/testing-types.js';
|
|
6
6
|
export default class TestingJobList extends AgentiaCommand {
|
|
7
7
|
static description = 'List Copado Robotic Testing jobs/tests in a project';
|
|
8
8
|
static examples = [
|
|
@@ -24,7 +24,7 @@ export default class TestingJobList extends AgentiaCommand {
|
|
|
24
24
|
this.log('No testing jobs found.');
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
this.log(
|
|
27
|
+
this.log(formatTestingJobTable(jobs));
|
|
28
28
|
});
|
|
29
29
|
return jobs;
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,eAAe,EAAC,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,eAAe,EAAC,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAC,qBAAqB,EAAkB,MAAM,+BAA+B,CAAA;AAEpF,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,cAAc;IACxD,MAAM,CAAU,WAAW,GAAG,qDAAqD,CAAA;IACnF,MAAM,CAAU,QAAQ,GAAG;QACzB,4DAA4D;QAC5D,kFAAkF;KACnF,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;QACrB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,uDAAuD;SACrE,CAAC;KACH,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;QAChD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,uBAAuB,EAAE,GAAG,EAAE,CAChE,eAAe,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAC,CAAC,CAClG,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACtB,IAAI,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;gBAClC,OAAM;YACR,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAA;QACvC,CAAC,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../build/run.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type TestingJob } from '../../../lib/testing-types.js';
|
|
3
|
+
export default class TestingJobUpdate extends AgentiaCommand {
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/interfaces").Arg<number, {
|
|
6
|
+
max?: number;
|
|
7
|
+
min?: number;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
12
|
+
static flags: {
|
|
13
|
+
'case-duration-change-detection': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'hide-video-params': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'no-case-duration-change-detection': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
'parallel-mode': import("@oclif/core/interfaces").OptionFlag<"disabled" | "enabled" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
robot: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'screen-depth': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'screen-height': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
'screen-width': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
'show-video-params': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
'suite-type': import("@oclif/core/interfaces").OptionFlag<"default" | "bitbar" | "browserstack" | "browserstackdesktop" | "lambdatest" | "lambdatestdesktop" | "mobile" | "paceconnectmobile" | "privatemobile" | "rpa" | "selenese" | "zap" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
'git-branch': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
'git-domain-credential': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
|
+
'git-password': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
+
'git-tag': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
30
|
+
'git-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
|
+
'git-use-caller-credentials': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
32
|
+
'git-username': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
33
|
+
project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
34
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
36
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
37
|
+
};
|
|
38
|
+
run(): Promise<TestingJob>;
|
|
39
|
+
private analyticsFromFlags;
|
|
40
|
+
private screenFromFlags;
|
|
41
|
+
private videoParamsFromFlags;
|
|
42
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingConnectionFlags, testingConnectionOptions, testingGitStorageFlags, testingProjectFlag, } from '../../../lib/testing-flags.js';
|
|
4
|
+
import { buildTestingGitStorageUpdate, updateTestingJob } from '../../../lib/testing-operations.js';
|
|
5
|
+
import { formatTestingRecord, TESTING_JOB_PARALLEL_MODES, TESTING_JOB_SUITE_TYPES, } from '../../../lib/testing-types.js';
|
|
6
|
+
export default class TestingJobUpdate extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: Args.integer({
|
|
9
|
+
description: 'CRT job/test ID.',
|
|
10
|
+
required: true,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Update Copado Robotic Testing job/test metadata';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --name "Smoke"',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --git-url https://github.com/acme/crt-tests.git --git-branch main',
|
|
17
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --git-branch feature/login-smoke',
|
|
18
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --timeout 10m --parallel-mode enabled --json',
|
|
19
|
+
];
|
|
20
|
+
static flags = {
|
|
21
|
+
...testingConnectionFlags,
|
|
22
|
+
...testingProjectFlag,
|
|
23
|
+
...testingGitStorageFlags,
|
|
24
|
+
'case-duration-change-detection': Flags.boolean({
|
|
25
|
+
description: 'Enable case duration change detection analytics.',
|
|
26
|
+
}),
|
|
27
|
+
description: Flags.string({
|
|
28
|
+
description: 'Job/test description.',
|
|
29
|
+
}),
|
|
30
|
+
'hide-video-params': Flags.boolean({
|
|
31
|
+
description: 'Hide video parameters.',
|
|
32
|
+
}),
|
|
33
|
+
name: Flags.string({
|
|
34
|
+
description: 'Job/test name.',
|
|
35
|
+
}),
|
|
36
|
+
'no-case-duration-change-detection': Flags.boolean({
|
|
37
|
+
description: 'Disable case duration change detection analytics.',
|
|
38
|
+
}),
|
|
39
|
+
'parallel-mode': Flags.option({
|
|
40
|
+
description: 'Parallel execution mode.',
|
|
41
|
+
options: [...TESTING_JOB_PARALLEL_MODES],
|
|
42
|
+
})(),
|
|
43
|
+
robot: Flags.integer({
|
|
44
|
+
description: 'CRT robot ID that should execute this job/test.',
|
|
45
|
+
}),
|
|
46
|
+
'screen-depth': Flags.integer({
|
|
47
|
+
description: 'Screen color depth. Must be provided with --screen-width and --screen-height.',
|
|
48
|
+
}),
|
|
49
|
+
'screen-height': Flags.integer({
|
|
50
|
+
description: 'Screen height. Must be provided with --screen-width and --screen-depth.',
|
|
51
|
+
}),
|
|
52
|
+
'screen-width': Flags.integer({
|
|
53
|
+
description: 'Screen width. Must be provided with --screen-height and --screen-depth.',
|
|
54
|
+
}),
|
|
55
|
+
'show-video-params': Flags.boolean({
|
|
56
|
+
description: 'Show video parameters.',
|
|
57
|
+
}),
|
|
58
|
+
'suite-type': Flags.option({
|
|
59
|
+
description: 'CRT suite/job type.',
|
|
60
|
+
options: [...TESTING_JOB_SUITE_TYPES],
|
|
61
|
+
})(),
|
|
62
|
+
timeout: Flags.string({
|
|
63
|
+
description: 'Build timeout, for example 10s, 10m, 10h, or 10d.',
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
async run() {
|
|
67
|
+
const { args, flags } = await this.parse(TestingJobUpdate);
|
|
68
|
+
const screen = this.screenFromFlags(flags);
|
|
69
|
+
const showVideoParams = this.videoParamsFromFlags(flags);
|
|
70
|
+
const caseDurationChangeDetection = this.analyticsFromFlags(flags);
|
|
71
|
+
const job = await this.withSpinner('Updating testing job', () => updateTestingJob({
|
|
72
|
+
...testingConnectionOptions(flags),
|
|
73
|
+
analytics: caseDurationChangeDetection === undefined ? undefined : { caseDurationChangeDetection },
|
|
74
|
+
description: flags.description,
|
|
75
|
+
domainCredentialId: flags['git-domain-credential'],
|
|
76
|
+
jobId: args.id,
|
|
77
|
+
name: flags.name,
|
|
78
|
+
parallelExecution: flags['parallel-mode'],
|
|
79
|
+
projectId: flags.project,
|
|
80
|
+
robotId: flags.robot,
|
|
81
|
+
screen,
|
|
82
|
+
showVideoParams,
|
|
83
|
+
storage: buildTestingGitStorageUpdate({
|
|
84
|
+
gitBranch: flags['git-branch'],
|
|
85
|
+
gitPassword: flags['git-password'],
|
|
86
|
+
gitTag: flags['git-tag'],
|
|
87
|
+
gitUrl: flags['git-url'],
|
|
88
|
+
gitUseCallerCredentials: flags['git-use-caller-credentials'],
|
|
89
|
+
gitUsername: flags['git-username'],
|
|
90
|
+
}),
|
|
91
|
+
suiteType: flags['suite-type'],
|
|
92
|
+
timeout: flags.timeout,
|
|
93
|
+
}));
|
|
94
|
+
this.display(() => {
|
|
95
|
+
this.log('Testing job updated');
|
|
96
|
+
this.log(formatTestingRecord(job));
|
|
97
|
+
});
|
|
98
|
+
return job;
|
|
99
|
+
}
|
|
100
|
+
analyticsFromFlags(flags) {
|
|
101
|
+
if (flags['case-duration-change-detection'] === true && flags['no-case-duration-change-detection'] === true) {
|
|
102
|
+
this.error('Use either --case-duration-change-detection or --no-case-duration-change-detection, not both.', {
|
|
103
|
+
exit: 2,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (flags['case-duration-change-detection'] === true)
|
|
107
|
+
return true;
|
|
108
|
+
if (flags['no-case-duration-change-detection'] === true)
|
|
109
|
+
return false;
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
screenFromFlags(flags) {
|
|
113
|
+
const values = [flags['screen-depth'], flags['screen-height'], flags['screen-width']];
|
|
114
|
+
const supplied = values.filter((value) => value !== undefined);
|
|
115
|
+
if (supplied.length === 0)
|
|
116
|
+
return undefined;
|
|
117
|
+
if (supplied.length !== values.length) {
|
|
118
|
+
this.error('Provide --screen-width, --screen-height, and --screen-depth together.', { exit: 2 });
|
|
119
|
+
}
|
|
120
|
+
const [depth, height, width] = values;
|
|
121
|
+
if (depth <= 0 || height <= 0 || width <= 0) {
|
|
122
|
+
this.error('Screen dimensions and depth must be positive integers.', { exit: 2 });
|
|
123
|
+
}
|
|
124
|
+
return { depth, height, width };
|
|
125
|
+
}
|
|
126
|
+
videoParamsFromFlags(flags) {
|
|
127
|
+
if (flags['show-video-params'] === true && flags['hide-video-params'] === true) {
|
|
128
|
+
this.error('Use either --show-video-params or --hide-video-params, not both.', { exit: 2 });
|
|
129
|
+
}
|
|
130
|
+
if (flags['show-video-params'] === true)
|
|
131
|
+
return true;
|
|
132
|
+
if (flags['hide-video-params'] === true)
|
|
133
|
+
return false;
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/testing/job/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,4BAA4B,EAAE,gBAAgB,EAAC,MAAM,oCAAoC,CAAA;AACjG,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,uBAAuB,GAIxB,MAAM,+BAA+B,CAAA;AAEtC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAc;IAC1D,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,iDAAiD,CAAA;IAC/E,MAAM,CAAU,QAAQ,GAAG;QACzB,oFAAoF;QACpF,uIAAuI;QACvI,sGAAsG;QACtG,kHAAkH;KACnH,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;QACrB,GAAG,sBAAsB;QACzB,gCAAgC,EAAE,KAAK,CAAC,OAAO,CAAC;YAC9C,WAAW,EAAE,kDAAkD;SAChE,CAAC;QACF,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE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AC;QAED,OAAO,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAC,CAAA;IAC/B,CAAC;IAEO,oBAAoB,CAAC,KAAqE;QAChG,IAAI,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI,EAAE,CAAC;YAC/E,IAAI,CAAC,KAAK,CAAC,kEAAkE,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAA;QAC3F,CAAC;QAED,IAAI,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI;YAAE,OAAO,IAAI,CAAA;QACpD,IAAI,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI;YAAE,OAAO,KAAK,CAAA;QACrD,OAAO,SAAS,CAAA;IAClB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
type TestingProjectDeleteResult = {
|
|
3
|
+
deleted: true;
|
|
4
|
+
projectId: number;
|
|
5
|
+
};
|
|
6
|
+
export default class TestingProjectDelete extends AgentiaCommand {
|
|
7
|
+
static args: {
|
|
8
|
+
id: import("@oclif/core/interfaces").Arg<number, {
|
|
9
|
+
max?: number;
|
|
10
|
+
min?: number;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
static description: string;
|
|
14
|
+
static examples: string[];
|
|
15
|
+
static flags: {
|
|
16
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<TestingProjectDeleteResult>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingConnectionFlags, testingConnectionOptions } from '../../../lib/testing-flags.js';
|
|
4
|
+
import { deleteTestingProject } from '../../../lib/testing-operations.js';
|
|
5
|
+
export default class TestingProjectDelete extends AgentiaCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.integer({
|
|
8
|
+
description: 'CRT project ID.',
|
|
9
|
+
required: true,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Delete a Copado Robotic Testing project';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> <%= command.id %> <project-id>',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <project-id> --json',
|
|
16
|
+
];
|
|
17
|
+
static flags = {
|
|
18
|
+
...testingConnectionFlags,
|
|
19
|
+
};
|
|
20
|
+
async run() {
|
|
21
|
+
const { args, flags } = await this.parse(TestingProjectDelete);
|
|
22
|
+
const result = await this.withSpinner('Deleting testing project', () => deleteTestingProject({ ...testingConnectionOptions(flags), projectId: args.id }));
|
|
23
|
+
this.display(() => {
|
|
24
|
+
this.log(`Deleted testing project ${result.projectId}.`);
|
|
25
|
+
});
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/testing/project/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EAAC,sBAAsB,EAAE,wBAAwB,EAAC,MAAM,+BAA+B,CAAA;AAC9F,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAA;AAOvE,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,cAAc;IAC9D,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,iBAAiB;YAC9B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,yCAAyC,CAAA;IACvE,MAAM,CAAU,QAAQ,GAAG;QACzB,kDAAkD;QAClD,yDAAyD;KAC1D,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;KAC1B,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAC5D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,0BAA0B,EAAE,GAAG,EAAE,CACrE,oBAAoB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAC,CAAC,CAC/E,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,2BAA2B,MAAM,CAAC,SAAS,GAAG,CAAC,CAAA;QAC1D,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
type TestingRobotDeleteResult = {
|
|
3
|
+
deleted: true;
|
|
4
|
+
projectId: number;
|
|
5
|
+
robotId: number | string;
|
|
6
|
+
};
|
|
7
|
+
export default class TestingRobotDelete extends AgentiaCommand {
|
|
8
|
+
static args: {
|
|
9
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
10
|
+
};
|
|
11
|
+
static description: string;
|
|
12
|
+
static examples: string[];
|
|
13
|
+
static flags: {
|
|
14
|
+
project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<TestingRobotDeleteResult>;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag, } from '../../../lib/testing-flags.js';
|
|
4
|
+
import { deleteTestingRobot } from '../../../lib/testing-operations.js';
|
|
5
|
+
export default class TestingRobotDelete extends AgentiaCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.string({
|
|
8
|
+
description: 'CRT robot ID.',
|
|
9
|
+
required: true,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Delete a Copado Robotic Testing robot';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> <%= command.id %> <robot-id> --project <project-id>',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <robot-id> --project <project-id> --json',
|
|
16
|
+
];
|
|
17
|
+
static flags = {
|
|
18
|
+
...testingConnectionFlags,
|
|
19
|
+
...testingProjectFlag,
|
|
20
|
+
};
|
|
21
|
+
async run() {
|
|
22
|
+
const { args, flags } = await this.parse(TestingRobotDelete);
|
|
23
|
+
const result = await this.withSpinner('Deleting testing robot', () => deleteTestingRobot({ ...testingConnectionOptions(flags), projectId: flags.project, robotId: args.id }));
|
|
24
|
+
this.display(() => {
|
|
25
|
+
this.log(`Deleted testing robot ${result.robotId}.`);
|
|
26
|
+
});
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../src/commands/testing/robot/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,oCAAoC,CAAA;AAQrE,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,cAAc;IAC5D,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,uCAAuC,CAAA;IACrE,MAAM,CAAU,QAAQ,GAAG;QACzB,uEAAuE;QACvE,8EAA8E;KAC/E,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;KACtB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;QAC1D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,wBAAwB,EAAE,GAAG,EAAE,CACnE,kBAAkB,CAAC,EAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAC,CAAC,CACrG,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,yBAAyB,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;QACtD,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -10,6 +10,14 @@ export default class TestingRun extends AgentiaCommand {
|
|
|
10
10
|
static description: string;
|
|
11
11
|
static examples: string[];
|
|
12
12
|
static flags: {
|
|
13
|
+
branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
exclude: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
include: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
param: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
record: import("@oclif/core/interfaces").OptionFlag<"none" | "failed" | "all" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'rerun-failed': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'rerun-failed-from-latest': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
tag: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
21
|
project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
22
|
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
23
|
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../lib/agentia-command.js';
|
|
3
|
-
import { testingConnectionFlags,
|
|
3
|
+
import { testingConnectionFlags, testingProjectFlag, testingRunOptionFlags, testingRunOptions } from '../../lib/testing-flags.js';
|
|
4
4
|
import { runTestingBuild } from '../../lib/testing-operations.js';
|
|
5
5
|
import { formatTestingRecord } from '../../lib/testing-types.js';
|
|
6
6
|
export default class TestingRun extends AgentiaCommand {
|
|
@@ -13,15 +13,17 @@ export default class TestingRun extends AgentiaCommand {
|
|
|
13
13
|
static description = 'Run a Copado Robotic Testing test';
|
|
14
14
|
static examples = [
|
|
15
15
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --branch main --include smoke',
|
|
16
17
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
|
|
17
18
|
];
|
|
18
19
|
static flags = {
|
|
19
20
|
...testingConnectionFlags,
|
|
20
21
|
...testingProjectFlag,
|
|
22
|
+
...testingRunOptionFlags,
|
|
21
23
|
};
|
|
22
24
|
async run() {
|
|
23
25
|
const { args, flags } = await this.parse(TestingRun);
|
|
24
|
-
const result = await this.withSpinner('Running testing test', () => runTestingBuild(
|
|
26
|
+
const result = await this.withSpinner('Running testing test', () => runTestingBuild(testingRunOptions(flags, { jobId: args.id, projectId: flags.project })));
|
|
25
27
|
this.display(() => {
|
|
26
28
|
this.log('Testing run started');
|
|
27
29
|
this.log(formatTestingRecord({ build: result.build, jobId: result.jobId, projectId: result.projectId }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/commands/testing/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/commands/testing/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc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E,MAAM,CAAC,SAAS,EAAC,CAAC,CAAC,CAAA;QACxG,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Flags } from '@oclif/core';
|
|
|
2
2
|
import { AgentiaCommand } from '../../lib/agentia-command.js';
|
|
3
3
|
import { testingConnectionFlags, testingConnectionOptions, testingProjectFlag } from '../../lib/testing-flags.js';
|
|
4
4
|
import { listTestingBuilds } from '../../lib/testing-operations.js';
|
|
5
|
-
import {
|
|
5
|
+
import { formatTestingBuildTable, TESTING_BUILD_STATUSES, } from '../../lib/testing-types.js';
|
|
6
6
|
export default class TestingStatus extends AgentiaCommand {
|
|
7
7
|
static description = 'List Copado Robotic Testing run status';
|
|
8
8
|
static examples = [
|
|
@@ -39,7 +39,7 @@ export default class TestingStatus extends AgentiaCommand {
|
|
|
39
39
|
this.log('No testing runs found.');
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
this.log(
|
|
42
|
+
this.log(formatTestingBuildTable(builds));
|
|
43
43
|
});
|
|
44
44
|
return builds;
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/commands/testing/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,sBAAsB,EAAE,wBAAwB,EAAE,kBAAkB,EAAC,MAAM,4BAA4B,CAAA;AAC/G,OAAO,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAA;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/commands/testing/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAA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AI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;gBAClC,OAAM;YACR,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
2
|
+
import { type TestingBuildWaitResult } from '../../../lib/testing-operations.js';
|
|
3
|
+
import { type TestingBuild, type TestingBuildRunResult } from '../../../lib/testing-types.js';
|
|
4
|
+
type TestingTestRunResult = TestingBuildRunResult & {
|
|
5
|
+
finalBuild?: TestingBuild;
|
|
6
|
+
wait?: TestingBuildWaitResult;
|
|
7
|
+
};
|
|
8
|
+
export default class TestingTestRun extends AgentiaCommand {
|
|
9
|
+
static args: {
|
|
10
|
+
id: import("@oclif/core/interfaces").Arg<number, {
|
|
11
|
+
max?: number;
|
|
12
|
+
min?: number;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
static description: string;
|
|
16
|
+
static examples: string[];
|
|
17
|
+
static flags: {
|
|
18
|
+
'wait-for-result': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
exclude: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
include: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
param: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
record: import("@oclif/core/interfaces").OptionFlag<"none" | "failed" | "all" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
'rerun-failed': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
'rerun-failed-from-latest': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
tag: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
project: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
+
org: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
30
|
+
pat: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
|
+
};
|
|
32
|
+
run(): Promise<TestingTestRunResult>;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -1,2 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { testingConnectionFlags, testingProjectFlag, testingRunOptionFlags, testingRunOptions, } from '../../../lib/testing-flags.js';
|
|
4
|
+
import { runTestingBuild, waitForTestingBuildResult } from '../../../lib/testing-operations.js';
|
|
5
|
+
import { formatTestingRecord, normalizeTestingId, } from '../../../lib/testing-types.js';
|
|
6
|
+
export default class TestingTestRun extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: Args.integer({
|
|
9
|
+
description: 'CRT job/test ID to run.',
|
|
10
|
+
required: true,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Run a Copado Robotic Testing test';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --wait-for-result',
|
|
17
|
+
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
|
|
18
|
+
];
|
|
19
|
+
static flags = {
|
|
20
|
+
...testingConnectionFlags,
|
|
21
|
+
...testingProjectFlag,
|
|
22
|
+
...testingRunOptionFlags,
|
|
23
|
+
'wait-for-result': Flags.boolean({
|
|
24
|
+
default: false,
|
|
25
|
+
description: 'Poll CRT until the started build reaches a terminal result.',
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { args, flags } = await this.parse(TestingTestRun);
|
|
30
|
+
const runResult = await this.withSpinner('Running testing test', () => runTestingBuild(testingRunOptions(flags, { jobId: args.id, projectId: flags.project })));
|
|
31
|
+
if (!flags['wait-for-result']) {
|
|
32
|
+
this.display(() => {
|
|
33
|
+
this.log('Testing run started');
|
|
34
|
+
this.log(formatTestingRecord({ build: runResult.build, jobId: runResult.jobId, projectId: runResult.projectId }));
|
|
35
|
+
});
|
|
36
|
+
return runResult;
|
|
37
|
+
}
|
|
38
|
+
const buildId = normalizeTestingId(runResult.build);
|
|
39
|
+
const wait = await this.withSpinner('Waiting for testing result', () => waitForTestingBuildResult({
|
|
40
|
+
...testingRunOptions(flags, { jobId: args.id, projectId: flags.project }),
|
|
41
|
+
buildId,
|
|
42
|
+
}));
|
|
43
|
+
const result = { ...runResult, finalBuild: wait.build, wait };
|
|
44
|
+
this.display(() => {
|
|
45
|
+
this.log('Testing run finished');
|
|
46
|
+
this.log(formatTestingRecord(formatWaitResult(result)));
|
|
47
|
+
});
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function formatWaitResult(result) {
|
|
52
|
+
return {
|
|
53
|
+
buildId: result.wait?.buildId ?? normalizeTestingId(result.build),
|
|
54
|
+
finalBuild: result.finalBuild,
|
|
55
|
+
jobId: result.jobId,
|
|
56
|
+
projectId: result.projectId,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
2
59
|
//# sourceMappingURL=run.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/commands/testing/test/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAC,eAAe,EAA+B,yBAAyB,EAAC,MAAM,oCAAoC,CAAA;AAC1H,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GAGnB,MAAM,+BAA+B,CAAA;AAOtC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,cAAc;IACxD,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,mCAAmC,CAAA;IACjE,MAAM,CAAU,QAAQ,GAAG;QACzB,qEAAqE;QACrE,uFAAuF;QACvF,4EAA4E;KAC7E,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sBAAsB;QACzB,GAAG,kBAAkB;QACrB,GAAG,qBAAqB;QACxB,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC;YAC/B,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,6DAA6D;SAC3E,CAAC;KACH,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAE,KAAK,EAA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