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

directline-jabber

v2.0.1

Published

Automated testing of Microsoft BotFramework chat conversations using directline

Downloads

12

Readme

npm Build Status Coverage Status

DirectLine Jabber

DirectLine-Jabber focusses on automated integration testing for the Microsoft BotFramework. Using your BotFramework emulator transcript files it will check if your bot responds as it is supposed to respond.

It tests your conversations by authenticating and sending the activities over Direct Line.

Prerequisites

  • node.js v10+
  • a deployed bot instance
  • a Direct Line channel

Commandline arguments

| Command | Flag | Description | Remarks | --- | --- | --- | --- | | --files | | transcript file(s) to test. | Comma seperate for multiple | --dirs | | directory or directories with transcript files to test | Comma seperate for multiple | --preprocess | | activities to process prior to the actual conversation file | | --userid | -u | replaces user id in activities | | --useridprefix | | prefixes userId in activities | | --secret | | directline secret for authentication | Mutually exclusive with endpoint | --endpoint | | endpoint to retrieve directline token | Mutually exclusive with secret | --recursive | -r | recursivly scanning for files in directory' | defaults to true | --verbose | -v | enables verbose logging | defaults to false

Authentication

Secret

You can use the secret key that comes with your Direct Line channel in your Azure bot channels registration.

Token

If your bot exposes a token endpoint that generates a token from the directlineSecret you can use that. Your token endpoint response response should be a token object {token: ''}, a token string or a stringified token string. Click here for a demo implementation.

Installation

Install the dependencies and start the app.

$ cd directline-jabber
$ npm install

Run examples:

$ node app test --files <filePath,...> --secret [directLineSecret] 
$ node app test --dirs <directory,...> --endpoint [tokenEndpoint] 

Testing

$ npm test

Sample

There is a complete tutorial available: https://github.com/jvanderbiest/directline-jabber-demo

Preprocessing

In case you need to execute other activities prior to your conversation activities, you can use the preproccess flag to specify the activities file. This could be used to send custom events before your tests are executing.

UserId

You could use a fixed user id in activities or use a prefix for each user id.

Azure Devops Pipeline Task

There is a task available on the Visual Studio Marketplace to use for automated testing. Pipeline source can be found here

License

DirectLine-Jabber is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the application. But you always need to state that this repository is the original author of this application.