# Tests stories with custom actions and forms

**URL:** <https://forum.rasa.com/t/tests-stories-with-custom-actions-and-forms/57195>\
**Category:** Rasa Open Source\
**Tags:** testing\
**Created:** [February 13, 2023, 2:32pm UTC](https://forum.rasa.com/t/tests-stories-with-custom-actions-and-forms/57195 "2023-02-13T14:32:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SinaArdehali](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/sinaardehali/32/21803_2.png) [@SinaArdehali](https://forum.rasa.com/u/SinaArdehali)\
**Post date:** [February 13, 2023, 2:32pm UTC](https://forum.rasa.com/t/tests-stories-with-custom-actions-and-forms/57195/1 "2023-02-13T14:32:38Z")

</div>

Hello, I am trying to make some tests for my stories and custom actions. I don’t understand why rasa always predict either the action\_default\_fallback or the action\_listen. In my project, I use actions instead of utters. But I don’t understand why I fall into action\_default\_fallback and actions\_listen. I have looked in the rasa projects examples, but I do not understand. Could you please show me an example of test structure using forms and actions (instead of utter). I put you an example of my tests. Here is my code:

```auto
stories:

- story: Example of my happy path
  steps:
  - user: |
      Hello
    intent: greet_INTENT
  - action: utter_welcome_message
  - action: action_listen
  - user: |
      I want to eat at restaurant
    intent: inform_restaurant_INTENT
  - action: action_prepare_restaurant
  - slot_was_set:
      - location_SLOT: "New York"
  - action: action_listen

  - action: action_ask_restaurant_form_foodType_SLOT
  - slot_was_set:
      - foodType_number_times_asked_SLOT: 1.0
  - action: action_listen
  - user: |
      I want to eat [chinese food](chineseFood_ENTITY)
    intent: inform_foodType_INTENT

```

---

<div class="post-metadata">

**Author:** ![parisapouya](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@parisapouya](https://forum.rasa.com/u/parisapouya)\
**Post date:** [May 8, 2023, 5:26pm UTC](https://forum.rasa.com/t/tests-stories-with-custom-actions-and-forms/57195/2 "2023-05-08T17:26:25Z")

</div>

Hey Sina! I am working on creating test cases for my stories with custom actions and forms… I found this article that provides tiny examples of test-cases for stories with custom actions and forms (see: [rasa/testing-your-assistant.mdx at main · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/blob/main/docs/docs/testing-your-assistant.mdx)). I am using the same format suggested here (could be old ☹), but still not 100% accurate (my test stories pass the manual test and the convo flows as it should but I am getting action\_fall\_back predicted in the report.) Please take a look into this and let me know if this helps you with figuring out the right format.
