Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 22 22:42
    dmarvp assigned #632
  • Jan 22 22:42
    dmarvp unlabeled #625
  • Jan 22 22:41
    dmarvp labeled #625
  • Jan 22 22:31
    dmarvp labeled #633
  • Jan 22 22:31
    dmarvp assigned #633
  • Jan 22 22:31
    dmarvp opened #633
  • Jan 22 21:20
    MKen-li commented #606
  • Jan 22 21:20
    MKen-li closed #606
  • Jan 22 21:20
    MKen-li commented #606
  • Jan 22 20:22
    jperata commented #606
  • Jan 22 05:18

    ecruzado on v2.4.34

    (compare)

  • Jan 22 05:18

    ecruzado on master

    update skill testing ref 2.4.34 (compare)

  • Jan 22 05:13

    jperata on bst-client-46

    (compare)

  • Jan 20 23:48
    jperata labeled #632
  • Jan 20 23:47
    jperata opened #632
  • Jan 20 21:18
    jperata commented #624
  • Jan 20 19:35
    MKen-li closed #624
  • Jan 20 19:35
    MKen-li commented #624
  • Jan 17 23:11

    ecruzado on v2.4.33

    (compare)

  • Jan 17 23:11

    ecruzado on master

    update skill testing ref 2.4.33 (compare)

Trinitus01
@Trinitus01
Hi @jkelvie, thanks for the reply. I will try to use Google TTS later on this day and give you a feedback if it change something. Although the virtual device is offline in the Alexa App, i was able to send a english/german mixed sentence to the virtual device like: "Turn on the licht wohnzimmer". "licht wohnzimmer" is my light in the living room. So only english sentences seems to work. I will follow your instructions and test it with a german sentence. Regards
John Kelvie
@jkelvie
Hi @Trinitus01 - are you setting the locale parameter? For German, this should be de-DE.
Trinitus01
@Trinitus01
@jkelvie Yes i did, no effect
voice_id=de-DE-Wavenet-A or voice_id=Hans -> no effect, does not work with only german sentence
John Kelvie
@jkelvie
Hi @Trinitus01 - just to confirm that I have seen the same behavior - we are looking into it and will followup soon
Juan Perata
@jperata
Hi @Trinitus01 , the issue should be solved now.
Trinitus01
@Trinitus01
@jperata Big thanks! Now it works like it should be, perfect! Doesnt matter but the virtual device in the Alexa App is still offline. Maybe i have to reconnect again.
Juan Perata
@jperata
@Trinitus01 the virtual device always show offline in the Alexa app , but you can still use it.
whetstonesanj
@whetstonesanj_twitter

Hello, I'm pulling up some e2e scripts I wrote a couple of months ago and at that time, they were able to use the following properties to check on card returns from Google, however these no longer appear to be working now. I'm currently running version v2.4.24 of the utility.

payload.google.richResponse.items[1].basicCard.title
payload.google.richResponse.items[1].basicCard.formattedText

