Last active
May 11, 2018 23:08
-
-
Save jrwarwick/b6cece82949fc5da14c6a75273b92b12 to your computer and use it in GitHub Desktop.
Generate Mycroft AI skill intent testing specs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /opt/mycroft/skills/$MYSKILLNAME | |
mkdir -p test/intent | |
cd test/intent | |
grep 'IntentBuilder(' ../../__init__.py | cat -n -- | sed 's/^\s\+\([0-9]\+\).*intent_handler(IntentBuilder("/00\1./ ; s/").*$/\.intent\.json/' | awk '$1' | |
echo '{ | |
"utterance": "verbal imperative or interrogative after normalization", | |
"set_context": {"_TestRunner": "data", "test": ""}, | |
"intent_type": "IntentObjectNameFromSkillPythonSource", | |
"intent": { | |
"parameter1Name": "expectedvalue1", | |
"parameter2Name": "expectedvalue2" | |
}, | |
"expected_response": "expected response text regex .*" | |
} | |
' | tee `grep 'IntentBuilder(' ../../__init__.py | cat -n -- | sed 's/^\s\+\([0-9]\+\).*intent_handler(IntentBuilder("/00\1./ ; s/").*$/\.intent\.json/' | awk '$1'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment