Auth0 Home Blog Docs

How to write unit tests for rules



I have multiple rules in my tenant and now I want to write unit tests for my rules just like Now the issue is in the docs ( it’s written that we can use module for unit test our rules but I think the explanation is old and it’s not updated because in the sample project ( we need to add webtask token and sandbox url and now we can’t find webtask token in Auth0 dashboard ( and also where can I get this sandbox url? Any help?


Hey there @jah!

You’re right the readme file in the sample repo seems outdated. I’ve submitted an issue so that it can be updated. Using your Auth0 sandbox for creating custom webtasks is a deprecated feature. You can, however, create a free account at and from that page you should be able to follow the instructions for creating your test harness as a webtask there (webtask token + sandbox url).

Let me know if that helps!


Thanks for your response. Can you give the instructions page link on because when I created new account on i was just redirected to the dashboard and I couldn’t find any instructions page there


Sure @jah!

This workshop content will give you a quick tour guide on webtasks and how to use them:

Hope it helps!