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

Execute target "currents" for both testing types (e2e and component) in the same sorry-cypress run #22

Open
mirobo opened this issue Jul 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mirobo
Copy link

mirobo commented Jul 28, 2023

Description

I have both e2e and component tests inside a NX library and I want to execute both of them inside the same sorry-cypress run.

Having different specs in the same "group" is not allowed, so currently I have to create a second target "currents-ct" which has the group set to i.e. "mylib-ct" to dinstinguish it from the group "mylib-e2e".

Probably I could also solve the issue by not setting any group at all, but I think it can help with an overview of which libraries were tested (basically every library we have is also represented as a group and we run tests with "nx affected")

I would like to be able to set the groups within the nx/currents plugin dynamically based on the project name and the actual testing type. This way I could run both testing types within the same sorry-cypress run using just two commands

nx affected --target=currents --ci-build-id=someId --testingType=e2e
nx affected --target=currents --ci-build-id=someId --testingType=component

And the groups in sorry-cypress would be like:
mylibA-e2e
mylibA-ct
mylibB-e2e
mylibB-ct

There could be a flag in project.json to activate the dynamic group assignment..

One might argue that it's wrong to have e2e tests within a library, but we found it is a good solution to reduce testing times by only executing the affected tests of a specific library (even though there might be a gap, but we're willing to take the risk). The "NX way" doesn't really scale if you have a lot of e2e tests.

Is this a feature you'd like to see in this plugin?

Example usage

see above

@mirobo mirobo added the enhancement New feature or request label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant