2.0.1 • Published 5 years ago

directline-jabber v2.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

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

CommandFlagDescriptionRemarks
--filestranscript file(s) to test.Comma seperate for multiple
--dirsdirectory or directories with transcript files to testComma seperate for multiple
--preprocessactivities to process prior to the actual conversation file
--userid-ureplaces user id in activities
--useridprefixprefixes userId in activities
--secretdirectline secret for authenticationMutually exclusive with endpoint
--endpointendpoint to retrieve directline tokenMutually exclusive with secret
--recursive-rrecursivly scanning for files in directory'defaults to true
--verbose-venables verbose loggingdefaults 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.

2.0.1

5 years ago

2.0.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.2-rc8

5 years ago

1.0.2-rc7

5 years ago

1.0.2-rc6

5 years ago

1.0.2-rc5

5 years ago

1.0.2-rc4

5 years ago

1.0.2-rc3

5 years ago

1.0.2-rc2

5 years ago

1.0.2-rc

5 years ago

1.0.1

5 years ago

1.0.1-rc3

5 years ago

1.0.1-rc2

5 years ago

1.0.1-rc

5 years ago

1.0.0

5 years ago