How do you test Custom Actions before using them with a bot?

Is there an easy and clever way to test a custom action in an unit_test like approach?

I am not sure how to initalize or persist a dispatcher, tracker or domain instance after training an Agent.

I would appreciate hints and maybe clarification on the basic set-up of rasa-core:)

Cheers, Henry

1 Like

I would just test it as you would any normal class. You can take a look at the train/run script on how to initialise these things etc

1 Like

Hi @akelad.

Can you give a link to the script that you have mentioned here?

I also want to ensure my action classes don’t break due to some intermittent changes hence I want to write unit tests for them.

Hi @akelad, @tonysinghmss,

I am interested in the topic. Could you please let me know how we can Unit Test the custom actions ?

@akelad, you referred to the train/run script but I couldn’t find more information. Would it be possivble to guide me? Thank you.

Best regards, Nizar

Hi @nboussarsar, hi @tonysinghmss,

I think Akela referred to this script among others for different test scenarios. Keep in mind, that those are currently designed for Rasa 2 in which some major changes regarding actions / forms happened.

Kind regards
Julian

1 Like