Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved tests #6

Merged
merged 23 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7345cc9
fixed disambiguation and negation tests
twerkmeister Feb 1, 2024
2b8d8f3
fixed utterance name
twerkmeister Feb 1, 2024
e45f65b
test fixes
twerkmeister Feb 4, 2024
33d8da2
removed cancel confirmation for non transfer money flow
twerkmeister Feb 4, 2024
17d09a0
removed second time string from test
twerkmeister Feb 4, 2024
1b91278
reinstated misunderstood test
twerkmeister Feb 5, 2024
78c8891
moved back two tests to passing where they originally where
twerkmeister Feb 12, 2024
e3ff5ba
using intentless instead of enterprise search for testability
twerkmeister Feb 14, 2024
5eba7a4
reinstated removed test
twerkmeister Feb 14, 2024
78cca6d
Merge branch 'main' into ENG-766-test-fixes-multi-prompting-spike
twerkmeister Feb 16, 2024
ca3319a
readded slot sets for restaurant time and date but without specified …
twerkmeister Feb 16, 2024
5a880f5
added checks for setting to none
twerkmeister Feb 16, 2024
5374401
moved knowledge tests to passing bc using intentless makes them possible
twerkmeister Feb 16, 2024
7b004db
added duckling url secret to env
twerkmeister Feb 16, 2024
a94feba
moved slot sets to the right user message
twerkmeister Feb 19, 2024
76eb79a
setting temp and top p explicitly
twerkmeister Feb 19, 2024
dd4b16c
Merge branch 'main' into ENG-766-test-fixes-multi-prompting-spike
twerkmeister Mar 4, 2024
1244eff
added flaky test category, ci step, and PR template
twerkmeister Mar 5, 2024
4524b4c
moved another test to flaky
twerkmeister Mar 5, 2024
bceb133
passing step for flaky tests
twerkmeister Mar 5, 2024
3c8c38e
moved tests that are actually passing out of failing category
twerkmeister Mar 6, 2024
a830b45
moved test to flaky
twerkmeister Mar 6, 2024
d64266b
Update .github/pull_request_template.md
twerkmeister Mar 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Description

## TODOs
[ ] compared flaky tests with the [known list of flaky tests steps](https://www.notion.so/rasa/Flaky-E2E-Test-Steps-63864d3d8c7b4427a0f3df8052e39f21)
16 changes: 14 additions & 2 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}}
RASA_PRO_LICENSE: ${{secrets.RASA_PRO_LICENSE}}
RASA_PRO_BETA_INTENTLESS: true
DUCKLING_URL: ${{secrets.DUCKLING_URL}}
RASA_DUCKLING_HTTP_URL: ${{secrets.DUCKLING_URL}}
run: |
make train

Expand Down Expand Up @@ -160,16 +160,28 @@ jobs:
env:
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}}
RASA_PRO_LICENSE: ${{secrets.RASA_PRO_LICENSE}}
RASA_DUCKLING_HTTP_URL: ${{secrets.DUCKLING_URL}}
RASA_PRO_BETA_INTENTLESS: true
run: |
make actions &
make test-passing

- name: Run e2e flaky tests
env:
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}}
RASA_PRO_LICENSE: ${{secrets.RASA_PRO_LICENSE}}
RASA_DUCKLING_HTTP_URL: ${{secrets.DUCKLING_URL}}
RASA_PRO_BETA_INTENTLESS: true
run: |
make actions &
make test-flaky || true

- name: Run e2e failing tests
env:
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}}
RASA_PRO_LICENSE: ${{secrets.RASA_PRO_LICENSE}}
RASA_DUCKLING_HTTP_URL: ${{secrets.DUCKLING_URL}}
RASA_PRO_BETA_INTENTLESS: true
run: |
make actions &
make test-failing | grep '0 passed'
make test-failing | grep '0 passed'
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ actions:
test-passing: .EXPORT_ALL_VARIABLES
poetry run rasa test e2e e2e_tests/passing

test-flaky: .EXPORT_ALL_VARIABLES
poetry run rasa test e2e e2e_tests/flaky

test-failing: .EXPORT_ALL_VARIABLES
poetry run rasa test e2e e2e_tests/failing

Expand Down
2 changes: 2 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ pipeline:
llm:
model_name: gpt-4
request_timeout: 7
temperature: 0.0
top_p: 0.0

policies:
- name: rasa.core.policies.flow_policy.FlowPolicy
Expand Down
6 changes: 6 additions & 0 deletions data/flows/add_card.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
flows:
add_card:
description: add a card to your account
name: add a card
steps:
- action: utter_card_added
6 changes: 4 additions & 2 deletions data/flows/patterns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ flows:
steps:
- action: action_trigger_chitchat

