Skip to content

Commit

Permalink
ATO-218 Add integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
losterloh committed Jul 14, 2022
1 parent 0c53107 commit 88fe676
Show file tree
Hide file tree
Showing 7 changed files with 417 additions and 0 deletions.
46 changes: 46 additions & 0 deletions data/test_action_extract_slots_11333/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# The config recipe.
# https://rasa.com/docs/rasa/model-configuration/
recipe: default.v1

# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en

pipeline:
# No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# If you'd like to customize it, uncomment and adjust the pipeline.
# See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
constrain_similarities: true
- name: EntitySynonymMapper
# - name: ResponseSelector
# epochs: 100
# constrain_similarities: true
# - name: FallbackClassifier
# threshold: 0.3
# ambiguity_threshold: 0.1

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
# No configuration for policies was provided. The following default policies were used to train your model.
# If you'd like to customize them, uncomment and adjust the policies.
# See https://rasa.com/docs/rasa/policies for more information.
- name: AugmentedMemoizationPolicy
- name: RulePolicy
# - name: UnexpecTEDIntentPolicy
# max_history: 5
# epochs: 100
# - name: TEDPolicy
# max_history: 5
# epochs: 100
# constrain_similarities: true
98 changes: 98 additions & 0 deletions data/test_action_extract_slots_11333/data/nlu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
version: "3.1"

nlu:
- intent: block
examples: |
- block my [checking](account_type) account
- i want to block my [savings](account_type) account
- i need to block an account
- i need to block my [credit](account_type) card
- intent: greet
examples: |
- hey
- hello
- hi
- hello there
- good morning
- good evening
- moin
- hey there
- let's go
- hey dude
- goodmorning
- goodevening
- good afternoon
- intent: goodbye
examples: |
- cu
- good by
- cee you later
- good night
- bye
- goodbye
- have a nice day
- see you around
- bye bye
- see you later
- intent: affirm
examples: |
- yes
- y
- indeed
- of course
- that sounds good
- correct
- intent: deny
examples: |
- no
- n
- never
- I don't think so
- don't like that
- no way
- not really
- intent: mood_great
examples: |
- perfect
- great
- amazing
- feeling like a king
- wonderful
- I am feeling very good
- I am great
- I am amazing
- I am going to save the world
- super stoked
- extremely good
- so so perfect
- so good
- so perfect
- intent: mood_unhappy
examples: |
- my day was horrible
- I am sad
- I don't feel very well
- I am disappointed
- super sad
- I'm so sad
- sad
- very sad
- unhappy
- not good
- not very good
- extremly sad
- so saad
- so sad
- intent: bot_challenge
examples: |
- are you a bot?
- are you a human?
- am I talking to a bot?
- am I talking to a human?
63 changes: 63 additions & 0 deletions data/test_action_extract_slots_11333/data/stories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: "3.1"

stories:

- story: happy path
steps:
- intent: greet
- action: utter_greet
- intent: mood_great
- action: utter_happy

- story: sad path 1
steps:
- intent: greet
- action: utter_greet
- intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- intent: affirm
- action: utter_happy

- story: sad path 2
steps:
- intent: greet
- action: utter_greet
- intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- intent: deny
- action: utter_goodbye

- story: block savings
steps:
- intent: block
entities:
- account_type: savings
- slot_was_set:
- account_type: savings
- action: utter_block_account

- story: block checking
steps:
- intent: block
entities:
- account_type: checking
- slot_was_set:
- account_type: checking
- action: utter_checking

- story: block credit
steps:
- intent: block
entities:
- account_type: credit
- slot_was_set:
- account_type: credit
- action: utter_credit

- story: block checking
steps:
- intent: block
- action: utter_nothing

61 changes: 61 additions & 0 deletions data/test_action_extract_slots_11333/domain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: "3.1"

intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- block

entities:
- account_type

slots:
account_type:
type: categorical
influence_conversation: true
values:
- savings
- checking
- credit
mappings:
- type: from_entity
entity: account_type

responses:
utter_block_account:
- text: "your account has been blocked"

utter_checking:
- text: "checking account"

utter_credit:
- text: "credit account"

utter_nothing:
- text: "no account type was specified"

utter_goodbye:
- text: "Bye"

utter_iamabot:
- text: "I am a bot, powered by Rasa."

utter_greet:
- text: "Hey! How are you?"

utter_cheer_up:
- text: 'Here is something to cheer you up'

utter_did_that_help:
- text: Did that help you?

utter_happy:
- text: Great, carry on!

session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
Empty file.
91 changes: 91 additions & 0 deletions data/test_action_extract_slots_11333/tests/test_stories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#### This file contains tests to evaluate that your bot behaves as expected.
#### If you want to learn more, please see the docs: https://rasa.com/docs/rasa/testing-your-assistant

stories:
- story: happy path 1
steps:
- user: |
hello there!
intent: greet
- action: utter_greet
- user: |
amazing
intent: mood_great
- action: utter_happy

- story: happy path 2
steps:
- user: |
hello there!
intent: greet
- action: utter_greet
- user: |
amazing
intent: mood_great
- action: utter_happy
- user: |
bye-bye!
intent: goodbye
- action: utter_goodbye

- story: sad path 1
steps:
- user: |
hello
intent: greet
- action: utter_greet
- user: |
not good
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
yes
intent: affirm
- action: utter_happy

- story: sad path 2
steps:
- user: |
hello
intent: greet
- action: utter_greet
- user: |
not good
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
not really
intent: deny
- action: utter_goodbye

- story: sad path 3
steps:
- user: |
hi
intent: greet
- action: utter_greet
- user: |
very terrible
intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- user: |
no
intent: deny
- action: utter_goodbye

- story: say goodbye
steps:
- user: |
bye-bye!
intent: goodbye
- action: utter_goodbye

- story: bot challenge
steps:
- user: |
are you a bot?
intent: bot_challenge
- action: utter_iamabot
Loading

0 comments on commit 88fe676

Please sign in to comment.