@provartesting/provardx-cli 0.0.7-beta → 1.1.1
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/LICENSE +28 -0
- package/README.md +232 -14
- package/lib/commands/provar/automation/config/generate.d.ts +1 -1
- package/lib/commands/provar/automation/config/generate.js +1 -5
- package/lib/commands/provar/automation/config/generate.js.map +1 -1
- package/lib/commands/provar/automation/config/get.d.ts +1 -1
- package/lib/commands/provar/automation/config/get.js +1 -6
- package/lib/commands/provar/automation/config/get.js.map +1 -1
- package/lib/commands/provar/automation/config/load.d.ts +1 -1
- package/lib/commands/provar/automation/config/load.js +1 -6
- package/lib/commands/provar/automation/config/load.js.map +1 -1
- package/lib/commands/provar/automation/config/set.d.ts +1 -1
- package/lib/commands/provar/automation/config/set.js +1 -6
- package/lib/commands/provar/automation/config/set.js.map +1 -1
- package/lib/commands/provar/automation/config/validate.d.ts +1 -1
- package/lib/commands/provar/automation/config/validate.js +1 -4
- package/lib/commands/provar/automation/config/validate.js.map +1 -1
- package/oclif.manifest.json +1 -247
- package/package.json +8 -6
- package/lib/Utility/GenericError.d.ts +0 -11
- package/lib/Utility/GenericError.js +0 -26
- package/lib/Utility/GenericError.js.map +0 -1
- package/lib/Utility/TestRunError.d.ts +0 -8
- package/lib/Utility/TestRunError.js +0 -20
- package/lib/Utility/TestRunError.js.map +0 -1
- package/lib/Utility/errorCode.d.ts +0 -1
- package/lib/Utility/errorCode.js +0 -8
- package/lib/Utility/errorCode.js.map +0 -1
- package/lib/Utility/errorHandler.d.ts +0 -15
- package/lib/Utility/errorHandler.js +0 -22
- package/lib/Utility/errorHandler.js.map +0 -1
- package/lib/Utility/fileSupport.d.ts +0 -12
- package/lib/Utility/fileSupport.js +0 -63
- package/lib/Utility/fileSupport.js.map +0 -1
- package/lib/Utility/genericErrorHandler.d.ts +0 -10
- package/lib/Utility/genericErrorHandler.js +0 -22
- package/lib/Utility/genericErrorHandler.js.map +0 -1
- package/lib/Utility/jsonSupport.d.ts +0 -8
- package/lib/Utility/jsonSupport.js +0 -48
- package/lib/Utility/jsonSupport.js.map +0 -1
- package/lib/Utility/propertyFileValidator.d.ts +0 -13
- package/lib/Utility/propertyFileValidator.js +0 -85
- package/lib/Utility/propertyFileValidator.js.map +0 -1
- package/lib/Utility/provarConfig.d.ts +0 -12
- package/lib/Utility/provarConfig.js +0 -38
- package/lib/Utility/provarConfig.js.map +0 -1
- package/lib/Utility/provardxExecutor.d.ts +0 -7
- package/lib/Utility/provardxExecutor.js +0 -31
- package/lib/Utility/provardxExecutor.js.map +0 -1
- package/lib/Utility/sfProvarCommandResult.d.ts +0 -13
- package/lib/Utility/sfProvarCommandResult.js +0 -30
- package/lib/Utility/sfProvarCommandResult.js.map +0 -1
- package/lib/Utility/stringSupport.d.ts +0 -8
- package/lib/Utility/stringSupport.js +0 -37
- package/lib/Utility/stringSupport.js.map +0 -1
- package/lib/Utility/userSupport.d.ts +0 -16
- package/lib/Utility/userSupport.js +0 -66
- package/lib/Utility/userSupport.js.map +0 -1
- package/lib/commands/provar/automation/metadata/download.d.ts +0 -13
- package/lib/commands/provar/automation/metadata/download.js +0 -96
- package/lib/commands/provar/automation/metadata/download.js.map +0 -1
- package/lib/commands/provar/automation/project/compile.d.ts +0 -9
- package/lib/commands/provar/automation/project/compile.js +0 -69
- package/lib/commands/provar/automation/project/compile.js.map +0 -1
- package/lib/commands/provar/automation/setup.d.ts +0 -12
- package/lib/commands/provar/automation/setup.js +0 -65
- package/lib/commands/provar/automation/setup.js.map +0 -1
- package/lib/commands/provar/automation/test/run.d.ts +0 -13
- package/lib/commands/provar/automation/test/run.js +0 -156
- package/lib/commands/provar/automation/test/run.js.map +0 -1
- package/lib/constants/commandConstants.d.ts +0 -11
- package/lib/constants/commandConstants.js +0 -13
- package/lib/constants/commandConstants.js.map +0 -1
- package/lib/constants/errorMessages.d.ts +0 -15
- package/lib/constants/errorMessages.js +0 -23
- package/lib/constants/errorMessages.js.map +0 -1
- package/lib/constants/propertyFileContent.d.ts +0 -24
- package/lib/constants/propertyFileContent.js +0 -25
- package/lib/constants/propertyFileContent.js.map +0 -1
- package/lib/constants/propertyFileSchema.d.ts +0 -254
- package/lib/constants/propertyFileSchema.js +0 -248
- package/lib/constants/propertyFileSchema.js.map +0 -1
- package/lib/constants/sfCommandConstants.d.ts +0 -5
- package/lib/constants/sfCommandConstants.js +0 -7
- package/lib/constants/sfCommandConstants.js.map +0 -1
- package/messages/provar.automation.project.compile.md +0 -21
- package/messages/provar.automation.setup.md +0 -23
- package/messages/provar.automation.test.run.md +0 -19
- package/messages/provar.metadata.download.md +0 -23
|
@@ -1,65 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAyB,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,YAAY,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,yBAAyB,CAAC,CAAC;AAEjG,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,SAAgC;IAC1E,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,OAAO,EAAE,KAAK,CA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,CAAC,UAAU,CAAC,CAAC;YAC/B,MAAM,sBAAsB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YACzD,iBAAiB,CAAC,GAAG,cAAc,MAAM,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC5B,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,cAAc,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;YAChF,CAAC;iBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC7D,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,sC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AAmB,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACrD,CAAC;IACH,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum commandConstants {
|
|
2
|
-
SF_PROVAR_AUTOMATION_CONFIG_GENERATE_COMMAND = "provar automation config generate",
|
|
3
|
-
SF_PROVAR_AUTOMATION_CONFIG_LOAD_COMMAND = "provar automation config load",
|
|
4
|
-
SF_PROVAR_AUTOMATION_CONFIG_VALIDATE_COMMAND = "provar automation config validate",
|
|
5
|
-
SF_PROVAR_AUTOMATION_CONFIG_SET_COMMAND = "provar automation config set",
|
|
6
|
-
SF_PROVAR_AUTOMATION_CONFIG_GET_COMMAND = "provar automation config get",
|
|
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"
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export var commandConstants;
|
|
2
|
-
(function (commandConstants) {
|
|
3
|
-
commandConstants["SF_PROVAR_AUTOMATION_CONFIG_GENERATE_COMMAND"] = "provar automation config generate";
|
|
4
|
-
commandConstants["SF_PROVAR_AUTOMATION_CONFIG_LOAD_COMMAND"] = "provar automation config load";
|
|
5
|
-
commandConstants["SF_PROVAR_AUTOMATION_CONFIG_VALIDATE_COMMAND"] = "provar automation config validate";
|
|
6
|
-
commandConstants["SF_PROVAR_AUTOMATION_CONFIG_SET_COMMAND"] = "provar automation config set";
|
|
7
|
-
commandConstants["SF_PROVAR_AUTOMATION_CONFIG_GET_COMMAND"] = "provar automation config get";
|
|
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";
|
|
12
|
-
})(commandConstants || (commandConstants = {}));
|
|
13
|
-
//# sourceMappingURL=commandConstants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,15 +0,0 @@
|
|
|
1
|
-
export declare enum errorMessages {
|
|
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.",
|
|
4
|
-
GENERATE_OPERATION_DENIED = "The operation was cancelled.",
|
|
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.",
|
|
7
|
-
MISSING_VALUE = "The value is missing.",
|
|
8
|
-
MISSING_PROPERTY = "The property is missing.",
|
|
9
|
-
INVALID_ARGUMENT = "The property/value cannot be parsed.",
|
|
10
|
-
INVALID_VALUE = "The value cannot be parsed.",
|
|
11
|
-
INVALID_PROPERTY = "The property cannot be parsed.",
|
|
12
|
-
MISSING_PROPERTY_GET = "Please, specify a property to get from the properties file.",
|
|
13
|
-
UNKNOWN_PROPERTY = "The property is not present in the file.",
|
|
14
|
-
SETUP_ERROR = "Provar Automation could not be set up because: "
|
|
15
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Provar Limited.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
export var errorMessages;
|
|
8
|
-
(function (errorMessages) {
|
|
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.";
|
|
11
|
-
errorMessages["GENERATE_OPERATION_DENIED"] = "The operation was cancelled.";
|
|
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.";
|
|
14
|
-
errorMessages["MISSING_VALUE"] = "The value is missing.";
|
|
15
|
-
errorMessages["MISSING_PROPERTY"] = "The property is missing.";
|
|
16
|
-
errorMessages["INVALID_ARGUMENT"] = "The property/value cannot be parsed.";
|
|
17
|
-
errorMessages["INVALID_VALUE"] = "The value cannot be parsed.";
|
|
18
|
-
errorMessages["INVALID_PROPERTY"] = "The property cannot be parsed.";
|
|
19
|
-
errorMessages["MISSING_PROPERTY_GET"] = "Please, specify a property to get from the properties file.";
|
|
20
|
-
errorMessages["UNKNOWN_PROPERTY"] = "The property is not present in the file.";
|
|
21
|
-
errorMessages["SETUP_ERROR"] = "Provar Automation could not be set up because: ";
|
|
22
|
-
})(errorMessages || (errorMessages = {}));
|
|
23
|
-
//# sourceMappingURL=errorMessages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,24 +0,0 @@
|
|
|
1
|
-
export declare const propertyFileContent: {
|
|
2
|
-
provarHome: string;
|
|
3
|
-
projectPath: string;
|
|
4
|
-
resultsPath: string;
|
|
5
|
-
smtpPath: string;
|
|
6
|
-
resultsPathDisposition: string;
|
|
7
|
-
testOutputLevel: string;
|
|
8
|
-
pluginOutputlevel: string;
|
|
9
|
-
stopOnError: boolean;
|
|
10
|
-
lightningMode: boolean;
|
|
11
|
-
connectionRefreshType: string;
|
|
12
|
-
metadata: {
|
|
13
|
-
metadataLevel: string;
|
|
14
|
-
cachePath: string;
|
|
15
|
-
};
|
|
16
|
-
environment: {
|
|
17
|
-
testEnvironment: string;
|
|
18
|
-
webBrowser: string;
|
|
19
|
-
webBrowserConfig: string;
|
|
20
|
-
webBrowserProviderName: string;
|
|
21
|
-
webBrowserDeviceName: string;
|
|
22
|
-
};
|
|
23
|
-
testprojectSecrets: string;
|
|
24
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export const propertyFileContent = {
|
|
2
|
-
provarHome: '${PROVAR_HOME}',
|
|
3
|
-
projectPath: '${PROVAR_PROJECT_PATH}',
|
|
4
|
-
resultsPath: '${PROVAR_RESULTS_PATH}',
|
|
5
|
-
smtpPath: '',
|
|
6
|
-
resultsPathDisposition: 'Increment',
|
|
7
|
-
testOutputLevel: 'BASIC',
|
|
8
|
-
pluginOutputlevel: 'WARNING',
|
|
9
|
-
stopOnError: false,
|
|
10
|
-
lightningMode: true,
|
|
11
|
-
connectionRefreshType: 'Reload',
|
|
12
|
-
metadata: {
|
|
13
|
-
metadataLevel: 'Reuse',
|
|
14
|
-
cachePath: '../.provarCaches',
|
|
15
|
-
},
|
|
16
|
-
environment: {
|
|
17
|
-
testEnvironment: '${PROVAR_TEST_ENVIRONMENT}',
|
|
18
|
-
webBrowser: 'Chrome',
|
|
19
|
-
webBrowserConfig: 'Full Screen',
|
|
20
|
-
webBrowserProviderName: 'Desktop',
|
|
21
|
-
webBrowserDeviceName: 'Full Screen',
|
|
22
|
-
},
|
|
23
|
-
testprojectSecrets: '${PROVAR_TEST_PROJECT_SECRETS}',
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=propertyFileContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"propertyFileContent.js","sourceRoot":"","sources":["../../src/constants/propertyFileContent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,UAAU,EAAE,gBAAgB;IAC5B,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,wBAAwB;IACrC,QAAQ,EAAE,EAAE;IACZ,sBAAsB,EAAE,WAAW;IACnC,eAAe,EAAE,OAAO;IACxB,iBAAiB,EAAE,SAAS;IAC5B,WAAW,EAAE,KAAK;IAClB,aAAa,EAAE,IAAI;IACnB,qBAAqB,EAAE,QAAQ;IAC/B,QAAQ,EAAE;QACR,aAAa,EAAE,OAAO;QACtB,SAAS,EAAE,kBAAkB;KAC9B;IACD,WAAW,EAAE;QACX,eAAe,EAAE,4BAA4B;QAC7C,UAAU,EAAE,QAAQ;QACpB,gBAAgB,EAAE,aAAa;QAC/B,sBAAsB,EAAE,SAAS;QACjC,oBAAoB,EAAE,aAAa;KACpC;IACD,kBAAkB,EAAE,gCAAgC;CACrD,CAAC"}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
export declare const propertyFileSchema: {
|
|
2
|
-
$schema: string;
|
|
3
|
-
$id: string;
|
|
4
|
-
title: string;
|
|
5
|
-
description: string;
|
|
6
|
-
type: string;
|
|
7
|
-
required: string[];
|
|
8
|
-
dependentRequired: {
|
|
9
|
-
attachmentProperties: string;
|
|
10
|
-
};
|
|
11
|
-
properties: {
|
|
12
|
-
provarHome: {
|
|
13
|
-
description: string;
|
|
14
|
-
type: string;
|
|
15
|
-
pattern: RegExp;
|
|
16
|
-
};
|
|
17
|
-
projectPath: {
|
|
18
|
-
description: string;
|
|
19
|
-
type: string;
|
|
20
|
-
pattern: RegExp;
|
|
21
|
-
};
|
|
22
|
-
smtpPath: {
|
|
23
|
-
description: string;
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
resultsPath: {
|
|
27
|
-
description: string;
|
|
28
|
-
type: string;
|
|
29
|
-
pattern: RegExp;
|
|
30
|
-
};
|
|
31
|
-
resultsPathDisposition: {
|
|
32
|
-
description: string;
|
|
33
|
-
type: string;
|
|
34
|
-
enum: string[];
|
|
35
|
-
};
|
|
36
|
-
testOutputLevel: {
|
|
37
|
-
description: string;
|
|
38
|
-
type: string;
|
|
39
|
-
enum: string[];
|
|
40
|
-
};
|
|
41
|
-
pluginOutputlevel: {
|
|
42
|
-
description: string;
|
|
43
|
-
type: string;
|
|
44
|
-
enum: string[];
|
|
45
|
-
};
|
|
46
|
-
excludeCallable: {
|
|
47
|
-
description: string;
|
|
48
|
-
type: string;
|
|
49
|
-
};
|
|
50
|
-
stopOnError: {
|
|
51
|
-
description: string;
|
|
52
|
-
type: string;
|
|
53
|
-
};
|
|
54
|
-
connectionRefreshType: {
|
|
55
|
-
description: string;
|
|
56
|
-
type: string;
|
|
57
|
-
};
|
|
58
|
-
lightningMode: {
|
|
59
|
-
description: string;
|
|
60
|
-
type: string;
|
|
61
|
-
};
|
|
62
|
-
metadata: {
|
|
63
|
-
description: string;
|
|
64
|
-
type: string;
|
|
65
|
-
properties: {
|
|
66
|
-
metadataLevel: {
|
|
67
|
-
description: string;
|
|
68
|
-
type: string;
|
|
69
|
-
enum: string[];
|
|
70
|
-
};
|
|
71
|
-
cachePath: {
|
|
72
|
-
description: string;
|
|
73
|
-
type: string;
|
|
74
|
-
pattern: RegExp;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
required: string[];
|
|
78
|
-
};
|
|
79
|
-
environment: {
|
|
80
|
-
description: string;
|
|
81
|
-
type: string;
|
|
82
|
-
properties: {
|
|
83
|
-
testEnvironment: {
|
|
84
|
-
description: string;
|
|
85
|
-
type: string;
|
|
86
|
-
};
|
|
87
|
-
webBrowser: {
|
|
88
|
-
description: string;
|
|
89
|
-
type: string;
|
|
90
|
-
enum: string[];
|
|
91
|
-
};
|
|
92
|
-
webBrowserConfig: {
|
|
93
|
-
description: string;
|
|
94
|
-
type: string;
|
|
95
|
-
pattern: RegExp;
|
|
96
|
-
};
|
|
97
|
-
webBrowserProviderName: {
|
|
98
|
-
description: string;
|
|
99
|
-
type: string;
|
|
100
|
-
pattern: RegExp;
|
|
101
|
-
};
|
|
102
|
-
webBrowserDeviceName: {
|
|
103
|
-
description: string;
|
|
104
|
-
type: string;
|
|
105
|
-
pattern: RegExp;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
required: string[];
|
|
109
|
-
};
|
|
110
|
-
testprojectSecrets: {
|
|
111
|
-
description: string;
|
|
112
|
-
type: string;
|
|
113
|
-
};
|
|
114
|
-
environmentsSecrets: {
|
|
115
|
-
description: string;
|
|
116
|
-
type: string;
|
|
117
|
-
items: {
|
|
118
|
-
type: string;
|
|
119
|
-
properties: {
|
|
120
|
-
name: {
|
|
121
|
-
type: string;
|
|
122
|
-
};
|
|
123
|
-
secretsPassword: {
|
|
124
|
-
type: string;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
testplanFeatures: {
|
|
130
|
-
description: string;
|
|
131
|
-
type: string;
|
|
132
|
-
items: {
|
|
133
|
-
type: string;
|
|
134
|
-
properties: {
|
|
135
|
-
name: {
|
|
136
|
-
type: string;
|
|
137
|
-
};
|
|
138
|
-
type: {
|
|
139
|
-
type: string;
|
|
140
|
-
};
|
|
141
|
-
enabled: {
|
|
142
|
-
type: string;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
emailProperties: {
|
|
148
|
-
description: string;
|
|
149
|
-
type: string;
|
|
150
|
-
properties: {
|
|
151
|
-
sendEmail: {
|
|
152
|
-
description: string;
|
|
153
|
-
type: string;
|
|
154
|
-
};
|
|
155
|
-
primaryRecipients: {
|
|
156
|
-
description: string;
|
|
157
|
-
type: string;
|
|
158
|
-
};
|
|
159
|
-
ccRecipients: {
|
|
160
|
-
description: string;
|
|
161
|
-
type: string;
|
|
162
|
-
};
|
|
163
|
-
bccRecipients: {
|
|
164
|
-
description: string;
|
|
165
|
-
type: string;
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
required: string[];
|
|
169
|
-
};
|
|
170
|
-
testPlan: {
|
|
171
|
-
description: string;
|
|
172
|
-
type: string;
|
|
173
|
-
items: {
|
|
174
|
-
type: string;
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
attachmentProperties: {
|
|
178
|
-
description: string;
|
|
179
|
-
type: string;
|
|
180
|
-
properties: {
|
|
181
|
-
includeAllFailuresInSummary: {
|
|
182
|
-
description: string;
|
|
183
|
-
type: string;
|
|
184
|
-
};
|
|
185
|
-
includeBdd: {
|
|
186
|
-
description: string;
|
|
187
|
-
type: string;
|
|
188
|
-
};
|
|
189
|
-
includeTestCaseShowSummary: {
|
|
190
|
-
description: string;
|
|
191
|
-
type: string;
|
|
192
|
-
};
|
|
193
|
-
includeScreenshotThumbnail: {
|
|
194
|
-
description: string;
|
|
195
|
-
type: string;
|
|
196
|
-
};
|
|
197
|
-
includeBasicLogs: {
|
|
198
|
-
description: string;
|
|
199
|
-
type: string;
|
|
200
|
-
};
|
|
201
|
-
includeDetailLogs: {
|
|
202
|
-
description: string;
|
|
203
|
-
type: string;
|
|
204
|
-
};
|
|
205
|
-
includeTestStepTime: {
|
|
206
|
-
description: string;
|
|
207
|
-
type: string;
|
|
208
|
-
};
|
|
209
|
-
includeFullScreenShot: {
|
|
210
|
-
description: string;
|
|
211
|
-
type: string;
|
|
212
|
-
};
|
|
213
|
-
includeNoScreenshot: {
|
|
214
|
-
description: string;
|
|
215
|
-
type: string;
|
|
216
|
-
};
|
|
217
|
-
includeDiagnosticTrace: {
|
|
218
|
-
description: string;
|
|
219
|
-
type: string;
|
|
220
|
-
};
|
|
221
|
-
includeTestCasePathHierarchy: {
|
|
222
|
-
description: string;
|
|
223
|
-
type: string;
|
|
224
|
-
};
|
|
225
|
-
includeSkipped: {
|
|
226
|
-
description: string;
|
|
227
|
-
type: string;
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
testCase: {
|
|
232
|
-
description: string;
|
|
233
|
-
type: string;
|
|
234
|
-
items: {
|
|
235
|
-
type: string;
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
connectionOverride: {
|
|
239
|
-
description: string;
|
|
240
|
-
type: string;
|
|
241
|
-
items: {
|
|
242
|
-
type: string;
|
|
243
|
-
properties: {
|
|
244
|
-
connection: {
|
|
245
|
-
type: string;
|
|
246
|
-
};
|
|
247
|
-
username: {
|
|
248
|
-
type: string;
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
};
|