npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ta-bulk-testing

v0.0.34

Published

This is a project that helps you make bulk testing to twilio's autopilot infraestructure.

Downloads

34

Readme

ta-bulk-testing

This cli helps with bulk tests to the Autopilot infraestructure. It uses csv file fixtures as input and returns a json report if needed.

Installing

npm install -g ta-bulk-testing

Twilio's config parameters

In order for this application to run, it requires you to set three twilio variables.

How to get them?:

  • Auth Token: here
  • Account SID: here
  • Assistant SID: here

There are three ways that the cli will try to get those variables from:

  1. The Environment variables given by the OS, with the names of ACCOUNT_SID, AUTH_TOKEN and ASSISTANT_SID.
  2. The cli parametes as account_sid, auth_token, assistant_sid.
  3. A file generated by twilio autopilot cli which is located in ~/.twilio/config.json.

If any of those three places have the variables, it will raise an exception instead of running.

Running

Now you're able to run the project in the cli.

This is a cli program that helps you make bulk testing to
twilio's autopilot infraestructure. It uses a csv file fixtures
as input and returns a json report if needed.

Usage
  $ ta-bulk-testing <action>

Options
    --expand, -e Take the fixtures file and expand it.
                 This process relies on "intent-utterance-expander"
                 project.
    --export, -x Export report to a given name.
                 Eg. --export report.json.
                 If you send 'export' without a filename,
                 it will output the report in output.json.
    --fixtures, -f Import an specific fixture file. CSV Format
                   is mandatory.
    --language, -l Language for the testing. Default: 'en-US'
    --account_sid, -s Twilio's account SID, default will try to
                      lookup for it in ~/.twilio/config.json.
    --auth_token, -t Twilio's authorization token, default will
                     try to lookup for it in ~/.twilio/config.json.
    --assistant_sid, -a Twilio's specific assistant ID for this testing.

Examples
  $ ta-bulk-testing --expand --fixtures ./fixtures/en-US.csv --export

Fixtures

In order to generate the fixtures, this project relies on Intent Utterance Expander in order to expand the samples in your file. The first row, should be task, intent so that the library can match correctly the sample to the task that the bot should respond.

Example of the fixture file using the expander:

task, samples
hello_world, (Hi | Hello | Hey) I am Erick

Example of the fixture file without using the expander:

task, samples
hello_world, Hi I am Erick
hello_world, Hello I am Erick
hello_world, Hey I am Erick
hello_world, Hey I am Erick

Note: It's suggested that you use the expander to minimize the size of your fixture file.

In the folder fixtures of this project, there's an example .csv file using the expander feature.

For tasks resolved as null

In case you want to add test cases that resolves as null, you should do the following:

task, samples
null, this is a samples that should not be resolved by the NLR.

Development

Installation

In order to install it, just clone the project and install the dependencies.

  1. git clone <repo>
  2. yarn install # I'm using yarn, but you can you npm to install the dependencies.

Configuration

In order to be able to run this project, you'll need to have an .env file with your credentials.

  1. cp .env.example .env
  2. Fill your ACCOUNT_SID, AUTHO_TOKEN and ASSISTANT_SID.

TODO

  • [ ] Refactor the code to receive the twilio's variables from the command.
  • [ ] Add testing