Skip to content
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

jenkinsClassnamePrefix option #94

Closed
wants to merge 1 commit into from

Conversation

przemuh
Copy link

@przemuh przemuh commented Oct 22, 2019

This option allows to group tests under the package name. For example if jenkinsClassnamePrefix = "cypress.". Then all cypress tests would be placed under the cypress package. The dot (.) will work as a classname separator.

It is very useful for monorepos where user can have multiple test cases/runners etc. Right now, when there is no package everything land in (root) which is not very useful.

Example:

Now (without the prefix option) - all test cases with single classname (without dot) will land under (root)
image

With prefix we can group tests together:
image

This option allows to group tests under the package name. For example if jenkinsClassnamePrefix = "cypress.". Then all cypress tests would be placed under the cypress package. The dot will work as a classname separator.
It is very useful for monorepos where user can have multiple test cases/runners etc. Right now, when there is no package everything land in (root) which is not very useful.
debug('Building jenkins classname for', test);
var parent = test.parent;
var titles = [];
while (parent) {
parent.title && titles.unshift(parent.title);
parent = parent.parent;
}
return titles.join('.');
return options.jenkinsClassnamePrefix + titles.join('.');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to use options.suiteTitleSeparatedBy rather than having to explicitly add it in options.jenkinsClassnamePrefix

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.

2 participants