-
Notifications
You must be signed in to change notification settings - Fork 40
Add warning around spec count #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bin/helpers/utils.js
Outdated
@@ -148,6 +148,24 @@ exports.setParallels = (bsConfig, args, numOfSpecs) => { | |||
} | |||
}; | |||
|
|||
exports.warnSpecLimit = (bsConfig, args, specFiles) => { | |||
let expectedCharLength = specFiles.join("").length + 175 * specFiles.length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's 175? Can we name it? Maybe from use it from a constant?
bin/helpers/utils.js
Outdated
@@ -148,6 +148,24 @@ exports.setParallels = (bsConfig, args, numOfSpecs) => { | |||
} | |||
}; | |||
|
|||
exports.warnSpecLimit = (bsConfig, args, specFiles) => { | |||
let expectedCharLength = specFiles.join("").length + 175 * specFiles.length; | |||
let parallels = bsConfig['run_settings']['parallels']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use the .
instead: bsConfig.run_settings.parallels
.
bin/helpers/utils.js
Outdated
let parallels = bsConfig['run_settings']['parallels']; | ||
let combinations = this.getBrowserCombinations(bsConfig).length; | ||
let parallelPerCombination = parallels > combinations ? Math.floor(parallels / combinations) : 1 | ||
let expectedCharLengthPerParallel = expectedCharLength / parallelPerCombination |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semicolon? Also, can we ensure that this is going to be an INT and not float?
bin/helpers/constants.js
Outdated
@@ -40,7 +40,8 @@ const userMessages = { | |||
CYPRESS_VERSION_CHANGED: "Your build will run using Cypress <actualVersion> instead of Cypress <preferredVersion>. Read more about supported versions here: http://browserstack.com/docs/automate/cypress/supported-versions", | |||
LOCAL_START_FAILED: "Local Testing setup failed.", | |||
LOCAL_STOP_FAILED: "Local Binary stop failed.", | |||
INVALID_LOCAL_MODE_WARNING: "Invalid value specified for local_mode. local_mode: (\"always-on\" | \"on-demand\"). For more info, check out https://www.browserstack.com/docs/automate/cypress/cli-reference" | |||
INVALID_LOCAL_MODE_WARNING: "Invalid value specified for local_mode. local_mode: (\"always-on\" | \"on-demand\"). For more info, check out https://www.browserstack.com/docs/automate/cypress/cli-reference", | |||
SPEC_LIMIT_WARNING: "There is a chance that you might not see all the results on the dashboard because of your spec count." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might not see all your results on the dashboard because of high spec count, please consider reducing the number of spec files in this folder.
LGTM |
Add warning around a number of spec files in the given build for individual parallel.