Kris Gesling
170ebc44ec
Merge pull request #2951 from forslund/feature/then-wait-with-event-handler
...
Use event handler to capture messages in then_wait()
2021-08-05 15:40:04 +09:30
Kris Gesling
e40530a8ac
Merge pull request #2948 from forslund/bugfix/vk-message-race
...
Fix Possible vk message race
2021-08-05 15:39:12 +09:30
Kris Gesling
313f4e8759
Merge pull request #2946 from MycroftAI/refactor/vk-test-helpers
...
Improve the speed of waiting for dialogs helper function
2021-08-05 09:29:17 +09:30
Åke Forslund
b40fcf0e93
Update VK then step for checking messagetype
...
Simplify the function and use the standard then_wait() for the heavy lifting,
this makes it utilize the new event driven functionality.
2021-07-23 09:46:07 +02:00
Åke Forslund
171d3840f3
Remove sleeps from end of scenarios and features
2021-07-23 09:45:44 +02:00
Åke Forslund
578a3ec439
Use event to capture messages in then_wait()
...
Instead of busily polling the bus for new messages an event handler is
registered (and teared down after check is complete)
2021-07-23 09:45:44 +02:00
Åke Forslund
cbd17a8dc3
Remove mycroft-stock from install list
2021-07-22 17:20:04 +02:00
Chris Veilleux
8f41d176d0
remove print statement used for testing
2021-07-09 16:39:49 -05:00
Chris Veilleux
6fd97b4e85
fixed PEP8 issue
2021-07-09 15:45:07 -05:00
Åke Forslund
4b66fb1dd1
Add docstrings to InterceptAllBusClient
2021-07-09 17:06:33 +02:00
Åke Forslund
cf355360ad
Fix message race when using clear_messages()
...
This handles a scenario that a message arrives between a call to get_messages() and clear_messages(). clear_messages() will only clear the messages that has been evaluated atleast once.
A new method clear_all_messages() has been added to clear the entire message stack and is used between scenarios to reset the list.
2021-07-09 17:06:30 +02:00
Chris Veilleux
105a5b4be4
Improve the speed of waiting for dialogs by exiting the loop after a match is spoken. Also provide error handling for when a match is not found.
2021-07-06 14:26:23 -05:00
Chris Veilleux
18cb28088d
Added comments to document race condition
2021-07-06 13:48:52 -05:00
Chris Veilleux
3959267726
Reordered wait_while_speaking and sleep to fix a race condition that was occurring with the converse logic in MycroftSkill.get_response()
2021-07-01 22:31:22 -05:00
Kris Gesling
8a3cb6eb88
Merge pull request #2741 from MycroftAI/bugfix/revert-vk-sleep
...
revert a temporary bugfix from PR #2626
2021-06-08 06:46:34 +09:30
Kris Gesling
e75a05557b
docstring cleanup
2021-05-11 15:10:32 +09:30
Kris Gesling
89555380d8
Add VK method to wait for audio service
2021-01-18 11:16:41 +09:30
Åke Forslund
83ed811dba
Add check to make sure speak message has metadata
...
This can occur if a custom made speak message is injected and VK should
handle malformed speak messages.
2021-01-10 21:03:25 +01:00
Åke Forslund
35fd035337
Add timeout waiting for config change
2021-01-10 21:02:54 +01:00
Åke Forslund
dfe909aa2e
Add a log for when config is patched
...
Since we have a reset log a matching info message for when updating the
config should be shown
2020-10-29 08:05:32 +01:00
Åke Forslund
3de34003cf
Use custom cleanup to reset patched config
...
original_config will now only live in the scenario part of the context
being automatically cleared at the end of each scenario. To reset the
patch a custom cleanup is added when the patch is performed.
2020-10-29 08:05:28 +01:00
Kris Gesling
e0c7016b4d
revert a temporary bugfix from PR #2626
2020-10-28 16:30:10 +09:30
Åke Forslund
9b4e47567e
Add context parameter to wait_for_dialog
...
This allows wait for dialog to respect the timeout set for the current
scenario.
2020-08-16 23:34:29 +02:00
Åke Forslund
03002bcf47
Add "given a timeout of X seconds"
...
The new given sets the timeout of the steps in a scenario. The timeout is reset after each scenario.
2020-08-16 23:16:51 +02:00
Kris Gesling
d4abc37861
sleep prior to tests to assist in bug diagnosis
2020-07-17 15:53:59 +09:30
Kris Gesling
247c6d30a3
add test - specific skill should not reply
2020-06-18 22:33:22 +09:30
Åke Forslund
e08f630bea
Minor header fixes in voight_kampff
...
- Copyright year
- typo
2020-05-18 14:48:19 +02:00
Åke Forslund
46c8a6b51f
Add Voight Kampff support setting configurations
...
Adds the "Given the user's {config} is {value}" step implementation
This will patch the configuration with a section from a dictionary that
can either be a global (shipped in
mycroft/res/{lang}/configurations.json) or shipped with the test
definition. The file should be named the same as the feature file but
instead of ".feature" the extension should be ".config.json".
mycroft/res/text/en-us/configurations.json contains a couple of
pre-defined configurations that can be applied
- units (metric/imperial)
- location (Stockholm)
After each scenario any applied patch will be cleared
2020-05-18 14:48:14 +02:00
Kris Gesling
1a96f04020
Add single Voight Kampff module interface
...
Takes in arguments for both test_setup.py and behave test runner. Parses
any args for test_setup and passes any remaining arguments to behave.
This moves argparsing out of the test_setup main() allowing the helper commands
to pass in pre-parsed arguments rather than adding logic inside main to
differentiate between a list and a preparsed arument object
2020-03-25 07:40:01 +01:00
Åke Forslund
9fe158d841
Prepare for multi-lang support
2020-03-24 10:42:07 +01:00
Åke Forslund
00c83c5139
Add repo and branch selection for test_setup.py
...
--url can be added to specify the repo url
--branch can be added to specify a specific branch
2020-03-24 10:42:07 +01:00
Åke Forslund
c33f9ee875
Restructure test_setup.py according to review
2020-03-24 10:42:07 +01:00
Åke Forslund
f8c6107ea5
Update readme with some new steps
2020-03-24 10:42:07 +01:00
Åke Forslund
8e7e19ecc2
Add help text to test_setup.py parameters
2020-03-24 10:42:07 +01:00
Åke Forslund
daeac964e0
Rename tested-skills argument to test-skills
2020-03-24 10:42:07 +01:00
Åke Forslund
5d6cb83899
Make all fields in config optional
2020-03-24 10:42:07 +01:00
Åke Forslund
e0dec90d17
Allow test_setup to update skills
2020-03-24 10:42:07 +01:00
Åke Forslund
2a7b0ccef9
Update voight kampff Readme with some extra info
2020-03-24 10:42:07 +01:00
Åke Forslund
a6d1e91942
Add auto-retry
...
This switches behave to the current dev release including the autoretry
system.
2020-03-24 10:42:07 +01:00
Åke Forslund
0ad91ce321
Add an event that can be waited on instead of sleep
2020-03-24 10:42:07 +01:00
Åke Forslund
0f860162e3
Update run_test_suite.sh
...
- Pulseaudio is launched if on CI
- remove hard-coding of start-mycroft.sh
2020-03-24 10:42:02 +01:00
Åke Forslund
353239cbc2
Move more common functions to voight kampff tools
2020-03-23 11:41:13 +01:00
Åke Forslund
0d5520be4a
Reduce sleep time while waiting for response
2020-03-23 11:41:13 +01:00
Åke Forslund
2055b50238
Add before_feature logging current test
2020-03-23 11:41:13 +01:00
Åke Forslund
fa88562a8c
Fix timeout of wait for message
...
The counter didn't increment as intended
2020-03-23 11:41:13 +01:00
Åke Forslund
9a5f1f6f7e
Add shared tools
2020-03-23 11:41:13 +01:00
Åke Forslund
0ea1af126d
Reduce safety timeouts
2020-03-23 11:41:13 +01:00
Åke Forslund
d451e1c1e0
Add more info on captured response (skill and dialog)
2020-03-23 11:41:13 +01:00
Åke Forslund
b79fe04eb8
Extend timeout after scenario
2020-03-23 11:41:13 +01:00
Åke Forslund
51f07a5d96
Add assert message if no dialog is recorded
2020-03-23 11:41:13 +01:00