Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 09 17:01
    dependabot[bot] labeled #674
  • May 09 17:01
    dependabot[bot] labeled #674
  • May 09 17:01
    dependabot[bot] opened #674
  • May 09 17:01

    dependabot[bot] on npm_and_yarn

    Bump hosted-git-info from 2.8.5… (compare)

  • May 06 17:35
    dependabot[bot] labeled #673
  • May 06 17:35
    dependabot[bot] labeled #673
  • May 06 17:35
    dependabot[bot] opened #673
  • May 06 17:35

    dependabot[bot] on npm_and_yarn

    Bump lodash from 4.17.19 to 4.1… (compare)

  • May 06 17:34

    jkelvie on master

    2.4.98 (compare)

  • May 06 15:11

    jkelvie on master

    Updated skill testing version (compare)

  • Apr 14 17:15

    ecruzado on v2.4.97

    (compare)

  • Apr 14 17:15

    ecruzado on master

    update skill testing ref 2.4.97 (compare)

  • Apr 14 17:09

    ecruzado on bst-client-109

    (compare)

  • Apr 14 17:09
    ecruzado closed #672
  • Apr 14 17:09

    ecruzado on master

    npm audit fix (#672) (compare)

  • Apr 14 17:03

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 14 17:03
    dependabot[bot] commented #671
  • Apr 14 17:03
    ecruzado closed #671
  • Apr 14 17:02
    ecruzado opened #672
  • Apr 14 17:02

    ecruzado on npmAudit

    npm audit fix (compare)

Tom V
@TomV
The skill is working fine, and I manage all the dialogs in my code, not using the dialog management feature. I really just want to write tests for now that are similar to this:
-- User: "I say W",
-- Alexa: "asking X? ",
-- User: "answer is Y",
-- Alexa: "asking Z",
Can I do that with the Bespoken unit tests? I thought I could, but now I'm a bit stumped as to how to get it running like it used to.
John Kelvie
@jkelvie
Hi @TomV - that error comes from this point in our code:
We are looking for an intent that corresponds to the dialog under the dialog section of the interaction model, like this:
Tom V
@TomV
@jkelvie thanks for the links. I've looked at the code, and it seems the only way to make my stuff work would be to add dialogs to my interaction model. That's too bad, I mostly am avoiding that, since I prefer much more dynamic responses you can't get from the Alexa dialog manager.
Also, much of my core code is multi-platform targeted, so relying on the Alexa dialog manager here creates another permutation to handle for the non-Alexa cases.
Tom V
@TomV

@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": []
        }
Tom V
@TomV

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:

  • configure required slots,
  • specify slot validation, or
  • specify intent confirmation

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.)

but to work with Bespoken's Virtual Alexa, you will need to specify at least a stub dialog model for any intent that you wish to elicit. @jkelvie , can you confirm my understanding here, or clarify anything I got wrong? Thanks!
Tom V
@TomV
Different topic: when I run
bst test --config test/bst-config/testing.json
The tests run, then the process stays open, apparently watching the files. But the tests never re-run for me, even after I've changed files. Is there a simple way, within the bst context to get automatically rerun the right tests after the files change (like standard jest)? [ running on macos }
Tom V
@TomV
(looks like I asked something similar Dec 2019.. even after reading the response, I'm not able to get it working.)
Tom V
@TomV

@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?

Diego Martín
@dmarvp
hi @TomV, the bst test command is not meant to keep the process open. Are you on the latest version of bst?
Tom V
@TomV

@dmarvp BST: v2.4.65 Node: v12.14.1 is what I'm running, might be the new VSCode.. (it can auto attach to node process for debugging, but I have that disabled..) I'll try in a standard terminal.

Should I upgrade to2.4.72?

Diego Martín
@dmarvp
we have updated the latest tag of bst this morning, please try using version v2.4.74 and see if that helps
Tom V
@TomV
Yes, I am doing that now! Thanks.. It does seem to work better in the standard terminal :-)
Tom V
@TomV

@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.

Tom V
@TomV
Just occurs to me that it may be waiting for something on my side, like a database handle to close.. My test is
bst test && echo All Done
Never see the All Done msg.
Question: How would I do cleanup after the tests have run to close database connection for example? Is there a hook for that or do I need to figure out the jest tests?
Diego Martín
@dmarvp
You could use the 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
Tom V
@TomV
@dmarvp Thanks! Sounds like exactly the right tool... and it was an RT(F)M answer ... I may have missed it since I'm working on unit tests.. Thanks for the link 👍
Tom V
@TomV

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 :-)

Tom V
@TomV
FYI: anyone seeing the error 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.
TLDR version: You can fix by updating your launch.json file that kicks off the bespoken proxy.
More info here: microsoft/vscode#102042 (and links from there.
John Kelvie
@jkelvie
Thanks for sharing this @TomV
Nitesh Chaudhary
@CHAUDHARYNKC_twitter
Hi, I'm running bst test --config tests/testing.json
but getting error "Expected value at [transcript] to ==
I am your IT helpdesk assistant"
can someone please help ?
Nitesh Chaudhary
@CHAUDHARYNKC_twitter
Please let me know if some more log information required. I'm following tutorial: https://blog.rasa.com/twilio-voice-rasa-tutorial/
Olubolar614
@Olubolar614
Hi, I'm currently unable to register online in order to access (login) bespoken dashboard, getting this error message "This domain is not allowed.Please use another email account or get in touch with us" .Please note, I'm using company's email address to register.I look forward to hearing from bespoken support team member.
xbootnek
@xbootnek
Are you planning a Google Actions sample app for testing?
John Kelvie
@jkelvie
Hi @xbootnek - we have a couple different examples, including this one:
Is that what you are looking for?
xbootnek
@xbootnek
Thanks for the rapid response. I issue bst test and get:
A testing.json file could not be found on this directory. Create one or use the --config option to specify its current location.
There is no testing.json present in the Git download.
John Kelvie
@jkelvie
Hi, you are correct. Sorry about that. Here is an example that is a Google Action, though it is built for DialogFlow:
xbootnek
@xbootnek
Sorry but DialogFlow won't hack it for me.