# How gatling.conf get loaded when replacing it with an application.conf file

**URL:** <https://community.gatling.io/t/how-gatling-conf-get-loaded-when-replacing-it-with-an-application-conf-file/631>\
**Category:** Gatling (Open-Source)\
**Created:** [October 23, 2013, 9:29pm UTC](https://community.gatling.io/t/how-gatling-conf-get-loaded-when-replacing-it-with-an-application-conf-file/631 "2013-10-23T21:29:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Assane\_Diop](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Assane\_Diop](https://community.gatling.io/u/Assane_Diop)\
**Post date:** [October 23, 2013, 9:29pm UTC](https://community.gatling.io/t/how-gatling-conf-get-loaded-when-replacing-it-with-an-application-conf-file/631/1 "2013-10-23T21:29:44Z")

</div>

I am running gatling 1.5 in intelliJ 12.1.6  
I replace gatling.conf with an application.conf file so that I could externalize some environment variable for my tests.  
so I now have the following IDEPathHelper.scala:  
import scala.tools.nsc.io.File  
import scala.tools.nsc.io.Path.string2path

object IDEPathHelper {

val gatlingConfUrl = getClass.getClassLoader.getResource(“application.conf”).getPath  
val projectRootDir = File(gatlingConfUrl).parents(2)

val mavenSourcesDirectory = projectRootDir / “src” / “test” / “scala”  
val mavenResourcesDirectory = projectRootDir / “src” / “test” / “resources”  
val mavenTargetDirectory = projectRootDir / “target”  
val mavenBinariesDirectory = mavenTargetDirectory / “test-classes”

val dataDirectory = mavenResourcesDirectory / “data”  
val requestBodiesDirectory = mavenResourcesDirectory / “request-bodies”

val recorderOutputDirectory = mavenSourcesDirectory  
val resultsDirectory = mavenTargetDirectory / “results”  
}

I want to change some gatling configuration value like using Apache instead of Netty and also change the number of retry value.  
How do I get gatling.conf loaded? How are the default value run? Can I merge the 2 config file?

Note: I tried merging the 2 files but it didn’t work!!

Any help is much appreciated

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [October 23, 2013, 9:56pm UTC](https://community.gatling.io/t/how-gatling-conf-get-loaded-when-replacing-it-with-an-application-conf-file/631/2 "2013-10-23T21:56:44Z")

</div>

> I am running gatling 1.5 in intelliJ 12.1.6  
> I replace gatling.conf with an application.conf file so that I could  
> externalize some environment variable for my tests.

I don't get you here. Could you explain, please?

> so I now have the following IDEPathHelper.scala:  
> import scala.tools.nsc.io.File  
> import scala.tools.nsc.io.Path.string2path
> 
> object IDEPathHelper {
> 
> &nbsp;&nbsp;&nbsp;&nbsp;val gatlingConfUrl =  
> getClass.getClassLoader.getResource("application.conf").getPath  
> &nbsp;&nbsp;&nbsp;&nbsp;val projectRootDir = File(gatlingConfUrl).parents(2)
> 
> &nbsp;&nbsp;&nbsp;&nbsp;val mavenSourcesDirectory = projectRootDir / "src" / "test" / "scala"  
> &nbsp;&nbsp;&nbsp;&nbsp;val mavenResourcesDirectory = projectRootDir / "src" / "test" /  
> "resources"  
> &nbsp;&nbsp;&nbsp;&nbsp;val mavenTargetDirectory = projectRootDir / "target"  
> &nbsp;&nbsp;&nbsp;&nbsp;val mavenBinariesDirectory = mavenTargetDirectory / "test-classes"
> 
> &nbsp;&nbsp;&nbsp;&nbsp;val dataDirectory = mavenResourcesDirectory / "data"  
> &nbsp;&nbsp;&nbsp;&nbsp;val requestBodiesDirectory = mavenResourcesDirectory / "request-bodies"
> 
> &nbsp;&nbsp;&nbsp;&nbsp;val recorderOutputDirectory = mavenSourcesDirectory  
> &nbsp;&nbsp;&nbsp;&nbsp;val resultsDirectory = mavenTargetDirectory / "results"  
> }
> 
> I want to change some gatling configuration value like using Apache  
> instead of Netty

You'll be on your own then, we've never tested Gatling with HttpComponent  
3, and its support in async-http-client 2 is dropped.  
HttpComponent 3 is old stuff anyway and can't compete with HttpComponent 4,  
which is not supported at all.