# using chitchat here so that intentless is used for better testability
tabergma marked this conversation as resolved.
Show resolved Hide resolved
pattern_search:
description: handle knowledge-based requests using enterprise search
steps:
- action: action_trigger_search

- action: action_trigger_chitchat
#- action: action_trigger_search

pattern_cancel_flow:
description: A meta flow that's started when a flow is cancelled.
steps:
Expand Down
5 changes: 5 additions & 0 deletions domain/add_card.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "3.1"

responses:
utter_card_added:
- text: "Okay, added another card."
7 changes: 3 additions & 4 deletions domain/patterns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ responses:
title: Yes
- payload: no
title: No, please keep the previous information
metadata:
metadata:
rephrase: True
template: jinja

utter_not_corrected_previous_input:
- text: "Ok, I did not correct the previous input."
metadata:
metadata:
rephrase: True

Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ test_cases:
- utter: utter_ask_transfer_money_amount_of_money
- user: "100"
- utter: utter_ask_transfer_money_final_confirmation
- user: Yes
- user: "Yes"
- utter: utter_transfer_complete
9 changes: 9 additions & 0 deletions e2e_tests/flaky/happy_path/user_sets_up_recurrent_payment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
test_cases:
- test_case: user wants to set up a new recurrent payment, but specifies the type incompletely, example 3
steps:
- user: I want to set up a new recurrent payment
- utter: utter_ask_recurrent_payment_type
- user: stand order
- slot_was_set:
- recurrent_payment_type: "standing order"
- utter: utter_ask_recipient
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
test_cases:
- test_case: user wants to set up a new one off payment and starts a different flow
steps:
- user: I want to set up a new recurrent payment
- utter: utter_ask_recurrent_payment_type
- user: international transfer
- utter: utter_categorical_slot_rejection
- utter: utter_ask_recurrent_payment_type
- user: none of these, actually just need a one off payment
- utter: utter_ask_transfer_money_recipient

- test_case: user wants to set up an invalid payment type and the assistant re-asks in a loop until a valid value is given
steps:
- user: I want to set up a new recurrent payment
- utter: utter_ask_recurrent_payment_type
- user: international transfer
- utter: utter_categorical_slot_rejection
- utter: utter_ask_recurrent_payment_type
- user: international transfer
- utter: utter_categorical_slot_rejection
- utter: utter_ask_recurrent_payment_type
- user: international transfer
- utter: utter_categorical_slot_rejection
- utter: utter_ask_recurrent_payment_type
- user: direct debit
- slot_was_set:
- recurrent_payment_type: "direct debit"
- utter: utter_ask_recipient
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ test_cases:

- user: okay 50
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ test_cases:
- utter: utter_ask_book_restaurant_number_of_people
- user: Actually I cancel that please.
- utter: utter_can_do_something_else

