by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 13 17:25
    dmarvp unlabeled #649
  • May 13 17:25
    dmarvp labeled #649
  • May 08 23:25
    dmarvp unlabeled #650
  • May 08 23:25
    dmarvp labeled #650
  • May 08 23:25
    dmarvp commented #650
  • May 08 23:24
    dmarvp edited #650
  • May 08 23:13
    jkelvie commented #650
  • May 08 22:41
    dmarvp labeled #650
  • May 08 22:41
    dmarvp assigned #650
  • May 08 22:41
    dmarvp opened #650
  • May 06 20:57
    ThomasVuillaume commented #649
  • May 05 00:00
    dmarvp commented #649
  • May 04 23:58
    dmarvp unlabeled #649
  • May 04 23:58
    dmarvp labeled #649
  • May 04 23:52
    dmarvp labeled #649
  • May 04 23:50
    dmarvp assigned #649
  • May 04 11:43
    ThomasVuillaume opened #649
  • Apr 30 16:48
    jperata closed #478
  • Apr 30 16:48
    jperata commented #478
  • Apr 29 22:57

    jperata on bstIntendAvoidProcess0

    (compare)

Tom V
@TomV
(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.
thanks,
Juan Perata
@jperata
Hi @johnpcampbell_twitter we are reviewing the issue so that your data appears correctly. I'm sending your utterances for the current month on a direct message to you.
Juan Perata
@jperata
Hi @johnpcampbell_twitter we deployed a fix for your issue. It should be working fine at the moment.
akhil1296
@akhil1296
Hi, I want to implement unit testing using bst for the Alexa skill using third party APIs. Please provide me with some doc or information to write the testing code.
akhil1296
@akhil1296
Whenever I am trying the bst launch or best utter, it says check your network connection and try again. And my network is already good.
Juan Perata
@jperata

Hi, @akhil1296 are you perhaps behind a firewall or any network restriction? We have heard from such cases in corporate settings. https://read.bespoken.io/cli/faq/#my-organization-uses-a-firewall-how-do-i-use-your-tools-with-it , if that's not the case, a screenshot of the error or the bst-debug.log content that should be on the folder where you run bst can help us with the debug.

You can send those privately to me by direct message if you don't want to expose any kind of personal information