Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 10 17:39
    dependabot[bot] labeled #137
  • Aug 10 17:39
    dependabot[bot] opened #137
  • Aug 10 17:39

    dependabot[bot] on npm_and_yarn

    Bump path-parse from 1.0.5 to 1… (compare)

  • Jun 10 16:37
    btburton42 commented #115
  • Jun 07 21:51
    jkelvie commented #115
  • May 09 23:41
    dependabot[bot] labeled #136
  • May 09 23:41
    dependabot[bot] opened #136
  • May 09 23:41

    dependabot[bot] on npm_and_yarn

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

  • May 07 01:17
    dependabot[bot] labeled #135
  • May 07 01:17
    dependabot[bot] opened #135
  • May 07 01:17

    dependabot[bot] on npm_and_yarn

    Bump underscore from 1.9.1 to 1… (compare)

  • May 06 20:48

    dependabot[bot] on npm_and_yarn

    (compare)

  • May 06 20:48
    dependabot[bot] closed #125
  • May 06 20:48
    dependabot[bot] commented #125
  • May 06 20:48
    dependabot[bot] labeled #134
  • May 06 20:48
    dependabot[bot] opened #134
  • May 06 20:48

    dependabot[bot] on npm_and_yarn

    Bump lodash from 4.17.15 to 4.1… (compare)

  • May 06 17:25
    dependabot[bot] labeled #133
  • May 06 17:25
    dependabot[bot] opened #133
  • May 06 17:25

    dependabot[bot] on npm_and_yarn

    Bump handlebars from 4.5.3 to 4… (compare)

John Kelvie
@jkelvie
It's called Usability Performance Testing - our most recent case study on it is here: https://bespoken.io/blog/the-mars-agency-case-study/
Adam Elmore
@adamelmore
:tada: thanks a ton!
John Kelvie
@jkelvie
And a general overview is on our website: https://bespoken.io/usability-testing/
Our pleasure - and of course reach out if you have any additional questions
Adam Elmore
@adamelmore
Is there pricing information for usability-testing that I'm not seeing?
Or is it custom and you provide a quote?
John Kelvie
@jkelvie
It's the same pricing as for our subscription product: https://bespoken.io/pricing/ - that includes the usability performance testing
All of our products rely on interactions with Alexa/Google Assistant at their core, whether it is for end-to-end testing, monitoring or usability testing
xcobbler
@xcobbler
@jperata, amazon has acknowledged an issue with upsells when using certain models. my ugly workaround is to have 1 model for testing and 1 model for deployment :/
https://forums.developer.amazon.com/questions/207372/upsell-not-responding.html?childToView=210963#answer-210963
https://forums.developer.amazon.com/questions/208737/alexa-does-not-respond-to-request-for-upsell.html
Juan Perata
@jperata
thanks for keeping us informed @xcobbler , hopefully they will resolve the issue soon. But for now those links can help someone with the same issue in the future
Seth Lemoine
@mrseth01
I wrote a data library, and I'd like to write tests for it without emulating Alexa. I want to write tests that pull data from and endpoint and verify the data came back etc. How do I go about doing that?
I'm very new to testing. noob.
const NBA = require("../lambda/custom/nba-voice-library/NBA");