2 changes: 1 addition & 1 deletion e2e_tests/passing/chitchat/user_says_goodbye.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ test_cases:
steps:
- user: I want to send 10 bucks to Spencer
- utter: utter_ask_transfer_money_final_confirmation
- user: Yes
- user: "Yes"
- utter: utter_transfer_complete
- utter: utter_can_do_something_else
- user: Bye then
Expand Down
5 changes: 2 additions & 3 deletions e2e_tests/passing/corrections/user_cancels_correction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ test_cases:
- user: send John 50
- slot_was_set:
- transfer_money_amount_of_money: "50"
- slot_was_set:
- transfer_money_recipient: "John"
- utter: utter_ask_transfer_money_final_confirmation
- user: "Ah wait I think I actually owe him 60"
- utter: utter_ask_confirm_slot_correction
- user: No
- user: "No"
- utter: utter_not_corrected_previous_input
- utter: utter_ask_transfer_money_final_confirmation
- user: Yes
- user: "Yes"
- bot: Successfully transferred 50 to John.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ test_cases:
- utter: utter_ask_verify_account_email
- user: It's [email protected]
- utter: utter_ask_based_in_california
- user: yes
- user: "yes"
- utter: utter_ask_verify_account_sufficient_california_income
- user: yes
- user: "yes"
- utter: utter_ask_verify_account_confirmation
- user: Actually my income is not that high
- utter: utter_ask_verify_account_sufficient_california_income
- user: no
- user: "no"
- utter: utter_ca_income_insufficient
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ test_cases:
- utter: utter_ask_verify_account_email
- user: It's [email protected]
- utter: utter_ask_based_in_california
- user: yes
- user: "yes"
- utter: utter_ask_verify_account_sufficient_california_income
- user: Oh, actually I am not based in California
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- slot_was_set:
- based_in_california
- utter: utter_corrected_previous_input
- utter: utter_ask_verify_account_confirmation
- user: yes
- user: "yes"
- utter: utter_verify_account_success
4 changes: 2 additions & 2 deletions e2e_tests/passing/corrections/user_corrects_a_number_slot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ test_cases:
- utter: utter_ask_book_restaurant_date
- user: Ah wait, make that 5 people, Barbara is also coming
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- utter: utter_corrected_previous_input
- utter: utter_ask_book_restaurant_date
- user: Is 8 pm tomorrow night still possible?
- utter: utter_restaurant_available
- utter: utter_ask_book_restaurant_reservation_name
- user: for Jamie
- utter: utter_ask_book_restaurant_confirmation
- user: yes
- user: "yes"
- utter: utter_confirm_restaurant_booking
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ test_cases:
- utter: utter_ask_transfer_money_final_confirmation
- user: "Ah, scratch that, I meant 110$"
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- slot_was_set:
- transfer_money_amount_of_money: "110"
- utter: utter_corrected_previous_input
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ test_cases:
- utter: utter_ask_transfer_money_final_confirmation
- user: "Ah, not 50, I meant 55"
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- slot_was_set:
- transfer_money_amount_of_money: "55"
- utter: utter_corrected_previous_input
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ test_cases:
- utter: utter_ask_transfer_money_amount_of_money
- user: Sorry, I meant to say Jimmy, not John
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- slot_was_set:
- transfer_money_recipient: "Jimmy"
- utter: utter_corrected_previous_input
- utter: utter_ask_transfer_money_amount_of_money
- user: "50$"
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test_cases:
- utter: utter_ask_transfer_money_amount_of_money
- user: Sorry, I meant to say Joe
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- slot_was_set:
- transfer_money_recipient: "Joe"
- utter: utter_corrected_previous_input
Expand All @@ -18,5 +18,5 @@ test_cases:
- slot_was_set:
- transfer_money_amount_of_money: "50"
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ test_cases:
- utter: utter_ask_transfer_money_final_confirmation
- user: "Oh wait, I want to send it to James!"
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- slot_was_set:
- transfer_money_recipient: "James"
- utter: utter_corrected_previous_input
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test_cases:
- utter: utter_ask_add_contact_confirmation
- user: "Ah, please use Spidey as the name"
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- utter: utter_corrected_previous_input
- utter: utter_ask_add_contact_confirmation
- user: yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test_cases:
- utter: utter_ask_confirm_slot_correction
- user: damn, should be Alex
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- slot_was_set:
- transfer_money_recipient: "Alex"
- utter: utter_corrected_previous_input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ test_cases:
- utter: utter_ask_transfer_money_final_confirmation
- user: I want to change the recipient
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- utter: utter_corrected_previous_input
- utter: utter_ask_transfer_money_recipient
- user: Eliza
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
4 changes: 2 additions & 2 deletions e2e_tests/passing/corrections/user_resets_a_slot_by_value.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ test_cases:
- utter: utter_ask_transfer_money_amount_of_money
- user: Sorry, I didn't mean John
- utter: utter_ask_confirm_slot_correction
- user: yes
- user: "yes"
- utter: utter_corrected_previous_input
- utter: utter_ask_transfer_money_recipient
- user: to Joe
- utter: utter_ask_transfer_money_amount_of_money
- user: "50"
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
2 changes: 1 addition & 1 deletion e2e_tests/passing/digressions/intermittent_flow_switch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ test_cases:
- utter: utter_ask_book_restaurant_reservation_name
- user: for Thomas
- utter: utter_ask_book_restaurant_confirmation
- user: yes
- user: "yes"
- utter: utter_confirm_restaurant_booking
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test_cases:
- utter: utter_ask_verify_account_email
- user: It's [email protected]
- utter: utter_ask_based_in_california
- user: Yes
- user: "Yes"
- utter: utter_ask_verify_account_sufficient_california_income
- user: Why is that your business?
- utter: utter_california_compliance
Expand Down
4 changes: 2 additions & 2 deletions e2e_tests/passing/digressions/validation_too_little_money.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
test_cases:
- test_case: user makes an intermitten flow switch
- test_case: validation too little money
steps:
- user: I want to send 5000$ to Martin
- utter: utter_transfer_money_insufficient_funds
- utter: utter_ask_transfer_money_amount_of_money
- user: Oh, I thought I had more, then do 3000$ for now
- utter: utter_ask_transfer_money_final_confirmation
- user: yes
- user: "yes"
- utter: utter_transfer_complete
Loading
Loading