When I try executing the gatling test it doesn’t read the gatling-env1.conf file in src/test. But if I try to create src/main/java/resources/env1/gatling-env1.conf it suddenly works and reads the file. But I want it to read from src/test/resources/env1/gatling-env1.conf not from src/main/…
This subject is not specific to gatling.
You’ll have to make the difference between reading a file (from the working directory) and reading a resource in the classpath.
We advise to do the later: reading a resource in the classpath, as it is the only reliable way of reading data in a project (reading a provided file by configuration is fine, but a project data is usually in a jar, hence in the classpath)