Slackbot
01/08/2024, 8:17 PMVampire
01/08/2024, 10:25 PMtestFixtures is a source set, not a configuration.
So you get the same configurations for it like for other source sets testFixturesImplementation, testFixturesCompileOnly, testFixturesCompileClasspath, .....Vampire
01/08/2024, 10:26 PMVampire
01/08/2024, 10:27 PMCaleb Cushing
01/08/2024, 10:30 PMVampire
01/08/2024, 10:34 PMVampire
01/08/2024, 10:35 PMCaleb Cushing
01/08/2024, 10:56 PMCaleb Cushing
01/09/2024, 5:51 PMCaleb Cushing
01/09/2024, 5:51 PMVampire
01/09/2024, 5:52 PMCaleb Cushing
01/09/2024, 5:53 PMCaleb Cushing
01/09/2024, 5:56 PMCaleb Cushing
01/09/2024, 5:56 PMCaleb Cushing
01/09/2024, 5:59 PMCaleb Cushing
01/09/2024, 6:09 PMintegrationTest that actually works actually isCaleb Cushing
01/09/2024, 6:10 PMVampire
01/09/2024, 6:14 PMthat's the one we were usingYeah, that sample simply pre-dates JVM test suites. And actually, JVM test suites are still incubating. This might be a reason that the sample was not removed or updated. But it is probably at least worth to add a note to the sample header that hints at the new JVM test suites. I'd recommend you open a feature request or pull request for that. 🙂
Caleb Cushing
01/09/2024, 6:15 PMVampire
01/09/2024, 6:15 PMis this complete?Probably
is this really the simplest thing that can workNo
Vampire
01/09/2024, 6:16 PMtesting {
suites {
integrationTest(JvmTestSuite)
}
}Caleb Cushing
01/09/2024, 6:17 PMVampire
01/09/2024, 6:19 PMCaleb Cushing
01/09/2024, 6:23 PM> Task :persons-client:projectHealth
Unused dependencies which should be removed:
intTestImplementation libs.junit.api
testImplementation libs.junit.api
testImplementation libs.junit.params
testing {
suites {
intTest(JvmTestSuite)
e2eTest(JvmTestSuite)
}
}
They were required before and @Test would still need that...Caleb Cushing
01/09/2024, 6:27 PMVampire
01/09/2024, 6:37 PMuseJUnit() for those test suites.Caleb Cushing
01/09/2024, 6:39 PMIf you are switching to test suites, I would also move the dependencies into the test suites dsl, but up to you.why would that be better? also guessing it would simply confuse our devs
Caleb Cushing
01/09/2024, 6:39 PMCaleb Cushing
01/09/2024, 6:40 PMVampire
01/09/2024, 6:41 PMCaleb Cushing
01/09/2024, 6:41 PMtest through a plugin, does it need to be specified further?Caleb Cushing
01/09/2024, 6:41 PMWell, for Kotlin DSL at least it is better as you don't need to use string-y declaration or getting the configuration by name.groovy magic, you don't seem to need a stringy name... idk
Vampire
01/09/2024, 6:42 PMVampire
01/09/2024, 6:43 PMdoes it need to be specified further?What? JUnit Platform? No, with test suites, JUnit Jupiter is configured automatically as test framework for suites you add additionally besides
test.
But then as I said you should indeed also not need the api dependency as that should with that also already be there.Caleb Cushing
01/09/2024, 6:44 PMCaleb Cushing
01/09/2024, 6:44 PMVampire
01/09/2024, 6:45 PMVampire
01/09/2024, 6:46 PMCaleb Cushing
01/09/2024, 6:46 PMVampire
01/09/2024, 6:46 PMcheck to depend on the additional test suites, you have to manually configure that, yes.Caleb Cushing
01/09/2024, 6:46 PMVampire
01/09/2024, 6:47 PMcheckVampire
01/09/2024, 6:47 PMCaleb Cushing
01/09/2024, 6:47 PMVampire
01/09/2024, 6:48 PMCaleb Cushing
01/09/2024, 6:48 PMGradle can run the test tasks in parallel only if you use configuration cachewhich is disabled in the github ci action
Caleb Cushing
01/09/2024, 6:48 PMVampire
01/09/2024, 6:48 PMCaleb Cushing
01/09/2024, 6:48 PMVampire
01/09/2024, 6:48 PMCaleb Cushing
01/09/2024, 6:49 PMVampire
01/09/2024, 6:49 PMCaleb Cushing
01/09/2024, 6:49 PMVampire
01/09/2024, 6:49 PMVampire
01/09/2024, 6:50 PMeffectively not cached because... reasons that are not gradle's fault? although, does gradle have a way to say "don't cache this"?Not getting the question, especially because "cache" is a bit overloaded. What do you mean exactly?
Caleb Cushing
01/09/2024, 6:52 PMCaleb Cushing
01/09/2024, 6:52 PMVampire
01/09/2024, 6:53 PMCaleb Cushing
01/09/2024, 6:56 PMCaleb Cushing
01/09/2024, 6:57 PMCaleb Cushing
01/09/2024, 6:57 PMCaleb Cushing
01/09/2024, 6:57 PMCaleb Cushing
01/09/2024, 6:59 PMCaleb Cushing
01/09/2024, 6:59 PMVampire
01/09/2024, 6:59 PMCaleb Cushing
01/09/2024, 6:59 PMtesting {
suites {
intTest(JvmTestSuite) {
targets {
all {
testTask.configure {
shouldRunAfter(test)
}
}
}
}
e2eTest(JvmTestSuite)
}
}
I think this replicates what we had, doesn't seem significantly shorter 😕Vampire
01/09/2024, 6:59 PMCaleb Cushing
01/09/2024, 6:59 PMCaleb Cushing
01/09/2024, 7:00 PMtesting {
suites {
intTest(JvmTestSuite) {
shouldRunAfter(test)
}
e2eTest(JvmTestSuite)
}
}Caleb Cushing
01/09/2024, 7:00 PMCaleb Cushing
01/09/2024, 7:01 PMCaleb Cushing
01/09/2024, 7:01 PMVampire
01/09/2024, 7:09 PMlike somehow it feels like I should be able to writeWell, yes and no, only in the current state. But in some future you will be able to have multiple test targets each with its own or maybe even multiple test tasks. The DSL is already prepared for that to not need to then again change it right away.
Caleb Cushing
01/09/2024, 8:30 PMCaleb Cushing
01/09/2024, 8:30 PMCaleb Cushing
01/09/2024, 8:30 PMVampire
01/09/2024, 10:07 PMVampire
01/09/2024, 10:08 PMVampire
01/09/2024, 10:08 PMCaleb Cushing
01/10/2024, 1:53 PMCaleb Cushing
01/10/2024, 1:53 PMCaleb Cushing
01/10/2024, 1:54 PMVampire
01/10/2024, 1:57 PMjust start all 3 at the same time!Yeah, as I said, that you get when you use configuration cache and the tasks do not have an ordering constraint like
mustRunAfter or dependsOn, even if configuration cache state is not preserved.Caleb Cushing
01/10/2024, 2:00 PMCaleb Cushing
01/10/2024, 2:00 PM