How to test slots?


I made a custom policy and set some slots there. I want to know how to test those slots. So when I run rasa test, it will tell me whether those slots are set correctly. I tried to add slot_was_set in test_stories.yml, but it wasn’t working for me.


Hi @Jozhou22, What do you mean it was not working for you? Did you mean the tests failed (passed) when you expected it to pass (fail)?

What were the type of the slots you set and was the influence_conversation property set to true?

1 Like

I just realized that I only updated the slot’s value in the tracker but never updated the events, and that’s the reason why slot_was_set is not working. Thanks for your help anyway.

Hi @Jozhou22, what endpoints did you use to update the events and did the tests work after that?