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

Disable test task on multiple unit testing strategies #70

Open
lacasseio opened this issue Jan 18, 2022 · 3 comments
Open

Disable test task on multiple unit testing strategies #70

lacasseio opened this issue Jan 18, 2022 · 3 comments
Labels
Milestone

Comments

@lacasseio
Copy link
Member

When developing custom testing strategies, the test task becomes a legacy task from Gradle java plugin. The test suite does not reference that task hence rendering it completely useless. Instead, we should recycle the task into a lifecycle task. To do so, we should remove all its sources so it's treated as a NO-SOURCE task and add a dependency on all of the test suite's test tasks.

@lacasseio lacasseio added this to the 1.6.3 milestone Jan 18, 2022
@lacasseio
Copy link
Member Author

I'm still not set if we would want to introduce lifecycle tasks for all test suites when multiple testing strategies are available. The reason being if the testing strategy composes both OS families and Gradle versions, we may want to have a lifecycle for each Gradle version that selects the current OS. However, if we only have Gradle version as testing strategies, we may want to have a single lifecycle task that executes all test tasks. Yet, however, we would most likely only run a single Gradle version locally and split the Gradle version coverage on CI based on PR, branches, etc.

Because of all those unknown, I feel the lifecycle task should be rolled out by the user based on their own requirements. The test task is special as it's always available and doesn't bring anything once multiple testing strategies are available. We should in fact just remove the task but it's not recommended to do such a thing (as well as some plugins may assume the task exists).

@lacasseio
Copy link
Member Author

Converting the test task into a NO-SOURCE lifecycle task is a sensible default for that specific corner case.

@lacasseio
Copy link
Member Author

We need to be careful here :-)... We have to make sure the test task doesn't end up being reused. For example, if a testing strategy name is an empty string the test task would end up reusing the test task. We also have to be careful that each generated test tasks are distinct. See #76

@lacasseio lacasseio modified the milestones: 1.6.3, 1.6.4, 1.6.5 Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant