Coder Social home page Coder Social logo

codeforequity-at / botium-core Goto Github PK

View Code? Open in Web Editor NEW
232.0 15.0 64.0 4.85 MB

The Selenium for Chatbots - Bots Testing Bots

Home Page: https://www.botium.ai

License: MIT License

JavaScript 99.87% HTML 0.13%
botium selenium chatbot test-automation testing-tools

botium-core's Introduction

Image of Botium Core

Botium - The Selenium for Chatbots

NPM

npm version license Discourse users pullrequests docs awesome

IF YOU LIKE WHAT YOU SEE, PLEASE CONSIDER GIVING US A STAR ON GITHUB!

UPDATE 2020/11/05: Botium has a FREE, hosted plan available! The new Botium Box Mini is our โค๏ธ to the community. Take it for a test drive ๐Ÿš— ...

Getting Help

See our Botium Forum

Quickstart

Read the Getting Started guide or the Botium in a Nutshell blog series to get started with Botium!

What is Botium

Selenium is the de-facto-standard for testing web applications. Appium is the de-facto-standard for testing smartphone applications. Botium is for testing conversational AI. Just as Selenium and Appium, Botium is free and Open Source, and available on Github.

Documentation

See here for Botium documentation.

Connectors

Botium Core provides the core functionality. For attaching Botium to your chatbot, there are lots of connectors available for most important chatbot technologies, frameworks, APIs, SDKs, cloud services etc. Sample configurations and scripts are included with each connector.

All connectors are hosted on Github

See here for the latest connector updates.

Installation Tracking

This module is sending anonymous installation information to our server (operating system, architecture, library version), which is used for making this project better. You can always disable this tracking by setting the environment variable BOTIUM_ANALYTICS to false before installing it.

Contributions

Contributions are welcome! Please read our Contribution Guide!

botium-core's People

Contributors

aliakseibychyk avatar alopix avatar breadandroses95 avatar cameronnewby avatar codeforequity-at avatar dependabot[bot] avatar lzmartinico avatar martinwillittsgc avatar murliwatz avatar naktibalda avatar stefan-sev avatar sushank-rana-a30001665 avatar szabi84 avatar ujja avatar yanniks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

botium-core's Issues

Make convo files lookup more stable (looking for convos in the wrong places)

Realized this was a mistake on my part but still a bug

Running botium-cli emulator browser or botium-cli run outputs

Error: EPERM: operation not permitted, scandir 'C:\Users\ELee\AppData\Local\Application Data'

At other times, the error would result from trying to scan my Recycling Bin.

I noticed though that my convos files were stored away in a different directory! In addition, I hadn't set up my BOTIUM_CONVOS environment variable. So I played around with the cd command, and found a pattern: whenever I was in a directory that contained a restricted system subdirectory, this error would present itself (For example, the "Application Data" was a subdirectory of the directory from which I ran the command, C:\Users\ELee). If there was no such restricted subdirectory (for example if I was in the directory C:\inetpub), the command will complete, but it would just show 0 passing.

So a suggestion I have would be to

  • do a "breadth-first" search instead of a "depth-first" search, because it's more likely that the convos files are located just 1 folder away, or
  • if no convos files are found in the current directory, output a fun error message such as

I'm "speechless"... convos files not found

Directline v3 - getting back undefined all the time

Hi there, I am testing our deployed directline chatbot. I wanted to test the connection with a very simple test case. Here is my code.

const BotDriver = require('botium-core').BotDriver
const Capabilities = require('botium-core').Capabilities
const Source = require('botium-core').Source

function assert (expected, actual) {
    if (!actual || actual.indexOf(expected) < 0) {
      console.log(`ERROR: Expected <${expected}>, got <${actual}>`)
    } else {
      console.log(`SUCCESS: Got Expected <${expected}>`)
    }
  }

