In my gradle - based project, I have the following target for the integration tests:
task integrationTests(type: Test, group: "Test") {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
mustRunAfter test
useJUnit {
maxParallelForks 2
}
systemProperty 'application.name', 'applicationName'
}
It runs beautifully from command line, however in IntelliJ it fais with the error: Application startup failed MDC:[requestId=, userGuid=] java.lang.IllegalStateException: required key [application.name] not found
I have seen this thread : Set java system properties in IntelliJ or Eclipse and do understand how to set system property or even default property for a (test) task.
But is there a way to get IJ "understand" gradle configuration or somehow else make it use the systemProperty
?