maxbespoken on master
2.6.1 (compare)
dependabot[bot] on npm_and_yarn
Bump properties-reader from 0.0… (compare)
maxbespoken on master
Publishing version skill-testin… (compare)
maxbespoken on fix-publishNewVersion-by_max
Publishing version skill-testin… (compare)
maxbespoken on master
2.6.0-RC.10 (compare)
maxbespoken on master
Add routine to check if it's ru… (compare)
maxbespoken on fix-addMonitoringClientForGithubAction-by_max
Add routine to check if it's ru… (compare)
maxbespoken on fix-addMonitoringClientForGithubAction-by_max
Add routine to check if it's ru… (compare)
maxbespoken on master
2.6.0-RC.9 (compare)
I am working on an Alexa Skill written in Python using the ask-sdk for Python. This skill is running self-hosted on a Flask server listening to port 5000. Now i would like to integrate Unit-Tests using the Bespoken Framework.
My testing.json file looks like this:
{
"locales": "de-DE",
"interactionModel": "models/de-DE.json",
"trace": true,
"jest": {
"silent": true
},
"skillURL": "http://localhost:5000"
}
i am locally running an http.server on port 9998 to get the report.html. The tests passed successfully, but the code coverage is not working correctly. It seems like the files used in this skills are not recognized at all. Instead they are looking up the files slides.js, debugger.js, jquery.js
No match for dialog name: AdditionalConcern
@jkelvie Thanks for pointing me in the right direction.
For anyone who hits the same issue: my workaround is to add a dummy "stub" in my interaction model for the intents that don't use Alexa's Dialog manager, like this:
context: My local interaction model.
en-US.json/interactionModel/dialog/intents/
{
"name": "AdditionalConcern",
"confirmationRequired": false,
"slots": []
}
And more background for anyone curious. If you are making an Dialog.Elicit slot, you can do that in your programmatic JSON response without defining a Dialog Delegation strategy in the interaction model. In order to create the DialogDelegation strategy (or 'dialog model') you need to specify one of the following:
These are all very simple string prompts, that will not have any context and can't be dynamic. In my code, I generate the elicit slot prompt based on the context of the conversation. (how many times have I asked, do I have an idea of possible values for this conversation, etc.)
bst test --config test/bst-config/testing.json
@jperata - I'd love to show both the input utterance and the expected result phrase (or some of it) in the test results. e.g. (pseudo code)
{
input: "Hello Bespoken!":
expected: "Hello, How are you doing?"
}
Right now, either from the command line or the html (jest-stare based) output, I only see the input phrase (or intent & slots) and not the expected response. It's like hearing one side of a conversation.
Can you help me find where to look for how the describe
block getting specified? Is it possible for me to easily modify that to add a bit of the expected result for passing tests?
@dmarvp No luck, still need to control-C ath the end of the tests, even from standard terminal window (vs VSCode terminal). Ends like this:
Test Suites: 2 passed, 2 total
Tests: 4 passed, 4 total
Snapshots: 0 total
Time: 26.993s, estimated 29s
Stuck there and I need to control c before I can run again.
bst test && echo All Done
All Done
msg.filter
property inside your testing.json file. It allows you to run custom code before and after each test or test suite: https://read.bespoken.io/end-to-end/guide/#filtering-during-test
FYI to anyone who sees something like I did, where the tests are not closing the process after runing:
IF you are using a database even for unit test :-( ... Make sure you are closing the connections to the db after some idle period.
For those using redis, you can just use redis_client.unref()
immediately after you create the redis client object. That will ensure after the commands run, it will close the connections. You may want to put this inside of conditional context flag, since performance will be better in production if you are not aggressive about closing connections.
Test your configs, your mileage may very :-)
could not read source map for
...bespoken-tools/bin/bst.js.map
(and a many many more like that), this is a VS Code bug, not directly related to bespoken-proxy.