Hi, I hope this is a simple question, because this seems like something that shouldn't be difficult.
I've got a standard Gradle project with the normal layout:
And I've created a Gradle task for system tests as follows:
And this matches the folders in my project:
And when I import the project into IntelliJ, it seems to figure all of that out ok because when I look at the Module Settings, I see all those folders listed appropriately. For example, in the Modules section on the Sources tab, it lists './src/system-test/resources' and './src/test/resources' as Test Resource Folders. So everything looks good.
Here is my problem. My unit tests read from the test resource folder with no problem. And if I run the system tests from the command line using my Gradle task, it finds the appropriate configuration. However, when I run the system test from IntelliJ, it does not find any of the configuration files located in the system-test/resources folder. If I move the configuration files over to the test/resources folder, it finds them.
This is a problem because the configurations for unit tests and system tests are drastically different. The unit tests are using mocks. The system tests are designed to be more end to end tests and thus wire in the actual implementations instead of mocks. So I'd really like to keep the configurations separate.
I've Googled for any discussion on this I can find. Saw some threads on Eclipse being able to "add resource folder" or something like that to the classpath. I was hoping there was something similar in my favorite ide, IntelliJ. Any clues?