Problem context: we need to run the same test k "s...
# community-support
c
Problem context: we need to run the same test k "suite" twice but with different parameters. There is not currently a jvm test suite Thought/ question. How could I take the existing test suite and use the created source set from that for the new jvm test suite instead of the one it would create on its own? If this is not the right way to solve this problem that's great I'd love an answer for both 🤣 😞 this code is groovy which is probably why I don't know how to do it.
v
I guess the proper way would be to add a second
target
to the test suite. Now if they would just support this already. 😄 In the meantime, you probably just create a separate test task and configure it like the one that is configured for the test suite, or even wire that task's properties to the new one where things should be the same.
c
There is no test suite currently...
There is only an unfortunate task that is all wired up manually like we're writing Gradle ... 4
Or five? All I can say is that we're applying a plug-in using a relative path and it's a pain in the ass
On my medium list of things to do is complain loudly about that and get that stuff moved into build source
Because someone thinks it's a good freaking idea to have plugins like this that aren't published and instead meant to be manually consumed like their build source plugins but apply updates using a script..?
Anyways that's a rant... So given that there is no jvm test suite you're just suggesting creating another task? With the same source directory? Or should I create a jvm test suite with the same source directory?
v
There is no test suite currently...
There is. Maybe none you declare explicitly, but
test
is also a test suite under the hood.
There is only an unfortunate task that is all wired up manually
Oh, so you are not using the
test
task? But anyway, I still think best is to add another task that is configured alike. Then you can also run both in one execution and it can stay up-to-date if the other runs.
1
c
Oh, you're right I guess we are using the test task
Wouldn't you just configure a jvm test suite then for the new one? The other one is kind of hidden behind this insane plug-in
And have that new JVM test suite configured in the same way otherwise
v
If you create a new test suite, you get all the things around automatically like source set and do on. If you don't mind those, you can of course also create a second suite and then adapt its configuration. But as you said you want to run the same tests just with different parameters I would have said an additional target or as long as it is not possible an additional task should be sufficient. 🤷‍♂️
c
Gotcha