# Simplest application.conf for test

**URL:** <https://discuss.akka.io/t/simplest-application-conf-for-test/3823>\
**Category:** Actors\
**Created:** [April 1, 2019, 3:57pm UTC](https://discuss.akka.io/t/simplest-application-conf-for-test/3823 "2019-04-01T15:57:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bentito](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/bentito/32/177_2.png) [@bentito](https://discuss.akka.io/u/bentito)\
**Post date:** [April 1, 2019, 3:57pm UTC](https://discuss.akka.io/t/simplest-application-conf-for-test/3823/1 "2019-04-01T15:57:35Z")

</div>

Hi,  
I thought this should work, but I’m still seeing my `src/main/resources/application.conf` load, including clustering and remoting, all of which I do not want for tests:

I put a file /src/test/resources/application.conf with just akka {} (I also tried a variant that had akka {actor {}} and some logging defined. But in all cases, the remoting and other info from my `main/resources/application.conf` was used.

How can I achieve overriding of the clustering and remoting that happens in my src application.conf for tests? I really can’t tell from the Akka testing documentation I’ve found available.

Thanks,  
Brett

---

<div class="post-metadata">

**Author:** ![scotartt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/scotartt/32/1485_2.png) [@scotartt](https://discuss.akka.io/u/scotartt)\
**Post date:** [April 7, 2019, 9:27am UTC](https://discuss.akka.io/t/simplest-application-conf-for-test/3823/2 "2019-04-07T09:27:12Z")

</div>

This is something I’ve been wondering about as well. For the moment, I’ve just got my test/resources/application.conf because I’m still writing and testing my basic design, but I’ve been unable to isolate it from the main configuration, and will need to in the near future. Did you discover a way to do this?

---

<div class="post-metadata">

**Author:** ![bentito](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/bentito/32/177_2.png) [@bentito](https://discuss.akka.io/u/bentito)\
**Post date:** [April 7, 2019, 11:55am UTC](https://discuss.akka.io/t/simplest-application-conf-for-test/3823/3 "2019-04-07T11:55:11Z")

</div>

I have not found a way and I hope someone knows how to do this. Currently I don’t know how to achieve isolation so that I can have an entirely simple and unit testable actor system for test.

In my case I particularly can’t allow the production conf with remoting to. come up at test time, it’s bad for all sorts of reasons.

---

<div class="post-metadata">

**Author:** ![scotartt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/scotartt/32/1485_2.png) [@scotartt](https://discuss.akka.io/u/scotartt)\
**Post date:** [April 7, 2019, 1:40pm UTC](https://discuss.akka.io/t/simplest-application-conf-for-test/3823/4 "2019-04-07T13:40:54Z")

</div>

Yeah, I agree. In production we will have a cluster, with sharding, discovery, and a persistence store, and all sorts of attached services, which in test, we do not want. E.g. persistence store in-memory, a cluster of one instance, and so on.

It’s not clear to me (yet) how to isolate the unit tests from reading the `src/main/resources/application.conf`

---

<div class="post-metadata">

**Author:** ![leluko](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@leluko](https://discuss.akka.io/u/leluko)\
**Post date:** [November 5, 2020, 2:51am UTC](https://discuss.akka.io/t/simplest-application-conf-for-test/3823/5 "2020-11-05T02:51:54Z")

</div>

src/test/resources/application-test.conf  
should be picked up according to akka docs.

my problem is how to bypass sharding code in test, create slimmed-down local tree of Actors