const driver = new BotDriver()
  .setCapability(Capabilities.PROJECTNAME, 'My_AutomaticTesting')
  .setCapability(Capabilities.CONTAINERMODE, 'directline3')
  .setCapability(Capabilities.DIRECTLINE3_SECRET, 'XXXX')
  .setCapability(Capabilities.DIRECTLINE3_WEBSOCKET, true)
  .setCapability(Capabilities.DIRECTLINE3_POLLINGINTERVAL, 100)
  .setEnv('DEBUG', '*')

  driver.BuildFluent()
  .Start()
  .UserSaysText('Hallo')
  .WaitBotSaysText(console.log)
  .WaitBotSaysText(console.log)
  //.WaitBotSaysText((text) => assert('Hallo', text))
  .Stop()
  .Clean()
  .Exec()
  .then(() => {
    console.log('READY')
  })
  .catch((err) => {
    console.log('ERROR: ', err)
  })

And I am also using the botium.json with the kind of same configuration.

I am now getting this as console output:

> node botiumTests.js 
undefined
undefined
READY

I dont know what's the issue. How can I get deeper into debugging the Chatbot - is there a debug mode and if so, how do I enable it?

Context Variable in a Convo file using Watson.

Hi!

I have a conversation tree that can go to multiple subjects, in Watson we have a context variable that can have the following values:

$product == 'Password Reset'
$product == 'Account'

In my convo files, how can I set this variable to initiate each of this products trees in my tests?

Ex:
....
....
#me
Hi

#bot
How can i help you to reset your password ?

Thanks in advance.

Chatbot not built in browser emulator

Clicking New Conversation in the browser emulator produces Error restarting chatbot {}.

In my command prompt, the full error message is
image

Running #EXIT confirms this error, as it maintains that something is "not built".

Incredulously, I run into no errors when running the console version of the emulator, even when entering #SAVE or #EXIT.

Running Scripts from a "convos" directory

Hi,
I'm trying to execute some scripted convo files in a directory, but it seems that is not beeing executed.

This is my botiumFluent.js

`const BotDriver = require('../../index').BotDriver
const Capabilities = require('../../index').Capabilities
const Source = require('../../index').Source

function assert (expected, actual) {
if (!actual || actual.indexOf(expected) < 0) {
console.log(ERROR: Expected <${expected}>, got <${actual}>)
} else {
console.log(SUCCESS: Got Expected <${expected}>)
}
}

const driver = new BotDriver()
.setCapability(Capabilities.PROJECTNAME, 'Test')
.setCapability(Capabilities.CONTAINERMODE, 'watsonconversation')
.setCapability(Capabilities.WATSONCONVERSATION_USER, 'xxxx')
.setCapability(Capabilities.WATSONCONVERSATION_PASSWORD, 'xxxx')
.setCapability(Capabilities.WATSONCONVERSATION_WORKSPACE_ID, 'xxxx')
.setCapability(Capabilities.WATSONCONVERSATION_COPY_WORKSPACE, false)

driver.BuildFluent()

.ReadScripts('convos')
.Start()
.RunScripts()
.Exec()
.then(() => {
console.log('READY')
})
.catch((err) => {
console.log('ERROR: ', err)
})`

This is my convo file in the 'convos' directory:

`test

#me
saldo credito

#bot
sera diferente de uma cota para outra, mesmo sendo mesmo grupo, devido a taxas e processo de contemplacao

#bot
Em que mais posso lhe ajudar ?

#me
oi

#bot
Eu nao entendi. Voce pode tentar reformular a frase.

#me
ate mais

#bot
Obrigado por utilizar o chat de consorcios
`

