Test story for FollowUp Action

I have a custom action that triggers different FollowupAction() based on condition. Below are my stories.yml, test_stories.yml and failed_test_stories.yml files. How do I write test for both followup actions?

stories.yml

version: "2.0"

stories:

- story: first_story
  steps:
  - intent: sample_intent
  - action: my_custom_action
  - action: followup_action_1

- story: second_story
  steps:
  - intent: sample_intent
  - action: my_custom_action
  - action: followup_action_2

test_stories.yml

- story: first_test_story
  steps:
  - intent: sample_intent
  - action: my_custom_action
  - action: followup_action_1

- story: second_test_story
  steps:
  - intent: sample_intent
  - action: my_custom_action
  - action: followup_action_2

failed_test_stories.yml

version: "2.0"
stories:
- story: second_test_story
  steps:
  - intent: sample_intent
  - action: my_custom_action
  - action: followup_action_2  # predicted: followup_action_1

Rasa story testing doesn’t execute forms or actions. I have a blog post on how to do this with Postman and since then I have been using Pytest.

It sounds like your my_custom_action method us calling the follow_up action AND your story shows calling the followup actions? You shouldn’t be doing this in both places. You should consider not calling FollowupAction in your action code and instead setting a featurized slot that the stories/rules can use to specify the followup action.