# Testing Triggers: \`testRule\` : Auto-build ACS instead of manually building it?

**URL:** <https://forum.canton.network/t/testing-triggers-testrule-auto-build-acs-instead-of-manually-building-it/4648>\
**Category:** App Development\
**Created:** [May 31, 2022, 4:55pm UTC](https://forum.canton.network/t/testing-triggers-testrule-auto-build-acs-instead-of-manually-building-it/4648 "2022-05-31T16:55:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenOTT](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephenott/32/3953_2.png) [@StephenOTT](https://forum.canton.network/u/StephenOTT)\
**Post date:** [May 31, 2022, 4:55pm UTC](https://forum.canton.network/t/testing-triggers-testrule-auto-build-acs-instead-of-manually-building-it/4648/1 "2022-05-31T16:55:34Z")

</div>

From the examples to test a trigger, you use the `testRule` function. This function takes a ACSBuilder which is manually built from the objects provided. is there a function / way to auto-build the acs based on previous actions take in a test?

In a test, if i ran:

```haskell
objA <- submit alice do
        createCmd Object1 with
            user1 = alice

objB <- submit alice do
        createCmd Object1 with
            user1 = alice

objC <- submit alice do
        createCmd Object1 with
            user1 = alice

```

It would generate 3 contracts in the ACS / ledger / test context. I could then run the testRule and say “use the current ACS from this test context”.

Is this possible?

---

<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:** [May 31, 2022, 5:21pm UTC](https://forum.canton.network/t/testing-triggers-testrule-auto-build-acs-instead-of-manually-building-it/4648/2 "2022-05-31T17:21:12Z")

</div>

Currently this is not possible. There is an [open feature request](https://github.com/digital-asset/daml/issues/11269) for this though.

---

<div class="post-metadata">

**Author:** ![StephenOTT](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephenott/32/3953_2.png) [@StephenOTT](https://forum.canton.network/u/StephenOTT)\
**Post date:** [May 31, 2022, 5:58pm UTC](https://forum.canton.network/t/testing-triggers-testrule-auto-build-acs-instead-of-manually-building-it/4648/3 "2022-05-31T17:58:17Z")

</div>

Thanks