When executing my node script with the command "node botiumFluent.js", it only logs "READY", but the scripts aren`t executed as well.

I'm attaching a screenshot showing my directory files.

Please, can you help me ?
directory

How to handle test in different languages ?

Hi,

Thanks a lot for this great tool.

We have a bot on dialogflow. The bot is setup in both french and english languages.
How to configure our botium instance in order to test all the intents in french and then all the intent in english ?
Not sure why but the first time I ran the tool, I had questions in french and responses in english....

Thanks a lot,
Pierre-Yves

Convos (Excel) with Microsoft Directline3 API not working

Issue: From Excel file i am reading question and answers and passing it to botiumFluent.js then i am getting exception like bot says nothing that is from convos.js file ,if hard coding question and answers in botiumFluent.js i can able to get response from bot, i have also changed botium.json to my bot configuration.

botiumfluent

cmd

Suggestion: add support for Google assistant responses

I'm using the emulator on verbose mode and although botium gets a responses it doesn't say anything.

I assume the reason is that I'm using the actions-on-google package on a fulfillment webhook that returns a payload meant for Google assistant.

I suggest adding support to cases in which the dialogflow conversation data appears as part of the payload in a actions-on-google format.

Example response:

find me tables
  botium-DialogflowContainer dialogflow response: { responseId: '1d244403-d526-49ef-9aee-c8ef49fdc9e7',
  botium-DialogflowContainer   queryResult: 
  botium-DialogflowContainer    { fulfillmentMessages: [ [Object] ],
  botium-DialogflowContainer      outputContexts: [ [Object], [Object], [Object] ],
  botium-DialogflowContainer      queryText: 'find me tables',
  botium-DialogflowContainer      speechRecognitionConfidence: 0,
  botium-DialogflowContainer      action: 'search',
  botium-DialogflowContainer      parameters: { fields: [Object] },
  botium-DialogflowContainer      allRequiredParamsPresent: true,
  botium-DialogflowContainer      fulfillmentText: '',
  botium-DialogflowContainer      webhookSource: '',
  botium-DialogflowContainer      webhookPayload: { fields: [Object] },
  botium-DialogflowContainer      intent: 
  botium-DialogflowContainer       { inputContextNames: [],
  botium-DialogflowContainer         events: [],
  botium-DialogflowContainer         trainingPhrases: [],
  botium-DialogflowContainer         outputContexts: [],
  botium-DialogflowContainer         parameters: [],
  botium-DialogflowContainer         messages: [],
  botium-DialogflowContainer         defaultResponsePlatforms: [],
  botium-DialogflowContainer         followupIntentInfo: [],
  botium-DialogflowContainer         name: 'projects/project-id/agent/intents/...',
  botium-DialogflowContainer         displayName: 'search',
  botium-DialogflowContainer         priority: 0,
  botium-DialogflowContainer         isFallback: false,
  botium-DialogflowContainer         mlEnabled: false,
  botium-DialogflowContainer         webhookState: 'WEBHOOK_STATE_UNSPECIFIED',
  botium-DialogflowContainer         action: '',
  botium-DialogflowContainer         resetContexts: false,
  botium-DialogflowContainer         rootFollowupIntentName: '',
  botium-DialogflowContainer         parentFollowupIntentName: '' },
  botium-DialogflowContainer      intentDetectionConfidence: 1,
  botium-DialogflowContainer      diagnosticInfo: { fields: [Object] },
  botium-DialogflowContainer      languageCode: 'en-us' },
  botium-DialogflowContainer   webhookStatus: { details: [], code: 0, message: 'Webhook execution successful' } } +2m

docker-compose in macOS fails to mount a shared folder

Docker for macOS fails to mount a shared folder for basic bot testing (from the example walkthrough) when Botium is not installed in a subfolder of one of these directories: /Users, /Volumes, /private, /tmp:

botium-ProcessUtils ERROR: for corecreatenewconversation_botium-botframeworkmock_1 Cannot start service botium-botframeworkmock: b'Mounts denied: \r\nThe path /opt/botium/node_modules/botium-core/samples/botframework/botiumwork/core-CreateNewConversation-20180423-122832-5vkmh/botframeworkmock\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'
This is due to Docker for Mac volume mounts behaving differently than the base Docker system. This is mostly because Docker tries to comply with Apple's filesystem sandbox guidelines (as seen in this SO issue)

Briefly: I use to install my devel applications in /opt. So I installed Botium in /opt/botium. But /opt folder is not by default in Docker for macOS allowed shared volume list: /Users, /Volumes, /private, /tmp.
Workaround: install Botium in a subfolder of any of those folders.

I think that this issue (event though it is not a bug) should be mentioned in the Wiki for the basic Example Walkthrough.

Support for web channel

Provide the implementation for web channel using Microsoft Botframework, like slack and Facebook channel implementation.

Error running Dialogflow utterances sample - Insufficient tokens for quota

I tried running the Dialogflow utterances sample, leaving the code unchanged except for adding .setCapability(Capabilities.CLEANUPTEMPDIR, false) to the driver. I didn't get any output.

I managed to get debugging working and it shows this error:

ERROR: Error: jokes.get/jokes.feedback.bad/Line 12: error sending to bot Error: Cannot send message to dialogflow container: { Error: Insufficient tokens for quota 'dialogflow.googleapis.com/StandardTierTextQueryOperations' aOperations' and limit 'StandardTierTextQueryOperationsPerMinutePerProject' of service 'dialogflow.googleapim' f cnmerojes.com' for consumer 'project_number:552878414608'.

To me it suggests that the quota is too low to handle the volume of requests sent to the bot. Is it possible to increase the quota, or for me to add something to throttle the rate of requests?

Many thanks

DirectLine // multiple asserts not working

Currently I am trying to find an issue in our real bot. For that I set up a plain sample bot in Azure Web App and wanted to see the "normal" behaviour of Botium. Unfortunately there seems to be an issue. Botium is checking the message received second with the first assert - which does not make much sense to me.

This is my test:

  driver.BuildFluent()
  .Start()
  .UserSaysText('Start')
  .WaitBotSaysText((text) => assert('1: You said Start', text))
  .UserSaysText('Me no americano')
  .WaitBotSaysText((text) => assert('2: You said Me no americano', text))
  .Stop()
  .Clean()
  .Exec()
  .then(() => {
    console.log('READY')
  })
  .catch((err) => {
    console.log('ERROR: ', err)
  })

And this is the debug output of the console:

botium-PluginConnectorContainer Botium plugin botium-connector-directline3 loaded +0ms
  botium-connector-directline3 Validate called +0ms
  botium-connector-directline3 Build called +0ms
  botium-connector-directline3 Start called +2ms
  botium-connector-directline3 UserSays called +27ms
  botium-connector-directline3 received message  { type: 'message',
  id: 'EI195KgcTvxFDU8GUXQNjj|0000001',
  timestamp: '2018-06-27T13:20:24.5668789Z',
  localTimestamp: '2018-06-27T13:20:24.3892858+00:00',
  channelId: 'webchat',
  from: { id: 'MyEchoBot', name: 'MyEchoBot' },
  conversation: { id: 'EI195KgcTvxFDU8GUXQNjj' },
  text: '1: You said Start',
  attachments: [],
  entities: [],
  replyToId: 'EI195KgcTvxFDU8GUXQNjj|0000000' } +1s
  botium-connector-directline3 received message  { type: 'message',
  id: 'EI195KgcTvxFDU8GUXQNjj|0000001',
  timestamp: '2018-06-27T13:20:24.5668789Z',
  localTimestamp: '2018-06-27T13:20:24.3892858+00:00',
  channelId: 'webchat',
  from: { id: 'MyEchoBot', name: 'MyEchoBot' },
  conversation: { id: 'EI195KgcTvxFDU8GUXQNjj' },
  text: '1: You said Start',
  attachments: [],
  entities: [],
  replyToId: 'EI195KgcTvxFDU8GUXQNjj|0000000' } +96ms
  botium-connector-directline3 Posted activity, assigned ID  EI195KgcTvxFDU8GUXQNjj|0000000 +206ms
SUCCESS: Got Expected <1: You said Start>
  botium-connector-directline3 UserSays called +2ms
  botium-connector-directline3 received message  { type: 'message',
  id: 'EI195KgcTvxFDU8GUXQNjj|0000003',
  timestamp: '2018-06-27T13:20:25.767324Z',
  localTimestamp: '2018-06-27T13:20:25.751837+00:00',
  channelId: 'webchat',
  from: { id: 'MyEchoBot', name: 'MyEchoBot' },
  conversation: { id: 'EI195KgcTvxFDU8GUXQNjj' },
  text: '2: You said Me no americano',
  attachments: [],
  entities: [],
  replyToId: 'EI195KgcTvxFDU8GUXQNjj|0000002' } +838ms
  botium-connector-directline3 received message  { type: 'message',
  id: 'EI195KgcTvxFDU8GUXQNjj|0000003',
  timestamp: '2018-06-27T13:20:25.767324Z',
  localTimestamp: '2018-06-27T13:20:25.751837+00:00',
  channelId: 'webchat',
  from: { id: 'MyEchoBot', name: 'MyEchoBot' },
  conversation: { id: 'EI195KgcTvxFDU8GUXQNjj' },
  text: '2: You said Me no americano',
  attachments: [],
  entities: [],
  replyToId: 'EI195KgcTvxFDU8GUXQNjj|0000002' } +133ms
  botium-connector-directline3 Posted activity, assigned ID  EI195KgcTvxFDU8GUXQNjj|0000002 +224ms
ERROR: Expected <2: You said Me no americano>, got <1: You said Start>
  botium-connector-directline3 Stop called +1ms
  botium-connector-directline3 Clean called +1ms
READY

It seems Botium is sending and receiving the messages correctly, but the assertion is kind of weird. The assert is not performed on the messages it was intended to do:
ERROR: Expected <2: You said Me no americano>, got <1: You said Start>

Multiple values

Is there any way I could possibly test for multiple conditions through one single "UserSaysText" or one single "WaitBotSaysText"?

I have a bot that follows a conversation tree and at each node there can be multiple inputs/outputs to the bot. If I write tests for all possible combinations, I'll easily be writing over a million different scripts. Is there a way to check for a array of string values instead of one single string in the conversation flow?

Thankyou

Test automation for a chatbot built with Dialogflow.

I have installed botium and configured with dialogue flow. I am able to run my chatbot with command line and got proper responses in the emulator by using this -> botium-cli emulator.

  1. What I have to do next?
  2. What is the use of botiumFluent.js?
  3. Can I have to write any test scripts in it?

Documentation for simplerest

Could you possibly give a small bit of documentation regarding the different capabilities for Simple rest and what each of them mean? I am new to using applications like postman and I need to test a chatbot.

Error: Cannot build docker containers: 'Cannot build docker containers:

Hi I am new in Botium

I am running sample project

const BotDriver = require('botium-core').BotDriver
const Capabilities = require('botium-core').Capabilities
const Source = require('botium-core').Source

function assert (expected, actual) {
if (!actual || actual.indexOf(expected) < 0) {
console.log(ERROR: Expected <${expected}>, got <${actual}>)
} else {
console.log(SUCCESS: Got Expected <${expected}>)
}
}
const driver = new BotDriver()
.setCapability(Capabilities.PROJECTNAME, 'Testmybot Sample Calculator')
.setCapability(Capabilities.FACEBOOK_API, true)
.setCapability(Capabilities.FACEBOOK_WEBHOOK_PORT, 3000)
.setCapability(Capabilities.FACEBOOK_WEBHOOK_PATH, 'facebook/receive')
.setCapability(Capabilities.FACEBOOK_SEND_DELIVERY_CONFIRMATION, false)
.setCapability(Capabilities.CLEANUPTEMPDIR, false)
.setSource(Source.GITURL, 'https://github.com/codeforequity-at/testmybot-sample-calculator.git')
.setSource(Source.GITPREPARECMD, 'npm install')
.setCapability(Capabilities.STARTCMD, 'node index.js')
.setEnv('NODE_TLS_REJECT_UNAUTHORIZED', 0)
.setEnv('NODE_ENV', 'dev')
.setEnv('page_token', 'sample')
.setEnv('verify_token', 'sample')

driver.BuildFluent()
.Start()
.UserSaysText('start')
.WaitBotSaysText((text) => assert('I can do a very advanced scientific calculations for you ("Addition").', text))
.WaitBotSaysText((text) => assert('Please tell me the first number!', text))
.UserSaysText('1')
.WaitBotSaysText((text) => assert('Please tell me the second number!', text))
.UserSaysText('1')
.WaitBotSaysText((text) => assert('1 + 1 = 2', text))
.WaitBotSaysText((text) => assert('Is this correct ?', text))
.UserSaysText('yes')
.WaitBotSaysText((text) => assert('I know.', text))
.Stop()
.Clean()
.Exec()
.then(() => {
console.log('READY')
})
.catch((err) => {
console.log('ERROR: ', err)
})

When In run using command prompt through :node botiumFluent.js
I Got below Error

ERROR: Error: Cannot build docker containers: 'Cannot build docker containers: Error: docker-compose failed: { Error: spawn docker-compose ENOENT\n at exports._errnoException (util.js:1018:11)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)\n at onErrorNT (internal/child_process.js:367:16)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickCallback (internal/process/next_tick.js:104:9)\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: 'spawn docker-compose',\n path: 'docker-compose',\n spawnargs: \n [ '-p',\n 'Testmybot-Sample-Calculator',\n '-f',\n '/Users/Mukesh/botium/botiumwork/Testmybot-Sample-Calculator-20180410-193501-PTf3w/docker-compose.botium.yml',\n '-f',\n '/Users/Mukesh/botium/botiumwork/Testmybot-Sample-Calculator-20180410-193501-PTf3w/fbmock/docker-compose.fbmock.yml',\n '-f',\n '/Users/Mukesh/botium/botiumwork/Testmybot-Sample-Calculator-20180410-193501-PTf3w/docker-env.yml',\n 'build' ] }\n at ChildProcess. (/Users/Mukesh/botium/node_modules/botium-core/dist/botium-cjs.js:1338:18)\n at emitOne (events.js:96:13)\n at ChildProcess.emit (events.js:188:7)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12)\n at onErrorNT (internal/child_process.js:367:16)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickCallback (internal/process/next_tick.js:104:9)'
at /Users/Mukesh/botium/node_modules/botium-core/dist/botium-cjs.js:2867:25
at /Users/Mukesh/botium/node_modules/async/dist/async.js:3874:9
at /Users/Mukesh/botium/node_modules/async/dist/async.js:473:16
at iterateeCallback (/Users/Mukesh/botium/node_modules/async/dist/async.js:976:17)
at /Users/Mukesh/botium/node_modules/async/dist/async.js:958:16
at /Users/Mukesh/botium/node_modules/async/dist/async.js:3871:13
at /Users/Mukesh/botium/node_modules/botium-core/dist/botium-cjs.js:2861:15
at process._tickCallback (internal/process/next_tick.js:109:7)

does Docker required to run Botium?

Does botium core support amazon lex chatbot ?

#41 Not sure which should I use botium-core, botium-cli or testmybot to do tests on my amazon lex chatbot, but it seems none of them support it. Also does Botium perform end-to-end tests or is jut UI ?

Move Dialogflow connector to separate Botium plugin

When I follow the guide to install botium-core, the following command fails on installing grpc 1.7.3:
npm install --save botium-core

The main error is:
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-linux-x64-glibc.tar.gz

After that it tries to compile from source, which of course fails:

In file included from ../deps/grpc/src/core/lib/channel/channel_stack.c:19: ../deps/grpc/src/core/lib/channel/channel_stack.h:38:10: fatal error: grpc/grpc.h: No such file or directory #include <grpc/grpc.h> ^~~~~~~~~~~~~ compilation terminated.

If I manually follow the link to the binary, I indeed get a 403. I'm completely baffled here. How can the install depend on a private component from Google? This can never work, or the installation guide is missing a critical piece of information.


This is the complete error:
`npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.

