Skip to content

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

Merged
merged 4 commits into from
May 28, 2021
Merged

Add warning around spec count #127

merged 4 commits into from
May 28, 2021

Conversation

SagarGaniga
Copy link
Collaborator

@SagarGaniga SagarGaniga commented Mar 16, 2021

Add warning around a number of spec files in the given build for individual parallel.

@@ -148,6 +148,24 @@ exports.setParallels = (bsConfig, args, numOfSpecs) => {
}
};

exports.warnSpecLimit = (bsConfig, args, specFiles) => {
let expectedCharLength = specFiles.join("").length + 175 * specFiles.length;
Copy link
Collaborator

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?

@@ -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'];
Copy link
Collaborator

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.

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
Copy link
Collaborator

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?

suryart
suryart previously approved these changes Mar 16, 2021
@@ -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."

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.

@prateekbstack
Copy link
Collaborator

LGTM

@SagarGaniga SagarGaniga merged commit 0b7dab9 into master May 28, 2021
@SagarGaniga SagarGaniga deleted the spec_limit branch May 28, 2021 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants