@sonisoft/now-sdk-ext-cli 1.1.0-alpha.2 → 2.0.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 +1825 -34
- package/dist/commands/app/index.d.ts +4 -1
- package/dist/commands/app/index.d.ts.map +1 -1
- package/dist/commands/app/index.js +31 -6
- package/dist/commands/app/index.js.map +1 -1
- package/dist/commands/app/install.d.ts +4 -1
- package/dist/commands/app/install.d.ts.map +1 -1
- package/dist/commands/app/install.js +40 -6
- package/dist/commands/app/install.js.map +1 -1
- package/dist/commands/app/repo-install.d.ts +19 -0
- package/dist/commands/app/repo-install.d.ts.map +1 -0
- package/dist/commands/app/repo-install.js +173 -0
- package/dist/commands/app/repo-install.js.map +1 -0
- package/dist/commands/app/repo-list.d.ts +17 -0
- package/dist/commands/app/repo-list.d.ts.map +1 -0
- package/dist/commands/app/repo-list.js +152 -0
- package/dist/commands/app/repo-list.js.map +1 -0
- package/dist/commands/app/uninstall.d.ts +16 -0
- package/dist/commands/app/uninstall.d.ts.map +1 -0
- package/dist/commands/app/uninstall.js +70 -0
- package/dist/commands/app/uninstall.js.map +1 -0
- package/dist/commands/atf/index.d.ts +71 -0
- package/dist/commands/atf/index.d.ts.map +1 -0
- package/dist/commands/atf/index.js +256 -0
- package/dist/commands/atf/index.js.map +1 -0
- package/dist/commands/exec/index.d.ts +17 -3
- package/dist/commands/exec/index.d.ts.map +1 -1
- package/dist/commands/exec/index.js +286 -26
- package/dist/commands/exec/index.js.map +1 -1
- package/dist/commands/log/index.d.ts +46 -0
- package/dist/commands/log/index.d.ts.map +1 -0
- package/dist/commands/log/index.js +418 -0
- package/dist/commands/log/index.js.map +1 -0
- package/dist/common/authenticated-command.js +2 -2
- package/dist/common/authenticated-command.js.map +1 -1
- package/dist/common/scope-autocomplete.d.ts +20 -0
- package/dist/common/scope-autocomplete.d.ts.map +1 -0
- package/dist/common/scope-autocomplete.js +94 -0
- package/dist/common/scope-autocomplete.js.map +1 -0
- package/dist/common/utils.d.ts +2 -0
- package/dist/common/utils.d.ts.map +1 -0
- package/dist/common/utils.js +4 -0
- package/dist/common/utils.js.map +1 -0
- package/oclif.manifest.json +691 -12
- package/package.json +32 -12
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
import { Flags } from '@oclif/core';
|
|
3
|
+
import { Application, Logger, NowStringUtil } from '@sonisoft/now-sdk-ext-core';
|
|
4
|
+
import { AuthenticatedCommand } from '../../common/authenticated-command.js';
|
|
5
|
+
import { isNilOrEmpty } from '../../common/utils.js';
|
|
6
|
+
export class Uninstall extends AuthenticatedCommand {
|
|
7
|
+
static args = {};
|
|
8
|
+
static description = 'Uninstall a ServiceNow application from your instance.\n\n' +
|
|
9
|
+
'This command provides programmatic control over ServiceNow application removal, allowing you to uninstall ' +
|
|
10
|
+
'applications remotely. This is useful for automated environment cleanup, testing workflows, and ' +
|
|
11
|
+
'application lifecycle management.\n\n' +
|
|
12
|
+
'Features:\n' +
|
|
13
|
+
' • Uninstall applications by sys_id and scope\n' +
|
|
14
|
+
' • Automated application removal in CI/CD pipelines\n' +
|
|
15
|
+
' • Proper cleanup and rollback handling\n' +
|
|
16
|
+
' • Detailed logging and error reporting\n\n' +
|
|
17
|
+
'Requirements:\n' +
|
|
18
|
+
' • User must have admin role\n' +
|
|
19
|
+
' • Application must be in a removable state\n' +
|
|
20
|
+
' • Both application sys_id and scope are required';
|
|
21
|
+
static examples = [
|
|
22
|
+
{
|
|
23
|
+
command: '<%= config.bin %> <%= command.id %> --applicationId a1b2c3d4e5f6 --scope x_my_custom_app --auth dev-instance',
|
|
24
|
+
description: 'Uninstall an application by sys_id and scope',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
command: '<%= config.bin %> <%= command.id %> -i a1b2c3d4e5f6 -s x_my_custom_app --auth dev-instance --log-level debug',
|
|
28
|
+
description: 'Uninstall with enhanced debug logging',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
command: '<%= config.bin %> <%= command.id %> -i a1b2c3d4e5f6 -s x_my_custom_app -a dev-instance',
|
|
32
|
+
description: 'Uninstall using short flags',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
static flags = {
|
|
36
|
+
applicationId: Flags.string({ char: 'i', description: 'Application sys_id', required: true }),
|
|
37
|
+
scope: Flags.string({ char: 's', description: 'Scope of application', required: true }),
|
|
38
|
+
};
|
|
39
|
+
_logger = new Logger("AppUninstallCommand");
|
|
40
|
+
async run() {
|
|
41
|
+
const { args, flags } = await this.parse(Uninstall);
|
|
42
|
+
this.log("App Uninstall Command Executed.");
|
|
43
|
+
if (!isNilOrEmpty(flags.applicationId) && !isNilOrEmpty(flags.scope)) {
|
|
44
|
+
try {
|
|
45
|
+
this.log("Uninstalling app");
|
|
46
|
+
if (NowStringUtil.isStringEmpty(flags.applicationId)) {
|
|
47
|
+
this.error("Application ID is required when uninstalling an app");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (NowStringUtil.isStringEmpty(flags.scope)) {
|
|
51
|
+
this.error("Scope is required when uninstalling an app");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.log("Passed checks. Uninstalling app.");
|
|
55
|
+
const app = new Application(this.instance, flags.scope, flags.applicationId);
|
|
56
|
+
await app.changeApplication();
|
|
57
|
+
await app.uninstall();
|
|
58
|
+
this.log("Application uninstalled successfully.");
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
this._logger.error("Error occurred when uninstalling application.", error);
|
|
62
|
+
this.error(error);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.error("Validation failed. Please provide applicationId and scope.");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall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-0,0 +1,71 @@
|
|
|
1
|
+
import { ReferenceLink } from '@sonisoft/now-sdk-ext-core';
|
|
2
|
+
import { AuthenticatedCommand } from '../../common/authenticated-command.js';
|
|
3
|
+
export interface TestSuiteExecutionRequest {
|
|
4
|
+
browser_name?: string;
|
|
5
|
+
browser_version?: string;
|
|
6
|
+
is_performance_run?: boolean;
|
|
7
|
+
os_name?: string;
|
|
8
|
+
os_version?: string;
|
|
9
|
+
run_in_cloud?: boolean;
|
|
10
|
+
test_suite_name?: string;
|
|
11
|
+
test_suite_sys_id?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TestSuiteExecutionResponse {
|
|
14
|
+
error: string;
|
|
15
|
+
links: {
|
|
16
|
+
progress: {
|
|
17
|
+
id: string;
|
|
18
|
+
url: string;
|
|
19
|
+
};
|
|
20
|
+
results?: {
|
|
21
|
+
id: string;
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
percent_complete: number;
|
|
26
|
+
status: string;
|
|
27
|
+
status_detail: string;
|
|
28
|
+
status_label: string;
|
|
29
|
+
status_message: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TestSuiteExecutionResult {
|
|
32
|
+
duration: string;
|
|
33
|
+
end_time: string;
|
|
34
|
+
failed_tests: number;
|
|
35
|
+
output: string;
|
|
36
|
+
passed_tests: number;
|
|
37
|
+
skipped_tests: number;
|
|
38
|
+
start_time: string;
|
|
39
|
+
status: string;
|
|
40
|
+
sys_id: string;
|
|
41
|
+
test_suite: ReferenceLink;
|
|
42
|
+
total_tests: number;
|
|
43
|
+
}
|
|
44
|
+
export declare class Atf extends AuthenticatedCommand<typeof Atf> {
|
|
45
|
+
static args: {};
|
|
46
|
+
static description: string;
|
|
47
|
+
static examples: {
|
|
48
|
+
description: string;
|
|
49
|
+
command: string;
|
|
50
|
+
}[];
|
|
51
|
+
static flags: {
|
|
52
|
+
'test-id': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
53
|
+
'suite-id': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
54
|
+
'suite-name': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
55
|
+
wait: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
56
|
+
'poll-interval': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<number, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
57
|
+
browser: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
58
|
+
'browser-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
59
|
+
'os-name': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
60
|
+
'os-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
61
|
+
performance: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
62
|
+
cloud: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
63
|
+
json: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
64
|
+
};
|
|
65
|
+
private _logger;
|
|
66
|
+
run(): Promise<void>;
|
|
67
|
+
private displayTestSuiteResults;
|
|
68
|
+
private executeTest;
|
|
69
|
+
private executeTestSuite;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/atf/index.ts"],"names":[],"mappings":"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I,SAAQ,oBAAoB,CAAC,OAAO,GAAG,CAAC;IAEvD,MAAM,CAAC,IAAI,KACV;IAED,MAAM,CAAC,WAAW,SAUuB;IAEzC,MAAM,CAAC,QAAQ;;;QAyBd;IAED,MAAM,CAAC,KAAK;;;;;;;;;;;;;MAgEX;IAED,OAAO,CAAC,OAAO,CAAmC;IAE5C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B1B,OAAO,CAAC,uBAAuB;YA4BjB,WAAW;YAkCX,gBAAgB;CAuE/B"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
/* eslint-disable perfectionist/sort-objects */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
+
import { Flags } from '@oclif/core';
|
|
6
|
+
import { ATFTestExecutor, Logger } from '@sonisoft/now-sdk-ext-core';
|
|
7
|
+
import { AuthenticatedCommand } from '../../common/authenticated-command.js';
|
|
8
|
+
import { isNilOrEmpty } from '../../common/utils.js';
|
|
9
|
+
export class Atf extends AuthenticatedCommand {
|
|
10
|
+
static args = {};
|
|
11
|
+
static description = 'Execute ATF (Automated Test Framework) tests or test suites on a ServiceNow instance.\n\n' +
|
|
12
|
+
'This command allows you to run automated tests and test suites remotely, making it perfect for CI/CD pipelines ' +
|
|
13
|
+
'and automated testing workflows. You can execute individual tests, entire test suites, and configure execution ' +
|
|
14
|
+
'parameters such as browser type, OS, and performance mode.\n\n' +
|
|
15
|
+
'Features:\n' +
|
|
16
|
+
' • Execute individual tests or complete test suites\n' +
|
|
17
|
+
' • Real-time progress monitoring\n' +
|
|
18
|
+
' • JSON output for CI/CD integration\n' +
|
|
19
|
+
' • Detailed test results and summaries\n' +
|
|
20
|
+
' • Browser and environment configuration\n' +
|
|
21
|
+
' • Performance testing mode support';
|
|
22
|
+
static examples = [
|
|
23
|
+
{
|
|
24
|
+
description: 'Execute a single ATF test by sys_id',
|
|
25
|
+
command: '<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
description: 'Execute a test suite by sys_id and wait for completion',
|
|
29
|
+
command: '<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
description: 'Execute a test suite by name',
|
|
33
|
+
command: '<%= config.bin %> <%= command.id %> --suite-name "Smoke Tests" --auth dev-instance',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
description: 'Execute with specific browser configuration',
|
|
37
|
+
command: '<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
description: 'Execute as performance test with JSON output for CI/CD',
|
|
41
|
+
command: '<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
description: 'Execute with custom poll interval (10 seconds)',
|
|
45
|
+
command: '<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
static flags = {
|
|
49
|
+
'test-id': Flags.string({
|
|
50
|
+
char: 't',
|
|
51
|
+
description: 'Test sys_id to execute',
|
|
52
|
+
required: false,
|
|
53
|
+
exclusive: ['suite-id', 'suite-name']
|
|
54
|
+
}),
|
|
55
|
+
'suite-id': Flags.string({
|
|
56
|
+
char: 's',
|
|
57
|
+
description: 'Test Suite sys_id to execute',
|
|
58
|
+
required: false,
|
|
59
|
+
exclusive: ['test-id', 'suite-name']
|
|
60
|
+
}),
|
|
61
|
+
'suite-name': Flags.string({
|
|
62
|
+
char: 'n',
|
|
63
|
+
description: 'Test Suite name to execute',
|
|
64
|
+
required: false,
|
|
65
|
+
exclusive: ['test-id', 'suite-id']
|
|
66
|
+
}),
|
|
67
|
+
'wait': Flags.boolean({
|
|
68
|
+
char: 'w',
|
|
69
|
+
description: 'Wait for test suite execution to complete and return results',
|
|
70
|
+
required: false,
|
|
71
|
+
default: true
|
|
72
|
+
}),
|
|
73
|
+
'poll-interval': Flags.integer({
|
|
74
|
+
char: 'p',
|
|
75
|
+
description: 'Polling interval in milliseconds when waiting for completion',
|
|
76
|
+
required: false,
|
|
77
|
+
default: 5000
|
|
78
|
+
}),
|
|
79
|
+
'browser': Flags.string({
|
|
80
|
+
char: 'b',
|
|
81
|
+
description: 'Browser name for test execution (e.g., chrome, firefox)',
|
|
82
|
+
required: false
|
|
83
|
+
}),
|
|
84
|
+
'browser-version': Flags.string({
|
|
85
|
+
description: 'Browser version for test execution',
|
|
86
|
+
required: false
|
|
87
|
+
}),
|
|
88
|
+
'os-name': Flags.string({
|
|
89
|
+
description: 'Operating system name for test execution',
|
|
90
|
+
required: false
|
|
91
|
+
}),
|
|
92
|
+
'os-version': Flags.string({
|
|
93
|
+
description: 'Operating system version for test execution',
|
|
94
|
+
required: false
|
|
95
|
+
}),
|
|
96
|
+
'performance': Flags.boolean({
|
|
97
|
+
description: 'Run as performance test',
|
|
98
|
+
required: false,
|
|
99
|
+
default: false
|
|
100
|
+
}),
|
|
101
|
+
'cloud': Flags.boolean({
|
|
102
|
+
description: 'Run in cloud',
|
|
103
|
+
required: false,
|
|
104
|
+
default: false
|
|
105
|
+
}),
|
|
106
|
+
'json': Flags.boolean({
|
|
107
|
+
char: 'j',
|
|
108
|
+
description: 'Output results as JSON',
|
|
109
|
+
required: false,
|
|
110
|
+
default: false
|
|
111
|
+
})
|
|
112
|
+
};
|
|
113
|
+
_logger = new Logger("AtfCommand");
|
|
114
|
+
async run() {
|
|
115
|
+
const { args, flags } = await this.parse(Atf);
|
|
116
|
+
// Validate that at least one execution option is provided
|
|
117
|
+
if (isNilOrEmpty(flags['test-id']) && isNilOrEmpty(flags['suite-id']) && isNilOrEmpty(flags['suite-name'])) {
|
|
118
|
+
this.error('You must specify either --test-id, --suite-id, or --suite-name');
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
const executor = new ATFTestExecutor(this.instance);
|
|
123
|
+
// Execute single test
|
|
124
|
+
if (!isNilOrEmpty(flags['test-id'])) {
|
|
125
|
+
await this.executeTest(executor, flags['test-id'], flags.json);
|
|
126
|
+
}
|
|
127
|
+
// Execute test suite by sys_id
|
|
128
|
+
else if (!isNilOrEmpty(flags['suite-id'])) {
|
|
129
|
+
await this.executeTestSuite(executor, flags['suite-id'], flags, 'id');
|
|
130
|
+
}
|
|
131
|
+
// Execute test suite by name
|
|
132
|
+
else if (!isNilOrEmpty(flags['suite-name'])) {
|
|
133
|
+
await this.executeTestSuite(executor, flags['suite-name'], flags, 'name');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
this._logger.error("Error occurred when executing ATF test/suite.", error);
|
|
138
|
+
this.error(error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
displayTestSuiteResults(result) {
|
|
142
|
+
this.log('\n=== Test Suite Execution Results ===');
|
|
143
|
+
this.log(`Test Suite: ${result.test_suite.value}`);
|
|
144
|
+
this.log(`Status: ${result.status}`);
|
|
145
|
+
this.log(`Duration: ${result.duration}`);
|
|
146
|
+
this.log(`Start Time: ${result.start_time}`);
|
|
147
|
+
this.log(`End Time: ${result.end_time}`);
|
|
148
|
+
this.log('\n--- Test Summary ---');
|
|
149
|
+
this.log(`Total Tests: ${result.total_tests}`);
|
|
150
|
+
this.log(`Passed: ${result.passed_tests}`);
|
|
151
|
+
this.log(`Failed: ${result.failed_tests}`);
|
|
152
|
+
this.log(`Skipped: ${result.skipped_tests}`);
|
|
153
|
+
if (result.output) {
|
|
154
|
+
this.log('\n--- Output ---');
|
|
155
|
+
this.log(result.output);
|
|
156
|
+
}
|
|
157
|
+
this.log('\n=== Execution Complete ===');
|
|
158
|
+
// Display pass/fail indicator
|
|
159
|
+
if (result.failed_tests === 0) {
|
|
160
|
+
this.log('\n✓ All tests passed!');
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
this.log(`\n✗ ${result.failed_tests} test(s) failed`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
async executeTest(executor, testId, jsonOutput) {
|
|
167
|
+
this.log(`Executing ATF test: ${testId}`);
|
|
168
|
+
const result = await executor.executeTest(testId);
|
|
169
|
+
if (!result) {
|
|
170
|
+
this.error('Failed to execute test or retrieve test results.');
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (jsonOutput) {
|
|
174
|
+
console.log(JSON.stringify(result, null, 2));
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
this.log('\n=== Test Execution Results ===');
|
|
178
|
+
this.log(`Test Name: ${result.test_name}`);
|
|
179
|
+
this.log(`Status: ${result.status}`);
|
|
180
|
+
this.log(`Run Time: ${result.run_time}`);
|
|
181
|
+
this.log(`Test Sys ID: ${result.test.value}`);
|
|
182
|
+
this.log(`Result Sys ID: ${result.sys_id}`);
|
|
183
|
+
if (result.output) {
|
|
184
|
+
this.log('\n--- Output ---');
|
|
185
|
+
this.log(result.output);
|
|
186
|
+
}
|
|
187
|
+
this.log('\n=== Execution Complete ===');
|
|
188
|
+
// Exit with error code if test failed
|
|
189
|
+
if (result.status !== 'success') {
|
|
190
|
+
this.exit(1);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
async executeTestSuite(executor, identifier, flags, type) {
|
|
195
|
+
const typeLabel = type === 'id' ? 'sys_id' : 'name';
|
|
196
|
+
this.log(`Executing ATF test suite by ${typeLabel}: ${identifier}`);
|
|
197
|
+
// Build execution options from flags
|
|
198
|
+
const options = {};
|
|
199
|
+
if (flags.browser)
|
|
200
|
+
options.browser_name = flags.browser;
|
|
201
|
+
if (flags['browser-version'])
|
|
202
|
+
options.browser_version = flags['browser-version'];
|
|
203
|
+
if (flags['os-name'])
|
|
204
|
+
options.os_name = flags['os-name'];
|
|
205
|
+
if (flags['os-version'])
|
|
206
|
+
options.os_version = flags['os-version'];
|
|
207
|
+
if (flags.performance !== undefined)
|
|
208
|
+
options.is_performance_run = flags.performance;
|
|
209
|
+
if (flags.cloud !== undefined)
|
|
210
|
+
options.run_in_cloud = flags.cloud;
|
|
211
|
+
if (flags.wait) {
|
|
212
|
+
// Execute and wait for completion
|
|
213
|
+
;
|
|
214
|
+
const result = await (type === 'id' ? executor.executeTestSuiteAndWait(identifier, options, flags['poll-interval']) : executor.executeTestSuiteByNameAndWait(identifier, options, flags['poll-interval']));
|
|
215
|
+
if (!result) {
|
|
216
|
+
this.error('Failed to execute test suite or retrieve results.');
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (flags.json) {
|
|
220
|
+
console.log(JSON.stringify(result, null, 2));
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
this.displayTestSuiteResults(result);
|
|
224
|
+
}
|
|
225
|
+
// Exit with error code if any tests failed
|
|
226
|
+
if (result.failed_tests > 0) {
|
|
227
|
+
this.exit(1);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// else {
|
|
231
|
+
// // Just trigger execution without waiting
|
|
232
|
+
// const response = type === 'id'
|
|
233
|
+
// ? await executor.executeTestSuite(identifier, options)
|
|
234
|
+
// : await executor.executeTestSuiteByName(identifier, options);
|
|
235
|
+
// if (!response) {
|
|
236
|
+
// this.error('Failed to trigger test suite execution.');
|
|
237
|
+
// return;
|
|
238
|
+
// }
|
|
239
|
+
// if (flags.json) {
|
|
240
|
+
// console.log(JSON.stringify(response, null, 2));
|
|
241
|
+
// } else {
|
|
242
|
+
// this.log('\n=== Test Suite Execution Started ===');
|
|
243
|
+
// this.log(`Status: ${response.status_label}`);
|
|
244
|
+
// this.log(`Progress ID: ${response.links.progress.id}`);
|
|
245
|
+
// this.log(`Progress URL: ${response.links.progress.url}`);
|
|
246
|
+
// this.log(`Percent Complete: ${response.percent_complete}%`);
|
|
247
|
+
// if (response.status_message) {
|
|
248
|
+
// this.log(`Message: ${response.status_message}`);
|
|
249
|
+
// }
|
|
250
|
+
// this.log('\nTest suite execution has been triggered.');
|
|
251
|
+
// this.log('Use the Progress ID to check status or re-run with --wait flag to wait for completion.');
|
|
252
|
+
// }
|
|
253
|
+
// }
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/atf/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,sDAAsD;AACtD,+CAA+C;AAC/C,uDAAuD;AACvD,OAAO,EAAgB,KAAK,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAG,eAAe,EAAE,MAAM,EAA4C,MAAM,4BAA4B,CAAC;AAEhH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAuDrD,MAAM,OAAO,GAAI,SAAQ,oBAAgC;IAEvD,MAAM,CAAC,IAAI,GAAG,EACb,CAAA;IAED,MAAM,CAAC,WAAW,GAAG,2FAA2F;QAC9G,iHAAiH;QACjH,iHAAiH;QACjH,gEAAgE;QAChE,aAAa;QACb,wDAAwD;QACxD,qCAAqC;QACrC,yCAAyC;QACzC,2CAA2C;QAC3C,6CAA6C;QAC7C,sCAAsC,CAAC;IAEzC,MAAM,CAAC,QAAQ,GAAG;QAChB;YACE,WAAW,EAAE,qCAAqC;YAClD,OAAO,EAAE,oGAAoG;SAC9G;QACD;YACE,WAAW,EAAE,wDAAwD;YACrE,OAAO,EAAE,4GAA4G;SACtH;QACD;YACE,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,oFAAoF;SAC9F;QACD;YACE,WAAW,EAA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AE,CAAC;gBAC5B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,CAAC;QACF,CAAC;QACF,UAAU;QACV,8CAA8C;QAC9C,oCAAoC;QACpC,6DAA6D;QAC7D,oEAAoE;QAEpE,qBAAqB;QACrB,6DAA6D;QAC7D,cAAc;QACd,MAAM;QAEN,sBAAsB;QACtB,sDAAsD;QACtD,aAAa;QACb,0DAA0D;QAC1D,oDAAoD;QACpD,8DAA8D;QAC9D,gEAAgE;QAChE,mEAAmE;QAEnE,qCAAqC;QACrC,yDAAyD;QACzD,QAAQ;QAER,8DAA8D;QAC9D,0GAA0G;QAC1G,MAAM;QACN,IAAI;IACN,CAAC"}
|
|
@@ -2,12 +2,26 @@ import { AuthenticatedCommand } from '../../common/authenticated-command.js';
|
|
|
2
2
|
export declare class Exec extends AuthenticatedCommand<typeof Exec> {
|
|
3
3
|
static args: {
|
|
4
4
|
scope: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
5
|
-
file: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
5
|
+
file: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static autocomplete: {
|
|
8
|
+
scope(ctx: {
|
|
9
|
+
flags: Record<string, any>;
|
|
10
|
+
}): Promise<string[]>;
|
|
6
11
|
};
|
|
7
12
|
static description: string;
|
|
8
|
-
static examples:
|
|
9
|
-
|
|
13
|
+
static examples: {
|
|
14
|
+
description: string;
|
|
15
|
+
command: string;
|
|
16
|
+
}[];
|
|
17
|
+
static flags: {
|
|
18
|
+
params: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
19
|
+
};
|
|
10
20
|
private _logger;
|
|
11
21
|
run(): Promise<void>;
|
|
22
|
+
private applyParameters;
|
|
23
|
+
private executeFromFile;
|
|
24
|
+
private executeScript;
|
|
25
|
+
private startREPL;
|
|
12
26
|
}
|
|
13
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/exec/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAG5E,qBAAa,IAAK,SAAQ,oBAAoB,CAAC,OAAO,IAAI,CAAC;IAEzD,MAAM,CAAC,IAAI;;;MAMV;IAGD,MAAM,CAAC,YAAY;mBAEA;YAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;SAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;MASlE;IAED,MAAM,CAAC,WAAW,SA4CsD;IAExE,MAAM,CAAC,QAAQ;;;QAyCd;IAED,MAAM,CAAC,KAAK;;MAMX;IAED,OAAO,CAAC,OAAO,CAAoC;IAE7C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAc1B,OAAO,CAAC,eAAe;YA+BT,eAAe;YAiBf,aAAa;YAsBb,SAAS;CA0HxB"}
|