Hi, in the build.gradle
of my Spring Boot project, I’d like to use the project’s resource directory for my integration tests. Here’s an excerpt of my build.gradle
:
plugins {
id 'java'
id 'jvm-test-suite'
id 'org.springframework.boot' version '3.2.1'
id 'io.spring.dependency-management' version '1.1.4'
}
group = 'com.sprite'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
dependencies {
...
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
testing {
suites {
integrationTest(JvmTestSuite) {
// Commented out because it doesn't work
//resources.srcDir file('src/main/resources')
dependencies {
implementation project(':')
}
}
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
tasks.named('check') {
dependsOn(testing.suites.integrationTest)
}
Thanks in advance