# Unit testing and developing Actions locally

**URL:** <https://community.auth0.com/t/unit-testing-and-developing-actions-locally/134307>\
**Category:** Get Help\
**Tags:** extensibility, actions-extensibility\
**Created:** [May 16, 2024, 7:57pm UTC](https://community.auth0.com/t/unit-testing-and-developing-actions-locally/134307 "2024-05-16T19:57:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pnicholls](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pnicholls/32/54327_2.png) [@pnicholls](https://community.auth0.com/u/pnicholls)\
**Post date:** [May 16, 2024, 7:57pm UTC](https://community.auth0.com/t/unit-testing-and-developing-actions-locally/134307/1 "2024-05-16T19:57:08Z")

</div>

I wanted to share with the community a library we’ve been working on internally to help developers build and test Actions locally, which we’ve just open sourced: [@kilterset/auth0-actions-testing](https://www.npmjs.com/package/@kilterset/auth0-actions-testing).

When writing our own Actions, we wanted to bring our typical development practices with us: test-first development, thorough unit testing, CI/CD support, and so on. There is a [very basic starting point](https://www.npmjs.com/package/@kilterset/auth0-actions-testing) that the official docs suggests as to how you might start testing. We’ve taken that idea and built it into a robust Node.js library that has been helping us.

- **Unit test any Auth0 Action** , with support for all Auth0’s Flows and Triggers.

- **Event mocks** are randomly generated on each test run with realistic values. You can customize the properties that are important to your test while letting irrelevant properties randomly change. This helps flush out bugs caused by unintended assumptions around event data.

- **Support for testing HTTP requests** is included. Quickly and easily mock responses and errors.

- **Extensive** [**examples**](https://github.com/kilterset/auth0-actions-testing/tree/main/examples) are provided, covering many common problems.

- **Type-hinting** for all Auth0 Flows and Triggers (for editors which support this, like VS Code).

- **Run your unit tests in CI/CD pipeline.** Bring your team’s engineering practices to your Actions code. Designed to work well with `a0deploy`.

I hope someone else out there finds this useful. I’d love to know if you’re using it. Feel free to leave feedback via [GitHub issues](https://github.com/kilterset/auth0-actions-testing/issues).

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 16, 2024, 10:24pm UTC](https://community.auth0.com/t/unit-testing-and-developing-actions-locally/134307/3 "2024-05-16T22:24:52Z")

</div>

Hi @pnicholls,

Welcome to the Auth0 Community!

Thanks for sharing your open-sourced `Auth0 Actions Testing` library! 👏 👍

I’m sure other community members will find this incredibly helpful!

Keep us posted if there’s anything we can assist you with.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 30, 2024, 10:25pm UTC](https://community.auth0.com/t/unit-testing-and-developing-actions-locally/134307/4 "2024-05-30T22:25:48Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