Edgar Cruzado
@ecruzado
Hi @whetstonesanj_twitter can you check if you have the option "Testing on Device" enabled in your google action?
whetstonesanj
@whetstonesanj_twitter
@ecruzado The action is published to Alpha and is available on any of my devices using a "Talk To" invocation. I'm also seeing that there seems to be some issue maintaining context between commands - all stuff that was working before. Trying to see if I can glean more info.
Diego Martín
@dmarvp
hi @whetstonesanj_twitter , in general, to be able to test a google action with our virtual devices you need to be part of the team of the Google Action project, your google action has to be on Test mode by enabling "Testing on Device" and you have to make sure that your virtual device has been created with the same google account that has access to your google action
if it still doesn't work, maybe we can have a small call to troubleshoot the issue, just pick a time slot here: https://calendly.com/bespoken-diego/30min and Edgar and I will be glad to help
whetstonesanj
@whetstonesanj_twitter
@dmarvp as regards general followup, because of the configuration I need to use with our customer, the only way I can test on a device is to publish to Alpha/Beta - that is working fine on physical devices the test account is associated with - since we just became a paying customer, I got an email asking to have a discussion next week, so I went ahead and requested times for a call that way where I can better describe the whys of our customer configuration. As regards the context issues - turns out that looks like an issue on our end that bst helped uncover - so thanks for that :-).
Tom V
@TomV
I've been using the command line ask dialog --replay replayscript.json to run some of my testing, but wanted to move over use bespoken cli. Are the replay scripts from the ask cli mapped better to the end-to-end tests or unit tests? Also is there a conversion script to let me just run those simple json files as bst test files?
Diego Martín
@dmarvp
hi @TomV, as the ask command interacts with a deployed skill, it would map better to our e2e tests. We don't have a conversion tool for it, but by looking at an example file it should be pretty easy to convert them. You can read more about our e2e tests here: https://read.bespoken.io/end-to-end/getting-started/
Tom V
@TomV
Thanks @dmarvp ! When I tried running a simple test, I'm getting an odd response, and I can't seem to find anything in the documentation to explain the output. Here's what I see: \n143 files checked. testMatch: - 0 matches testPathIgnorePatterns: /coverage/, /locales/, /lambda/, /test_output/ - 41 matches testRegex: lambda/test/unit/index.test.yml - 1 match Pattern: - 0 matches
(I can't seem to enter CR so that the markdown properly renders..)
Where are the testPathIgnorePatterns getting set, and do I need to move my test OUTSIDE of the lambda folder to get it to run?
Tom V
@TomV
I find no results when searching the Bespoken docs for "testPathIgnorePatterns".. seems like it's not documented. :-( Trying bst test -h does not yield any insight either, except the expected value after the test param is a regex, not just a path to the test(s). Escaping regex chars did not make a difference (e.g., the "/" and "." characters.)
Summary - I'm having a surprising amount of trouble just "getting out of the gate" test the bespoke cli tool - the proxy stuff works smooth as butter though! (seems preferable to ngrok.)
Juan Perata
@jperata
Hi @TomV sorry to hear about your issues, our tool use Jest in order to run the tests, that's why the testPathIgnorePatterns is not in our documentation, we do setup "/coverage/, /locales/, /lambda/, /test_output/" folders as ignored and it seems you have included your tests inside the lambda folder (usually the lambda zone includes only what you want to deploy to lambda and our tests are not part of that), could you try again setting the test folder outside the lambda folder one?
Tom V
@TomV
Thanks @jperata . Yes, that did it, and it does make sense to keep the lambda folder pure, since it gets deployed.
Now I have an e2e test that appears to run all the way to the end without errors, but I get a bad gateway errror (as an HTML page) response in the error. It's pretty consistent. How can I trouble shoot that error?

      <meta http-equiv="content-type" content="text/html;charset=utf-8">
      <title>502 Server Error</title>
      </head>
      <body text=#000000 bgcolor=#ffffff>
      <h1>Error: Server Error</h1>
      <h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
      <h2></h2>
      </body></html>
      Timestamp:
        2019-12-30T16:38:12.879
Tom V
@TomV
I have run this via ngrok, and used the bst proxy I believe. Both end with this error. I'm running ngrok now but I'll switch back to the bst proxy and try again.
Tom V
@TomV
It's not even clear to me what server is sending this html page when something else is expected. Is Amazon's server replying with this html error page instead of some JSON post response? Or is this error coming from the lambda function?
(not from my code, but from a failure reaching the lambda function.. which I guess would also be from the Alexa service..)
Tom V
@TomV
I've now got unit tests running, wondering how to have them automatically run when files are modified? I guess this is more of a jest question.. Where would I configure the jest stuff to run unit tests based on file changes?
Juan Perata
@jperata
Hi @TomV , we usually recommend running them with a CI solution like Circle Ci or Travis, to run when you commit something instead of when the file changes.
In order to run jest on file changes usually, you use the --watch option, but we haven't implemented directly that option on bst test. We will continue looking into it to see if it's something you could add from the configuration or if we are able to add that as a feature in the near future.
Tom V
@TomV
cool. Is there a way to run bst inside of jest, instead of the other way around? That would allow the --watch option (combined with .only in the test.)
Any ideas about the html response with a 502 error? Is that something other people have reported? I assume when I start on a new tool, I'm making the mistakes everyone else makes, so usually it's been documented somewhere.. :-)
One quick follow up regarding tests not running if inside of /lambda folder (which does make sense..) The video from Sept 2019 has Emerson Sklar demoing command line but tests are in /lambda/custom, and they run fine. Seems like that would no longer work. ( https://youtu.be/YR7y2PA0ekI )
Tom V
@TomV
One other thing I can't figure out- in jest, there's a --silent flag to suppress console.log messages. I tried setting that inside of the testing.json file, but it did not seem to work. Is it possible to pass that flag to jest?
Tom V
@TomV
Answering my own question 🙈 (re jest --silent flag) - there's a --jest.silent flag in the bst test command supports, so that's handy until I clean up my code.
John Kelvie
@jkelvie
Hi Tom, it is possible to run tests inside the Lambda folder, but depending on where you then run bst from and how jest is configured, you may end up with odd results
We do recommend keep them outside of the lambda folder, typically as a top-level directory called tests
With regard to the 502 error, that is not something that has been reported before
If you share more about the specific tests we might have some ideas, but just from what you have shared, nothing comes to mind
Tom V
@TomV
Great info, thanks for the info, and the video with you and Emerson was really useful!
Is there any info on how and where jest is configured? (And Happy New Year to the Bespoken team 🎉🥳🎉 )
John Kelvie
@jkelvie
You can see the default settings we use for invoking Jest here:
But you can override any of them by setting a "jest" property in your testing.json - then set the configuration to whatever you like
Tom V
@TomV
Thanks!! I'll take a look.
Mark Tucker
@rmtuckerphx
Using Jovo and there is an ON_ERROR handler. How do I set up a unit test scenario with VirtualAlexa to end the session with an error?
John Kelvie
@jkelvie
Hi @rmtuckerphx - I have typically set an additional, artificial property on the request - and then added code that when it sees that property, throws an error
For example:
const request = alexa.request()
    .intent("MyIntentName")
    .slot("SlotName", "SlotValue")
    .set("forceError", true) // Setting additional property
And then my code that reads it and throws an error:
https://github.com/jkelvie/ClassicMovieMusts/blob/master/lib/index.js#L16