Adding Custom Steps
Some Skills require their own unique Steps to test functionality specific to that Skill.
from behave import given
from test.integrationtests.voight_kampff import wait_for_dialog, emit_utterance
@given('a {timer_length} timer is set')
@given('a timer is set for {timer_length}')
def given_set_timer_length(context, timer_length):
emit_utterance(context.bus, 'set a timer for {}'.format(timer_length))
wait_for_dialog(context.bus, ['started.timer'])
context.log.info('Created timer for {}'.format(timer_length))
context.bus.clear_messages()Packages
from behave import given
from test.integrationtests.voight_kampff import wait_for_dialog, emit_utteranceVoight Kampff Tools
then_wait(msg_type, criteria_func, context, timeout=10)
emit_utterance(bus, utt)
wait_for_dialog(bus, dialogs, timeout=10)
Decorators
Function arguments
Context Object
Step logic
Help
Last updated
Was this helpful?