Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 08 20:55
    dependabot[bot] edited #730
  • Feb 08 20:53
    dependabot[bot] synchronize #730
  • Feb 08 20:53
    dependabot[bot] edited #730
  • Feb 08 20:53

    dependabot[bot] on npm_and_yarn

    Bump got and update-notifier B… (compare)

  • Feb 08 20:53
    dependabot[bot] edited #730
  • Feb 08 20:52
    dependabot[bot] edited #730
  • Feb 08 20:52

    maxbespoken on v2.6.7

    (compare)

  • Feb 08 20:52

    maxbespoken on master

    Github Action: update skill-tes… 2.6.7 (compare)

  • Feb 08 20:50
    dependabot[bot] edited #730
  • Feb 08 20:49
    dependabot[bot] synchronize #730
  • Feb 08 20:49
    dependabot[bot] edited #730
  • Feb 08 20:49

    dependabot[bot] on npm_and_yarn

    Bump got and update-notifier B… (compare)

  • Feb 08 20:49
    dependabot[bot] edited #730
  • Feb 08 20:48
    dependabot[bot] edited #730
  • Feb 08 20:48

    german1311 on skill_upgrade

    (compare)

  • Feb 08 20:48

    german1311 on master

    Feature/skill upgrade (#735) s… (compare)

  • Feb 08 20:48
    german1311 closed #735
  • Feb 08 19:39
    german1311 synchronize #735
  • Feb 08 19:39

    german1311 on skill_upgrade

    skill-testing-ml 1.4.8 (compare)

  • Feb 07 21:53
    german1311 opened #735
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
maaztp
@maaztp
is alexa for business supported in bespoken for integration testing ?
how do i revoke virtual device access to my alexa developer account?
John Kelvie
@jkelvie
@maaztp For testing for Alexa For Business, we have a couple different ways to do that - we would need to discuss the best approach
With regard to removing access, we are listed as a device like any other and can be removed in the same way
maaztp
@maaztp
Thanks John , Can you list few practices . I am doing a POC on integration testing
How can I assign a4b room and profile with the virtual device?
Are there other ways to associate a4b information during integration testing?
John Kelvie
@jkelvie
It's not possible to assign our virtual devices to Alexa for Business accounts. However, you can:
1) Deploy the skill as a normal skill in development mode and test that way
2) We can also test it using our Test Robots with actual devices - this allows for true end-to-end testing of A4B experiences
If you message me directly, I can send over more information on the second approach
jbsimon000
@jbsimon000
I am trying to access my virtual device using curl with the following command: curl -v -k https://virtual-device.bespoken.io/process?message="What Time Is It"&user_id=<my access token>
I receive the following message :
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 400 (Bad Request)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>400.</b> <ins>That’s an error.</ins>
<p>Your client has issued a malformed or illegal request. <ins>That’s all we know.</ins>
John Kelvie
@jkelvie
Hi @jbsimon000 - I tried running a curl command like this and it worked fine:
curl 'https://virtual-device.bespoken.io/process?message=%22what%20time%20is%20it%22&user_id=TOKEN'
It did NOT work when I took out the character encoding in the message parameter - just saying "what time is it" as opposed to %22what%20time%20is%20it%22
jbsimon000
@jbsimon000
@jkelvie Tanks, that did it !
h
John Campbell
@johnpcampbell_twitter
Hi, trying to see how many utterances / billing information but the page is hanging? is this a known bug?
The quota and credit card details don't appear.
number of devices does load up.