# Elegant way to create separate DARs for building and testing?

**URL:** <https://forum.canton.network/t/elegant-way-to-create-separate-dars-for-building-and-testing/258>\
**Category:** App Development\
**Tags:** build, test-script\
**Created:** [April 26, 2020, 6:49pm UTC](https://forum.canton.network/t/elegant-way-to-create-separate-dars-for-building-and-testing/258 "2020-04-26T18:49:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Kapolnai](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/richard_kapolnai/32/89_2.png) [@Richard\_Kapolnai](https://forum.canton.network/u/Richard_Kapolnai)\
**Post date:** [April 26, 2020, 6:49pm UTC](https://forum.canton.network/t/elegant-way-to-create-separate-dars-for-building-and-testing/258/1 "2020-04-26T18:49:37Z")

</div>

We have a test scenario/script where we a simple template, which we don’t want to load when the DAR is loaded on the ledger.  
What is the recommended way to have a `business.dar` to contain only business templates and to build a separate `test.dar` to run the tests? Maybe using `business.dar` as a module in the `test.dar`? Or simply build them slightly differently to exclude/include test dir?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [April 26, 2020, 6:58pm UTC](https://forum.canton.network/t/elegant-way-to-create-separate-dars-for-building-and-testing/258/2 "2020-04-26T18:58:21Z")

</div>

The most robust and cleanest solution is to have two projects, one for your actual code and then a separate project for your tests that depends on the DAR of the main project via `dependencies`.  
However, that can be a bit inconvenient for testing so there are some ways around that by making use of the `source` field. I’ve described that approach in [How to build dars but not include scenarios?](https://discuss.daml.com/t/how-to-build-dars-but-not-include-scenarios/121/2).