test("gets schedule from endpoint", async () => {
  expect.assertions(1);
  const data = await NBA.schedule();
  expect(data.length).toBe(4);
});
Juan Perata
@jperata
Hi @mrseth01 , your way sounds about right. Since you are not testing the Alexa section you don't need to introduce virtual-alexa in that section. We recommend that you also add some tests with our library to emulate Alexa too, it will interact with your endpoint unless you do some steps to mock it.
Mina Saleeb
@saleebm
Hey I'm getting an error about my network connection every time. I even tried following the node example but got this same error:
```
Something went wrong. Please check your network connection and try again.
Mina Saleeb
@saleebm
I'm using node v10, stack is RequestError: Error: read ECONNRESET\n at new RequestError ... t TLSSocket.socketErrorListener (_http_client.js:392:9)\n at TLSSocket.emit with macOS
John Kelvie
@jkelvie
Hi @saleebm - what tool are you using? And what command are you sending?
Mina Saleeb
@saleebm
Hey thank you for the quick response, I sent the command bst init and then I also tried node ./node_modules/bespoken-tools/bin/bst-proxy.js lambda ./src/index.ts
I installed bespoken-tools globally with npm v10.18.1 and also tried doing it in a local project,
Is it maybe because I use node version manager and I have my default set to v13?
Juan Perata
@jperata
Hi @saleebm - to use the proxy with the lambda parameters you would need to point to the ".js" file instead of ".ts" one.
Also, are you behind a corporate proxy?
Mina Saleeb
@saleebm
Oh ok, I see, and yes I actually might be, I'm at a college. I'll have to try again and see later, thank you
Mark Tucker
@rmtuckerphx
What is the best way to build a Connections.Response? It could include values for Buy, Upsell, Cancel, Setup, Charge & ACCEPTED, DECLINED, ALREADY_PURCHASED, ERROR
pintonos
@pintonos
Hi there, i have problems while mocking dynamoDB. Running it locally works fine, but when using it in the GitLab CI following error occurs: Uncaught exception: AskSdk.DynamoDbPersistenceAdapter Error: Could not create table (...): The security token included in the request is invalid. Any ideas?
John Kelvie
@jkelvie
Hmm...@pintonos - do you have a sample you can share with us?
pintonos
@pintonos
@jkelvie not really. I just used the alexa.dynamoDB().mock(); Do you ever have tested it in a CI (GitLab) environment? Perhaps this produces some new problems, like this one.
John Kelvie
@jkelvie
Yes we use CI environments regularly, including Gitlab. But I have not seen that particular error before.
akhil1296
@akhil1296
Hi, I am made alexa skill that uses third party APIs as well as few HTTP apps. I am not understanding how to do the unit testing for such cases. Any kind of help from you people will be highly appreciated. Thanks
allthepies
@allthepies

Hi, I am made alexa skill that uses third party APIs as well as few HTTP apps. I am not understanding how to do the unit testing for such cases. Any kind of help from you people will be highly appreciated. Thanks

Hi, I use nock to mock the API /HTTP calls.

Juan Perata
@jperata
Hi @akhil1296 , our full documentation for unit testing in Alexa using YML scripts is here. For your specific question if you are using YML, we set up an environment variable that you can use to change to get specific responses.
Since you are asking in the Virtual Alexa channel maybe you are using Virtual Alexa directly with Jest or Mocha, if that's the case then Nock is a great solution to mock API calls as @allthepies suggest.
spham1
@spham1_gitlab
hi
i have an issue after lauch bst test
Cannot find module '/home/sylvain/spham/alexa/skill-sample-nodejs-hello-world/index.js' from 'ModuleInvoker.js'
allthepies
@allthepies
Hi Guys. I 'm using the virtual-alexa dynamoDB mock and want to pre-populate the mocked dynamo table with a set of attributes at the start of a test. Is this possible ?
John Kelvie
@jkelvie
Hi @allthepies - if you activate the mock, and then make call to DynamoDB put - either directly via the API or via the AWS SDK, it will set the state of the table
allthepies
@allthepies
Hi, Tried calling PutItem on the AWS DynamoDB class after enabling the bespoken dynamo mock and get an exception with the AWS call asking for a region
allthepies
@allthepies
Sorted now, had the execution order wrong
John Kelvie
@jkelvie
Great....glad to hear it
Dan
@dhazrati_twitter
Hello :wave: Has anybody experiences issues setting environment variables with virtual-alexa? I'm currently running unit tests with this lib and Jest, but for some reason, any custom process.env.FOO env vars are not being picked up from my node Lambda locally. Any ideas?
John Kelvie
@jkelvie
Hi @dhazrati_twitter how is your Lambda being invoked?
Dan
@dhazrati_twitter

Hi @jkelvie - the Lambda handler is being invoked as a JS function directly.

import { handler } from 'src/index';
import { VirtualAlexa } from 'virtual-alexa';
const alexa = VirtualAlexa.Builder()
    .handler(handler)
    ...
   . build()

I've tried setting the env variables before and after the virtual alexa client is built, but no luck. I can only seem to set variables outside of our test file i.e. SOME_VAR=true jest

John Kelvie
@jkelvie
Okay, and where are you setting the environment variable that it does NOT work?
Also, I take it that it does work if it is set in the CLI via an export?
Dan
@dhazrati_twitter

@jkelvie Yes you're correct. It works when the environment variable is exported as part of my test command e.g. FOO=BAR npm run test.

My Jest test file looks something like this:

import { handler } from 'src/index';
import { VirtualAlexa } from 'virtual-alexa';

describe("Given some state", () => {
  beforeEach(async () => {
    process.env.FOO = "bar";

    const alexa = VirtualAlexa.Builder().handler(handler).build();
    await alexa.launch();
  })

  it("Then some expection", () => {
    expect("something").toBe("something")
  })
})

This is not currently working, as the environment variable is NOT picked up inside my handler.

I will try and create a minimal reproduction this weekend, if that will help?
John Kelvie
@jkelvie
Yes, that would be helpful. I can't think of what would cause this - especially given the example you show above.
I naturally tend to focus on the process-spawning that Jest does, but that would not apply in the sample code you show.
Dan
@dhazrati_twitter
Hi @jkelvie, I tried to create a minimal reproduction.... and couldn't.... so I decided to take another look at the original code and spotted a bug in our code (facepalm). Apologies and thanks for taking a look!
John Kelvie
@jkelvie
Glad to hear that it's working, @dhazrati_twitter !
allthepies
@allthepies
Hi, I've got the latest virtual alexa installed (0.7.7) and the inSkillPurchaseResponse() method doesn't exist in the SkillRequest object. Has the package been generated correctly ?