@provartesting/provardx-cli 0.0.5 → 0.0.7-beta
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/lib/Utility/GenericError.d.ts +11 -0
- package/lib/Utility/GenericError.js +26 -0
- package/lib/Utility/GenericError.js.map +1 -0
- package/lib/Utility/TestRunError.d.ts +8 -0
- package/lib/Utility/TestRunError.js +20 -0
- package/lib/Utility/TestRunError.js.map +1 -0
- package/lib/Utility/errorCode.d.ts +1 -1
- package/lib/Utility/fileSupport.d.ts +5 -0
- package/lib/Utility/fileSupport.js +40 -0
- package/lib/Utility/fileSupport.js.map +1 -1
- package/lib/Utility/genericErrorHandler.d.ts +10 -0
- package/lib/Utility/genericErrorHandler.js +22 -0
- package/lib/Utility/genericErrorHandler.js.map +1 -0
- package/lib/Utility/propertyFileValidator.js +2 -2
- package/lib/Utility/propertyFileValidator.js.map +1 -1
- package/lib/Utility/provarConfig.d.ts +2 -1
- package/lib/Utility/provarConfig.js.map +1 -1
- package/lib/Utility/sfProvarCommandResult.d.ts +3 -2
- package/lib/Utility/sfProvarCommandResult.js +3 -3
- package/lib/Utility/sfProvarCommandResult.js.map +1 -1
- package/lib/Utility/stringSupport.js +1 -1
- package/lib/Utility/stringSupport.js.map +1 -1
- package/lib/Utility/userSupport.d.ts +2 -1
- package/lib/Utility/userSupport.js +11 -1
- package/lib/Utility/userSupport.js.map +1 -1
- package/lib/commands/provar/automation/config/get.js +2 -2
- package/lib/commands/provar/automation/config/get.js.map +1 -1
- package/lib/commands/provar/automation/config/set.js +2 -2
- package/lib/commands/provar/automation/config/set.js.map +1 -1
- package/lib/commands/provar/automation/metadata/download.js +7 -5
- package/lib/commands/provar/automation/metadata/download.js.map +1 -1
- package/lib/commands/provar/automation/project/compile.d.ts +9 -0
- package/lib/commands/provar/automation/project/compile.js +69 -0
- package/lib/commands/provar/automation/project/compile.js.map +1 -0
- package/lib/commands/provar/automation/setup.d.ts +12 -0
- package/lib/commands/provar/automation/setup.js +65 -0
- package/lib/commands/provar/automation/setup.js.map +1 -0
- package/lib/commands/provar/automation/test/run.d.ts +13 -0
- package/lib/commands/provar/automation/test/run.js +156 -0
- package/lib/commands/provar/automation/test/run.js.map +1 -0
- package/lib/constants/commandConstants.d.ts +4 -1
- package/lib/constants/commandConstants.js +3 -0
- package/lib/constants/commandConstants.js.map +1 -1
- package/lib/constants/errorMessages.d.ts +5 -3
- package/lib/constants/errorMessages.js +4 -2
- package/lib/constants/errorMessages.js.map +1 -1
- package/lib/constants/sfCommandConstants.d.ts +2 -1
- package/lib/constants/sfCommandConstants.js +1 -0
- package/lib/constants/sfCommandConstants.js.map +1 -1
- package/messages/provar.automation.project.compile.md +21 -0
- package/messages/provar.automation.setup.md +23 -0
- package/messages/provar.automation.test.run.md +19 -0
- package/messages/provar.metadata.download.md +1 -1
- package/messages/sf.provar.config.generate.md +1 -1
- package/messages/sf.provar.config.get.md +1 -1
- package/messages/sf.provar.config.load.md +1 -1
- package/messages/sf.provar.config.set.md +1 -1
- package/messages/sf.provar.config.validate.md +1 -1
- package/oclif.manifest.json +176 -1
- package/package.json +15 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { SfProvarCommandResult } from '../../../Utility/sfProvarCommandResult.js';
|
|
3
|
+
export default class ProvarAutomationSetup extends SfCommand<SfProvarCommandResult> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly flags: {
|
|
8
|
+
version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
private errorHandler;
|
|
11
|
+
run(): Promise<SfProvarCommandResult>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as fileSystem from 'node:fs';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
4
|
+
import { Messages } from '@salesforce/core';
|
|
5
|
+
import { populateResult } from '../../../Utility/sfProvarCommandResult.js';
|
|
6
|
+
import ErrorHandler from '../../../Utility/errorHandler.js';
|
|
7
|
+
import { unzipFileSynchronously, unlinkFileIfExist } from '../../../Utility/fileSupport.js';
|
|
8
|
+
import { errorMessages } from '../../../constants/errorMessages.js';
|
|
9
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
10
|
+
const messages = Messages.loadMessages('@provartesting/provardx-cli', 'provar.automation.setup');
|
|
11
|
+
export default class ProvarAutomationSetup extends SfCommand {
|
|
12
|
+
static summary = messages.getMessage('summary');
|
|
13
|
+
static description = messages.getMessage('description');
|
|
14
|
+
static examples = messages.getMessages('examples');
|
|
15
|
+
static flags = {
|
|
16
|
+
version: Flags.string({
|
|
17
|
+
summary: messages.getMessage('flags.version.summary'),
|
|
18
|
+
char: 'v',
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
errorHandler = new ErrorHandler();
|
|
22
|
+
async run() {
|
|
23
|
+
const { flags } = await this.parse(ProvarAutomationSetup);
|
|
24
|
+
const provarHomePath = './ProvarHome';
|
|
25
|
+
const fileStream = fileSystem.createWriteStream(`${provarHomePath}.zip`);
|
|
26
|
+
let url = 'https://download.provartesting.com/latest/Provar_ANT_latest.zip';
|
|
27
|
+
if (flags.version) {
|
|
28
|
+
url = `https://download.provartesting.com/${flags.version}/Provar_ANT_${flags.version}.zip`;
|
|
29
|
+
}
|
|
30
|
+
/* eslint-disable */
|
|
31
|
+
try {
|
|
32
|
+
unlinkFileIfExist(`${provarHomePath}.zip`);
|
|
33
|
+
unlinkFileIfExist(`${provarHomePath}`);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
if (error.code === 'EPERM' || error.code === 'EACCES') {
|
|
37
|
+
this.errorHandler.addErrorsToList('INSUFFICIENT_PERMISSIONS', 'The user does not have permissions to delete the existing folder.');
|
|
38
|
+
}
|
|
39
|
+
return populateResult(flags, this.errorHandler, messages, this.log.bind(this));
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const response = await axios.get(url, { responseType: 'stream' });
|
|
43
|
+
response.data.pipe(fileStream);
|
|
44
|
+
await unzipFileSynchronously(fileStream, provarHomePath);
|
|
45
|
+
unlinkFileIfExist(`${provarHomePath}.zip`);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (error.code === 'ENOENT') {
|
|
49
|
+
this.errorHandler.addErrorsToList('INVALID_PATH', errorMessages.INVALID_PATH);
|
|
50
|
+
}
|
|
51
|
+
else if (error.code === 'EPERM' || error.code === 'EACCES') {
|
|
52
|
+
this.errorHandler.addErrorsToList('INSUFFICIENT_PERMISSIONS', errorMessages.INSUFFICIENT_PERMISSIONS);
|
|
53
|
+
}
|
|
54
|
+
else if (error.code === 'ERR_BAD_REQUEST') {
|
|
55
|
+
this.errorHandler.addErrorsToList('SETUP_ERROR', `${errorMessages.SETUP_ERROR}Provided version is not a valid version.`);
|
|
56
|
+
unlinkFileIfExist(`${provarHomePath}.zip`);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.errorHandler.addErrorsToList('SETUP_ERROR', `${errorMessages.SETUP_ERROR} ${error.message}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return populateResult(flags, this.errorHandler, messages, this.log.bind(this));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../../src/commands/provar/automation/setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CA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AC,0BAA0B,EAAE,aAAa,CAAC,wBAAwB,CAAC,CAAC;YACxG,CAAC;iBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;gBAC5C,IAAI,CAAC,YAAY,CAAC,eAAe,CAC/B,aAAa,EACb,GAAG,aAAa,CAAC,WAAW,0CAA0C,CACvE,CAAC;gBACF,iBAAiB,CAAC,GAAG,cAAc,MAAM,CAAC,CAAC;YAC7C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,aAAa,EAAE,GAAG,aAAa,CAAC,WAAW,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACpG,CAAC;QACH,CAAC;QAED,OAAO,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACjF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { SfProvarCommandResult } from '../../../../Utility/sfProvarCommandResult.js';
|
|
3
|
+
export default class ProvarAutomationTestRun extends SfCommand<SfProvarCommandResult> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
private genericErrorHandler;
|
|
8
|
+
run(): Promise<SfProvarCommandResult>;
|
|
9
|
+
private runJavaCommand;
|
|
10
|
+
private extractReportAndAddFailuresToErrorHandler;
|
|
11
|
+
private getFailureMessagesFromXML;
|
|
12
|
+
private addTestcaseFailures;
|
|
13
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import * as fileSystem from 'node:fs';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
4
|
+
import { Messages } from '@salesforce/core';
|
|
5
|
+
import { xml2json } from 'xml-js';
|
|
6
|
+
import { populateResult } from '../../../../Utility/sfProvarCommandResult.js';
|
|
7
|
+
import { ProvarConfig } from '../../../../Utility/provarConfig.js';
|
|
8
|
+
import { errorMessages } from '../../../../constants/errorMessages.js';
|
|
9
|
+
import UserSupport from '../../../../Utility/userSupport.js';
|
|
10
|
+
import { getStringAfterSubstring } from '../../../../Utility/stringSupport.js';
|
|
11
|
+
import { checkNestedProperty } from '../../../../Utility/jsonSupport.js';
|
|
12
|
+
import GenericErrorHandler from '../../../../Utility/genericErrorHandler.js';
|
|
13
|
+
import { TestRunError } from '../../../../Utility/TestRunError.js';
|
|
14
|
+
import { GenericError } from '../../../../Utility/GenericError.js';
|
|
15
|
+
import { sfCommandConstants } from '../../../../constants/sfCommandConstants.js';
|
|
16
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
17
|
+
const mdFile = 'provar.automation.test.run';
|
|
18
|
+
const messages = Messages.loadMessages('@provartesting/provardx-cli', mdFile);
|
|
19
|
+
export default class ProvarAutomationTestRun extends SfCommand {
|
|
20
|
+
static summary = messages.getMessage('summary');
|
|
21
|
+
static description = messages.getMessage('description');
|
|
22
|
+
static examples = messages.getMessages('examples');
|
|
23
|
+
genericErrorHandler = new GenericErrorHandler();
|
|
24
|
+
async run() {
|
|
25
|
+
const { flags } = await this.parse(ProvarAutomationTestRun);
|
|
26
|
+
const config = await ProvarConfig.loadConfig(this.genericErrorHandler);
|
|
27
|
+
const propertiesFilePath = config.get('PROVARDX_PROPERTIES_FILE_PATH')?.toString();
|
|
28
|
+
if (propertiesFilePath === undefined || !fileSystem.existsSync(propertiesFilePath)) {
|
|
29
|
+
const errorObj = new GenericError();
|
|
30
|
+
errorObj.setCode('MISSING_FILE');
|
|
31
|
+
errorObj.setMessage(errorMessages.MISSING_FILE_ERROR);
|
|
32
|
+
this.genericErrorHandler.addErrorsToList(errorObj);
|
|
33
|
+
return populateResult(flags, this.genericErrorHandler, messages, this.log.bind(this));
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
/* eslint-disable */
|
|
37
|
+
const propertiesData = fileSystem.readFileSync(propertiesFilePath, { encoding: 'utf8' });
|
|
38
|
+
const propertiesInstance = JSON.parse(propertiesData);
|
|
39
|
+
const rawProperties = JSON.stringify(propertiesInstance);
|
|
40
|
+
const userSupport = new UserSupport();
|
|
41
|
+
const updateProperties = userSupport.prepareRawProperties(rawProperties);
|
|
42
|
+
const userInfo = await userSupport.getDxUsersInfo(propertiesInstance.connectionOverride, this.genericErrorHandler);
|
|
43
|
+
if (userInfo === null) {
|
|
44
|
+
return populateResult(flags, this.genericErrorHandler, messages, this.log.bind(this));
|
|
45
|
+
}
|
|
46
|
+
const userInfoString = userSupport.prepareRawProperties(JSON.stringify({ dxUsers: userInfo }));
|
|
47
|
+
const projectPath = propertiesInstance.projectPath;
|
|
48
|
+
if (!fileSystem.existsSync(projectPath)) {
|
|
49
|
+
const errorObj = new GenericError();
|
|
50
|
+
errorObj.setCode('INVALID_PATH');
|
|
51
|
+
errorObj.setMessage('projectPath does not exist');
|
|
52
|
+
this.genericErrorHandler.addErrorsToList(errorObj);
|
|
53
|
+
return populateResult(flags, this.genericErrorHandler, messages, this.log.bind(this));
|
|
54
|
+
}
|
|
55
|
+
const logFilePath = projectPath + '/log.txt';
|
|
56
|
+
const provarDxJarPath = propertiesInstance.provarHome + '/provardx/provardx.jar';
|
|
57
|
+
const testRunCommand = 'java -cp "' +
|
|
58
|
+
provarDxJarPath +
|
|
59
|
+
'"' +
|
|
60
|
+
sfCommandConstants.DX_COMMAND_EXECUTER +
|
|
61
|
+
updateProperties +
|
|
62
|
+
' ' +
|
|
63
|
+
userInfoString +
|
|
64
|
+
' Runtests';
|
|
65
|
+
await this.runJavaCommand(testRunCommand, logFilePath);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
if (error.name === 'SyntaxError') {
|
|
69
|
+
const errorObj = new GenericError();
|
|
70
|
+
errorObj.setCode('MALFORMED_FILE');
|
|
71
|
+
errorObj.setMessage(errorMessages.MALFORMED_FILE_ERROR);
|
|
72
|
+
this.genericErrorHandler.addErrorsToList(errorObj);
|
|
73
|
+
}
|
|
74
|
+
else if (error.name === 'MultipleFailureError') {
|
|
75
|
+
return populateResult(flags, this.genericErrorHandler, messages, this.log.bind(this));
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
const errorObj = new GenericError();
|
|
79
|
+
errorObj.setCode('GENERIC_ERROR');
|
|
80
|
+
errorObj.setMessage(`${error.errorMessage}`);
|
|
81
|
+
this.genericErrorHandler.addErrorsToList(errorObj);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return populateResult(flags, this.genericErrorHandler, messages, this.log.bind(this));
|
|
85
|
+
}
|
|
86
|
+
async runJavaCommand(command, logFilePath) {
|
|
87
|
+
const resolvers = {
|
|
88
|
+
done: null,
|
|
89
|
+
error: null,
|
|
90
|
+
};
|
|
91
|
+
const promise = new Promise((resolve, error) => {
|
|
92
|
+
resolvers.done = resolve;
|
|
93
|
+
resolvers.error = error;
|
|
94
|
+
});
|
|
95
|
+
const javaProcessOutput = spawn(command, { shell: true, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
96
|
+
javaProcessOutput.stdout.on('data', (data) => {
|
|
97
|
+
const logMessage = data.toString().trim();
|
|
98
|
+
this.extractReportAndAddFailuresToErrorHandler(logMessage, logFilePath);
|
|
99
|
+
});
|
|
100
|
+
javaProcessOutput.stderr.on('error', (error) => {
|
|
101
|
+
const logError = error.toString().trim();
|
|
102
|
+
this.extractReportAndAddFailuresToErrorHandler(logError, logFilePath);
|
|
103
|
+
});
|
|
104
|
+
javaProcessOutput.stderr.on('data', (error) => {
|
|
105
|
+
const logError = error.toString().trim();
|
|
106
|
+
this.extractReportAndAddFailuresToErrorHandler(logError, logFilePath);
|
|
107
|
+
});
|
|
108
|
+
javaProcessOutput.stderr.on('finish', (error) => {
|
|
109
|
+
resolvers.done();
|
|
110
|
+
});
|
|
111
|
+
return promise;
|
|
112
|
+
}
|
|
113
|
+
extractReportAndAddFailuresToErrorHandler(logMessage, logFilePath) {
|
|
114
|
+
const successMessage = 'JUnit XML report written successfully.';
|
|
115
|
+
if (logMessage.includes(successMessage)) {
|
|
116
|
+
const xmlJunitReportPath = getStringAfterSubstring(logMessage, successMessage);
|
|
117
|
+
this.getFailureMessagesFromXML(xmlJunitReportPath);
|
|
118
|
+
}
|
|
119
|
+
else if (logMessage.includes('cause: [Exception')) {
|
|
120
|
+
const errorObj = new GenericError();
|
|
121
|
+
errorObj.setCode('TEST_RUN_ERROR');
|
|
122
|
+
errorObj.setMessage(`Error ${getStringAfterSubstring(logMessage, 'Error')}`);
|
|
123
|
+
this.genericErrorHandler.addErrorsToList(errorObj);
|
|
124
|
+
}
|
|
125
|
+
fileSystem.appendFileSync(logFilePath, logMessage, { encoding: 'utf-8' });
|
|
126
|
+
}
|
|
127
|
+
getFailureMessagesFromXML(filePath) {
|
|
128
|
+
if (fileSystem.existsSync(filePath)) {
|
|
129
|
+
const xmlContent = fileSystem.readFileSync(filePath, 'utf8');
|
|
130
|
+
const dataString = xml2json(xmlContent, { compact: true });
|
|
131
|
+
const jsonData = JSON.parse(dataString);
|
|
132
|
+
const testsuiteJson = jsonData?.testsuite;
|
|
133
|
+
if (testsuiteJson?.testcase) {
|
|
134
|
+
if (Array.isArray(testsuiteJson?.testcase)) {
|
|
135
|
+
for (let testCase of testsuiteJson?.testcase) {
|
|
136
|
+
this.addTestcaseFailures(testCase);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
this.addTestcaseFailures(testsuiteJson?.testcase);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
addTestcaseFailures(testCase) {
|
|
148
|
+
if (checkNestedProperty(testCase, 'failure')) {
|
|
149
|
+
const errorObj = new TestRunError();
|
|
150
|
+
errorObj.setTestCasePath(`${testCase?._attributes.name}`);
|
|
151
|
+
errorObj.setMessage(`${testCase?.failure._cdata}.`);
|
|
152
|
+
this.genericErrorHandler.addErrorsToList(errorObj);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../../src/commands/provar/automation/test/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAyB,cAAc,EAAE,MAAM,8CAA8C,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,mBAAmB,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,MAAM,GAAW,4BAA4B,CAAC;AACpD,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAC;AA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,EAAE,SAAS,CAAC;YAC1C,IAAI,aAAa,EAAE,QAAQ,EAAE,CAAC;gBAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC;oBAC3C,KAAK,IAAI,QAAQ,IAAI,aAAa,EAAE,QAAQ,EAAE,CAAC;wBAC7C,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;oBACrC,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;gBACpD,CAAC;YACH,CAAC;iBAAM,CAAC;YACR,CAAC;QACH,CAAC;IACH,CAAC;IACO,mBAAmB,CAAC,QAAa;QACvC,IAAI,mBAAmB,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC;YAC7C,MAAM,QAAQ,GAAiB,IAAI,YAAY,EAAE,CAAC;YAClD,QAAQ,CAAC,eAAe,CAAC,GAAG,QAAQ,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1D,QAAQ,CAAC,UAAU,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YACpD,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACrD,CAAC;IACH,CAAC"}
|
|
@@ -4,5 +4,8 @@ export declare enum commandConstants {
|
|
|
4
4
|
SF_PROVAR_AUTOMATION_CONFIG_VALIDATE_COMMAND = "provar automation config validate",
|
|
5
5
|
SF_PROVAR_AUTOMATION_CONFIG_SET_COMMAND = "provar automation config set",
|
|
6
6
|
SF_PROVAR_AUTOMATION_CONFIG_GET_COMMAND = "provar automation config get",
|
|
7
|
-
SF_PROVAR_AUTOMATION_METADATA_DOWNLOAD_COMMAND = "provar automation metadata download"
|
|
7
|
+
SF_PROVAR_AUTOMATION_METADATA_DOWNLOAD_COMMAND = "provar automation metadata download",
|
|
8
|
+
SF_PROVAR_AUTOMATION_TEST_RUN_COMMAND = "provar automation test run",
|
|
9
|
+
SF_PROVAR_AUTOMATION_PROJECT_COMPILE_COMMAND = "provar automation project compile",
|
|
10
|
+
SF_PROVAR_AUTOMATION_SETUP_COMMAND = "provar automation setup"
|
|
8
11
|
}
|
|
@@ -6,5 +6,8 @@ export var commandConstants;
|
|
|
6
6
|
commandConstants["SF_PROVAR_AUTOMATION_CONFIG_SET_COMMAND"] = "provar automation config set";
|
|
7
7
|
commandConstants["SF_PROVAR_AUTOMATION_CONFIG_GET_COMMAND"] = "provar automation config get";
|
|
8
8
|
commandConstants["SF_PROVAR_AUTOMATION_METADATA_DOWNLOAD_COMMAND"] = "provar automation metadata download";
|
|
9
|
+
commandConstants["SF_PROVAR_AUTOMATION_TEST_RUN_COMMAND"] = "provar automation test run";
|
|
10
|
+
commandConstants["SF_PROVAR_AUTOMATION_PROJECT_COMPILE_COMMAND"] = "provar automation project compile";
|
|
11
|
+
commandConstants["SF_PROVAR_AUTOMATION_SETUP_COMMAND"] = "provar automation setup";
|
|
9
12
|
})(commandConstants || (commandConstants = {}));
|
|
10
13
|
//# sourceMappingURL=commandConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandConstants.js","sourceRoot":"","sources":["../../src/constants/commandConstants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"commandConstants.js","sourceRoot":"","sources":["../../src/constants/commandConstants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,sGAAkF,CAAA;IAClF,8FAA0E,CAAA;IAC1E,sGAAkF,CAAA;IAClF,4FAAwE,CAAA;IACxE,4FAAwE,CAAA;IACxE,0GAAsF,CAAA;IACtF,wFAAoE,CAAA;IACpE,sGAAkF,CAAA;IAClF,kFAA8D,CAAA;AAChE,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export declare enum errorMessages {
|
|
2
2
|
INVALID_PATH = "The provided path does not exist or is invalid.",
|
|
3
|
+
INSUFFICIENT_PERMISSIONS = "The user does not have permissions to create the file.",
|
|
3
4
|
GENERATE_OPERATION_DENIED = "The operation was cancelled.",
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
MISSING_FILE_ERROR = "The properties file has not been loaded or cannot be accessed.",
|
|
6
|
+
MALFORMED_FILE_ERROR = "The properties file is not a valid JSON.",
|
|
6
7
|
MISSING_VALUE = "The value is missing.",
|
|
7
8
|
MISSING_PROPERTY = "The property is missing.",
|
|
8
9
|
INVALID_ARGUMENT = "The property/value cannot be parsed.",
|
|
9
10
|
INVALID_VALUE = "The value cannot be parsed.",
|
|
10
11
|
INVALID_PROPERTY = "The property cannot be parsed.",
|
|
11
12
|
MISSING_PROPERTY_GET = "Please, specify a property to get from the properties file.",
|
|
12
|
-
UNKNOWN_PROPERTY = "The property is not present in the file."
|
|
13
|
+
UNKNOWN_PROPERTY = "The property is not present in the file.",
|
|
14
|
+
SETUP_ERROR = "Provar Automation could not be set up because: "
|
|
13
15
|
}
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
export var errorMessages;
|
|
8
8
|
(function (errorMessages) {
|
|
9
9
|
errorMessages["INVALID_PATH"] = "The provided path does not exist or is invalid.";
|
|
10
|
+
errorMessages["INSUFFICIENT_PERMISSIONS"] = "The user does not have permissions to create the file.";
|
|
10
11
|
errorMessages["GENERATE_OPERATION_DENIED"] = "The operation was cancelled.";
|
|
11
|
-
errorMessages["
|
|
12
|
-
errorMessages["
|
|
12
|
+
errorMessages["MISSING_FILE_ERROR"] = "The properties file has not been loaded or cannot be accessed.";
|
|
13
|
+
errorMessages["MALFORMED_FILE_ERROR"] = "The properties file is not a valid JSON.";
|
|
13
14
|
errorMessages["MISSING_VALUE"] = "The value is missing.";
|
|
14
15
|
errorMessages["MISSING_PROPERTY"] = "The property is missing.";
|
|
15
16
|
errorMessages["INVALID_ARGUMENT"] = "The property/value cannot be parsed.";
|
|
@@ -17,5 +18,6 @@ export var errorMessages;
|
|
|
17
18
|
errorMessages["INVALID_PROPERTY"] = "The property cannot be parsed.";
|
|
18
19
|
errorMessages["MISSING_PROPERTY_GET"] = "Please, specify a property to get from the properties file.";
|
|
19
20
|
errorMessages["UNKNOWN_PROPERTY"] = "The property is not present in the file.";
|
|
21
|
+
errorMessages["SETUP_ERROR"] = "Provar Automation could not be set up because: ";
|
|
20
22
|
})(errorMessages || (errorMessages = {}));
|
|
21
23
|
//# sourceMappingURL=errorMessages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessages.js","sourceRoot":"","sources":["../../src/constants/errorMessages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"errorMessages.js","sourceRoot":"","sources":["../../src/constants/errorMessages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,aAcX;AAdD,WAAY,aAAa;IACvB,iFAAgE,CAAA;IAChE,oGAAmF,CAAA;IACnF,2EAA0D,CAAA;IAC1D,sGAAqF,CAAA;IACrF,kFAAiE,CAAA;IACjE,wDAAuC,CAAA;IACvC,8DAA6C,CAAA;IAC7C,0EAAyD,CAAA;IACzD,8DAA6C,CAAA;IAC7C,oEAAmD,CAAA;IACnD,qGAAoF,CAAA;IACpF,8EAA6D,CAAA;IAC7D,gFAA+D,CAAA;AACjE,CAAC,EAdW,aAAa,KAAb,aAAa,QAcxB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare enum sfCommandConstants {
|
|
2
2
|
DISPLAY_USER_INFO = "sf org display user --json --target-org ",
|
|
3
|
-
GENERATE_PASSWORD = "sf org generate password --target-org "
|
|
3
|
+
GENERATE_PASSWORD = "sf org generate password --target-org ",
|
|
4
|
+
DX_COMMAND_EXECUTER = " com.provar.provardx.DxCommandExecuter "
|
|
4
5
|
}
|
|
@@ -2,5 +2,6 @@ export var sfCommandConstants;
|
|
|
2
2
|
(function (sfCommandConstants) {
|
|
3
3
|
sfCommandConstants["DISPLAY_USER_INFO"] = "sf org display user --json --target-org ";
|
|
4
4
|
sfCommandConstants["GENERATE_PASSWORD"] = "sf org generate password --target-org ";
|
|
5
|
+
sfCommandConstants["DX_COMMAND_EXECUTER"] = " com.provar.provardx.DxCommandExecuter ";
|
|
5
6
|
})(sfCommandConstants || (sfCommandConstants = {}));
|
|
6
7
|
//# sourceMappingURL=sfCommandConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sfCommandConstants.js","sourceRoot":"","sources":["../../src/constants/sfCommandConstants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"sfCommandConstants.js","sourceRoot":"","sources":["../../src/constants/sfCommandConstants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,oFAA8D,CAAA;IAC9D,kFAA4D,CAAA;IAC5D,qFAA+D,CAAA;AACjE,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Compile PageObject and PageControl Java source files into object code.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Compile PageObject and PageControl Java source files into object code.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
Compile the project using the configuration set in the properties file.
|
|
12
|
+
|
|
13
|
+
- <%= config.bin %> <%= command.id %>
|
|
14
|
+
|
|
15
|
+
# success_message
|
|
16
|
+
|
|
17
|
+
The project was compiled successfully.
|
|
18
|
+
|
|
19
|
+
# error.MultipleFailure
|
|
20
|
+
|
|
21
|
+
%s
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Download and Install Provar Automation.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Download and Install Provar Automation.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
- <%= config.bin %> <%= command.id %>
|
|
12
|
+
|
|
13
|
+
# flags.version.summary
|
|
14
|
+
|
|
15
|
+
Provar Automation build version number.
|
|
16
|
+
|
|
17
|
+
# error.MultipleFailure
|
|
18
|
+
|
|
19
|
+
%s
|
|
20
|
+
|
|
21
|
+
# success_message
|
|
22
|
+
|
|
23
|
+
Provar Automation was set up successfully. Please, remember to set the property “provarHome” to the relative path “ProvarHome”.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Run the tests as specified in the loaded properties file.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Run the tests as specified in the loaded properties file.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
- <%= config.bin %> <%= command.id %>
|
|
12
|
+
|
|
13
|
+
# error.MultipleFailure
|
|
14
|
+
|
|
15
|
+
%s
|
|
16
|
+
|
|
17
|
+
# success_message
|
|
18
|
+
|
|
19
|
+
The tests were run successfully.
|