browserstack-cypress-cli 1.31.7 → 1.31.9
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/bin/commands/runs.js
CHANGED
|
@@ -326,6 +326,9 @@ module.exports = function run(args, rawArgs) {
|
|
|
326
326
|
}
|
|
327
327
|
let message = `${data.message}! ${Constants.userMessages.BUILD_CREATED} with build id: ${data.build_id}`;
|
|
328
328
|
let dashboardLink = `${Constants.userMessages.VISIT_DASHBOARD} ${data.dashboard_url}`;
|
|
329
|
+
if (turboScaleSession) {
|
|
330
|
+
dashboardLink = `${Constants.userMessages.VISIT_ATS_DASHBOARD} ${data.dashboard_url}`;
|
|
331
|
+
}
|
|
329
332
|
buildReportData = { 'build_id': data.build_id, 'parallels': userSpecifiedParallels, ...buildReportData }
|
|
330
333
|
utils.exportResults(data.build_id, `${config.dashboardUrl}${data.build_id}`);
|
|
331
334
|
if ((utils.isUndefined(bsConfig.run_settings.parallels) && utils.isUndefined(args.parallels)) || (!utils.isUndefined(bsConfig.run_settings.parallels) && bsConfig.run_settings.parallels == Constants.cliMessages.RUN.DEFAULT_PARALLEL_MESSAGE)) {
|
|
@@ -388,6 +391,8 @@ module.exports = function run(args, rawArgs) {
|
|
|
388
391
|
logger.info(Constants.userMessages.BUILD_FAILED_ERROR)
|
|
389
392
|
process.exitCode = Constants.BUILD_FAILED_EXIT_CODE;
|
|
390
393
|
});
|
|
394
|
+
} else {
|
|
395
|
+
utils.handleSyncExit(exitCode, data.dashboard_url);
|
|
391
396
|
}
|
|
392
397
|
});
|
|
393
398
|
} else if (utils.nonEmptyArray(bsConfig.run_settings.downloads && !turboScaleSession)) {
|
|
@@ -35,6 +35,9 @@ const parseAndDownloadArtifacts = async (buildId, data, bsConfig, args, rawArgs,
|
|
|
35
35
|
utils.sendUsageReport(bsConfig, args, warningMessage, Constants.messageTypes.ERROR, 'build_artifacts_not_found', buildReportData, rawArgs);
|
|
36
36
|
} else {
|
|
37
37
|
BUILD_ARTIFACTS_FAIL_COUNT += 1;
|
|
38
|
+
const errorMsg = `Error downloading build artifacts for ${sessionId} with error: ${error}`;
|
|
39
|
+
logger.debug(errorMsg);
|
|
40
|
+
utils.sendUsageReport(bsConfig, args, errorMsg, Constants.messageTypes.ERROR, 'build_artifacts_parse_error', buildReportData, rawArgs);
|
|
38
41
|
}
|
|
39
42
|
// delete malformed zip if present
|
|
40
43
|
let tmpFilePath = path.join(filePath, fileName);
|
|
@@ -102,6 +105,7 @@ const downloadAndUnzip = async (filePath, fileName, url) => {
|
|
|
102
105
|
let tmpFilePath = path.join(filePath, fileName);
|
|
103
106
|
const writer = fs.createWriteStream(tmpFilePath);
|
|
104
107
|
|
|
108
|
+
logger.debug(`Downloading build artifact for: ${filePath}`)
|
|
105
109
|
return new Promise(async (resolve, reject) => {
|
|
106
110
|
request.get(url).on('response', function(response) {
|
|
107
111
|
|
|
@@ -109,7 +113,8 @@ const downloadAndUnzip = async (filePath, fileName, url) => {
|
|
|
109
113
|
if (response.statusCode === 404) {
|
|
110
114
|
reject(Constants.userMessages.DOWNLOAD_BUILD_ARTIFACTS_NOT_FOUND);
|
|
111
115
|
}
|
|
112
|
-
|
|
116
|
+
const errorMsg = `Non 200 status code, got status code: ${response.statusCode}`;
|
|
117
|
+
reject(errorMsg);
|
|
113
118
|
} else {
|
|
114
119
|
//ensure that the user can call `then()` only when the file has
|
|
115
120
|
//been downloaded entirely.
|
package/bin/helpers/constants.js
CHANGED
|
@@ -57,6 +57,7 @@ const userMessages = {
|
|
|
57
57
|
FAILED_MD5_CHECK:
|
|
58
58
|
"Something went wrong - you can retry running browserstack-cypress with ‘--force-upload’ parameter, or contact BrowserStack Support.",
|
|
59
59
|
VISIT_DASHBOARD: "Visit the Automate dashboard for real-time test reporting:",
|
|
60
|
+
VISIT_ATS_DASHBOARD: "Visit the Automate TurboScale dashboard for real-time test reporting:",
|
|
60
61
|
CONFLICTING_INIT_ARGUMENTS:
|
|
61
62
|
"Conflicting arguments given. You can use --path only with a file name, and not with a file path.",
|
|
62
63
|
NO_PARALLELS:
|