[email protected] install /home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-linux-x64-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-linux-x64-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/build'
make: Entering directory '/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/build'
CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
rm: cannot remove './Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw': No such file or directory
make: *** [grpc.target.mk:399: Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
make: Leaving directory '/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/build'
CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.16.11-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"
gyp ERR! cwd /home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Linux 4.16.11-1-ARCH
node-pre-gyp ERR! command "/usr/bin/node" "/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc
node-pre-gyp ERR! node -v v10.2.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc' (1)
CC(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.onstall script
In file included from ../deps/grpc/src/core/lib/channel/channel_stack.c:19:
../deps/grpc/src/core/lib/channel/channel_stack.h:38:10: fatal error: grpc/grpc.h: No such file or directory
#include <grpc/grpc.h>
^~~~~~~~~~~~~
compilation terminated.
make: *** [grpc.target.mk:399: Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o] Error 1
make: Leaving directory '/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.16.11-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"
gyp ERR! cwd /home/anne-ah/workspace/botium/node_modules/google-gax/node_modules/grpc
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
`

git returned error code 128

I am executing Sample Project with Sample code available
But getting Error "git returned error code 128"
Code:
const BotDriver = require('botium-core').BotDriver
const Capabilities = require('botium-core').Capabilities
const Source = require('botium-core').Source

function assert (expected, actual) {
if (!actual || actual.indexOf(expected) < 0) {
console.log(ERROR: Expected <${expected}>, got <${actual}>)
} else {
console.log(SUCCESS: Got Expected <${expected}>)
}
}

const driver = new BotDriver()
.setCapability(Capabilities.PROJECTNAME, 'core-CreateNewConversation')
.setCapability(Capabilities.BOTFRAMEWORK_API, true)
.setCapability(Capabilities.BOTFRAMEWORK_APP_ID, 'my microsoft app id')
.setCapability(Capabilities.BOTFRAMEWORK_CHANNEL_ID, 'facebook')
.setCapability(Capabilities.CLEANUPTEMPDIR, false)
.setSource(Source.GITURL, 'https://github.com/Microsoft/BotBuilder-Samples.git')
.setSource(Source.GITDIR, 'Node/core-CreateNewConversation')
.setSource(Source.GITPREPARECMD, 'npm install')
.setCapability(Capabilities.STARTCMD, 'npm start')
.setEnv('MICROSOFT_APP_ID', 'my microsoft app id')
.setEnv('MICROSOFT_APP_PASSWORD', 'my microsoft app password')
.setEnv('NODE_DEBUG', 'botbuilder')
.setEnv('DEBUG', '*')

driver.BuildFluent()
.Start()
.UserSaysText('hi bot')
.WaitBotSaysText((text) => assert('You've been invited to a survey! It will start in a few seconds...', text))
.WaitBotSaysText(null, 10000, (text) => assert('Hello... What's your name?', text))
.UserSaysText('John')
.WaitBotSaysText((text) => assert('Hi John, How many years have you been coding?', text))
.UserSaysText('5')
.WaitBotSaysText((text) => assert('What language do you code Node using?', text))
.UserSaysText('CoffeeScript')
.WaitBotSaysText((text) => assert('Got it... John you've been programming for 5 years and use CoffeeScript.', text))
.Stop()
.Clean()
.Exec()
.then(() => {
console.log('READY')
})
.catch((err) => {
console.log('ERROR: ', err)
})

My Error:
iMaheshwari-4:botium Mukesh$ node botiumFluent.js
ERROR: Error: git returned error code 128
at ChildProcess. (/Users/Mukesh/botium/node_modules/botium-core/dist/botium-cjs.js:1330:18)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:891:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
iMaheshwari-4:botium Mukesh$

Allow continuation of tests when bot does not answer one testcase

Currently, it seems that when a script runs and the bot does not give an answer to one of the testcases ( i.e. returns "bot says nothing", see

this.provider.scriptingEvents.fail(`${this.header.name}/${convoStep.stepTag}: bot says nothing`)
), the entire testsuite is stopped . I would actually like the remaining testcases to still be executed.

It would be a nice enhancement if this behaviour could be parameterized somehow. My own effort to write a custom fail(err) handler did not really work out. I would be willing to contribute and submit a patch if someone could point me in the right direction of how to approach this (I must admit I'm not well-versed in javascript nor node.js).

Dialog flow test with Botium

Hi, how can I test dialog flow (watson conversation bot) with Botium-cli when I have context variables? If I set context var value at a parent level I want to verify the dialog flow.

Extend Dialogflow connector to support context/session/language

I need to test a chatboat application similar to google assistant. When we send request from our botium, we're sending a simple AIRequest object while in the API.API library we can set multiple parameters like the Context, Lang, Session etc... is that something that we can do with Botium ?

Using boolean literals in default values for docker-compose.yml leads to build errors

It seems that we should not use boolean literals (true, false) in docker-compose yaml configuration files. If we do so (like here)
docker-compose will yield an error:

botium-ProcessUtils Running Command: docker-compose -p core-CreateNewConversation -f /opt/botium/node_modules/botium-core/samples/botframework/botiumwork/core-CreateNewConversation-20180423-121846-Co3Q1/docker-compose.botium.yml -f /opt/botium/node_modules/botium-core/samples/botframework/botiumwork/core-CreateNewConversation-20180423-121846-Co3Q1/botframeworkmock/docker-compose.botframeworkmock.yml -f /opt/botium/node_modules/botium-core/samples/botframework/botiumwork/core-CreateNewConversation-20180423-121846-Co3Q1/docker-env.yml down +1ms
  botium-ProcessUtils docker-compose STDERR: The Compose file '/opt/botium/node_modules/botium-core/samples/botframework/botiumwork/core-CreateNewConversation-20180423-121846-Co3Q1/docker-env.yml' is invalid because:
  botium-ProcessUtils services.botium.environment.IS_BOTIUM_CONTAINER contains true, which is an invalid type, it should be a string, number, or a null

I would suggest to replace IS_BOTIUM_CONTAINER: true by IS_BOTIUM_CONTAINER: 'true' instead.

[SimpleRestContainer] Remove body encoding

Hey,

Using your project I noticed that the SimpleRestContainer (src/containers/SimpleRestContainer.js) had a strange behavior building the request : the message was encoded using the encodeURIComponent() method for both the URI and the body, which is not useful and led all my tests to fail. I have modified the container to avoid this on a fork, should I ask for a pull request ?

Thanks,

Re-using data from bot responses

I would like to create a test case where I reuse data sent back by the bot.

For example, let's say I ask the bot to create an issue on the ticketing system and I then want to close it using the id created I need to access that variable:

create ticket
BOT SAYS : Sure thing! What type of ticket would you like to create?
INCIDENT
BOT SAYS : Sure! Please provide a description.
this chatbot rocks
BOT SAYS : Ticket has been created with the number INC0060245
delete ticket INC0060245
BOT SAYS: Ticket INC0060245 was deleted

Problem is being able to get this INC0060245 variable.

Another chatbot project, rivescript has a nice-ish way to address these problems. They basically store all the regexp groups in the context and allow the users to refer to them using tags to represent any regex group extracted in a user query:

+ i am (really|very|super) tired
- I'm sorry to hear that you are <star> tired.

I was wondering if there is any plan to add such a feature or how feasible it would be to implement it given the current code?

Thanks.

BaseContainer missing Clear method

Hey,

I think BaseContainer.js misses Clear() method, that's why after() method leads to the following error while running the tests : "

"after all" hook:
TypeError: botiumContext.container.Clear is not a function
"

how to use botium agent?

can u help with working with botium agent while running samples example watson conversation service

Any plans to support rich text/cards response validation

Microsoft Bot framework has multiple rich cards supported as response, do we have any options to validate the response content of rich cards.

And also is there any ways to validate the response from bot that is basically a button list?

Remove default setting: container mode "docker"

Container mode should be a required capability, not filled with any default. Botium should complain if no mode is selected. Samples for Botium and TestMyBot will have to be updated as well.

Dialogflow suport

Why is dialog flow not supported anymore?
Will stay like this permanently?

Botium emulator browser/console not able to capture button and cards from from fb

Hi,

I'm trying to use botium cli to record new conversations for my bot which replied back with fb buttons but emulator is not able to recognize this buttons.
In screenshots for botium-cli its shows that they are able recognize buttons and also in console screenshot shows a payload that is returned but for me its not coming.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.