You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please guide me what file i need to create inside my test directory and how to configure that file inside package.json file script i am new in testing
This is a very broad and opinionated question that should be decided by the dev. As long as you install the package with npm install --save bot-tester or yarn add bot-tester you should be good to go. Just import and used as described in the docs. I'd recommend cloning this repo and running the tests yourself to see how to make it work.
An additional question, what test runner are you using (e.g. mocha + chai, jasmine, etc ...)?
return new BotTester(bot)
.sendMessageToBot("Hi", "How can I help you. You can say things like : \n\n\- I need to check my leave balance \n\n\- Apply for leave\n\n\ or\n\n- How do I set my goals\n\n- Who can I talk to about performance management")
.runTest();
});
it('I need to check my leave balance', () => {
return new BotTester(bot)
.sendMessageToBot("I need to check my leave balance","Hello, I'm Vera your virtual HR Helpdesk bot. You can say things like :- I need to check my leave balance - Apply for leave or - How do I set my goals - Who can I talk to about performance management")
.runTest();
});
Summary: it is failing because you're not sending a response/the response is incorrect.
Actions you can take to verify: try this in the console or in an emulator and see what happens
longer answer:
This means that your bot is not handling the input correctly. You have sent it the message Hi and it is expecting How can I help you. You can say things like : \n\n\- I need to check my leave balance \n\n\- Apply for leave\n\n\ or\n\n- How do I set my goals\n\n- Who can I talk to about performance management as a response.
Instead you did not send a response or the response you have sent is empty (that's why its undefined).
I cannot give you any further input without knowing the code driving your bot.
For future submissions, please apply formatting for ease of reading and understanding.
Hi @microsoftly Thanks for your support
I am getting adaptive card response in json how can i check that this is correct response or not please help
..[application/vnd.microsoft.card.adaptive].................
{"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","type":"AdaptiveCard","body":[{"type":"TextBlock","text":"Sure, I can help you with that. Let me ask
few quick questions to help you with that.","weight":"bolder","size":"medium","isSubtle":true,"color":"default","horizontalAlignment":"default","wrap":true},{"type":
"TextBlock","text":"Enter Full Name","weight":"bolder","size":"medium","isSubtle":true,"color":"default","horizontalAlignment":"default","wrap":true},{"type":"Input.
Text","id":"name","isRequired":true,"placeholder":"full name"},{"type":"TextBlock","text":"Enter EmployeeId","weight":"bolder","size":"medium","isSubtle":true,"color
":"default","horizontalAlignment":"default","wrap":true},{"type":"Input.Text","id":"employeeId","isRequired":true,"placeholder":"employee Id"}],"actions":[{"type":"A
ction.Submit","title":"Submit"}]}
I am getting error please help
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
The error is telling you exactly what is happening. The test is timing out. You're either not returning a promise, not calling done, or your expected response is never returned
Hi @microsoftly its mocha timeout i have done with it thanks for your support
how can i pass multiple adaptive card json? please help
I have a multiple adaptive card in chat bot if i put one adaptive card value other adaptive card is appear i want to validate all adaptive card
and one more thing i want to know from you how i pass value of adaptive card field as a message
please help
Activity
microsoftly commentedon Nov 20, 2017
Can you give me repro steps?
krishan1kamal commentedon Nov 20, 2017
Can you please guide me what file i need to create inside my test directory and how to configure that file inside package.json file script i am new in testing
microsoftly commentedon Nov 20, 2017
This is a very broad and opinionated question that should be decided by the dev. As long as you install the package with
npm install --save bot-testeroryarn add bot-testeryou should be good to go. Just import and used as described in the docs. I'd recommend cloning this repo and running the tests yourself to see how to make it work.An additional question, what test runner are you using (e.g. mocha + chai, jasmine, etc ...)?
krishan1kamal commentedon Nov 20, 2017
Thanks
krishan1kamal commentedon Dec 5, 2017
Hi microsoftly i am using mocha + chai
krishan1kamal commentedon Dec 5, 2017
AssertionError: expected [ Array(1) ] to include undefined i am getting error please help
below is my code
process.env.NODE_ENV = 'development';
import { BotTester, TestConnector } from 'bot-tester';
import * as testBot from '../botfactory/server.js'
const connector = new TestConnector();
describe('BotTester', () => {
testBot.start(['vera']);
let bot = testBot.bots.vera.bot ;
it('Hi', () => {
it('I need to check my leave balance', () => {
return new BotTester(bot)
.sendMessageToBot("I need to check my leave balance","Hello, I'm Vera your virtual HR Helpdesk bot. You can say things like :- I need to check my leave balance - Apply for leave or - How do I set my goals - Who can I talk to about performance management")
.runTest();
});
})
microsoftly commentedon Dec 5, 2017
Summary: it is failing because you're not sending a response/the response is incorrect.Actions you can take to verify: try this in the console or in an emulator and see what happenslonger answer:This means that your bot is not handling the input correctly. You have sent it the message
Hiand it is expectingHow can I help you. You can say things like : \n\n\- I need to check my leave balance \n\n\- Apply for leave\n\n\ or\n\n- How do I set my goals\n\n- Who can I talk to about performance managementas a response.Instead you did not send a response or the response you have sent is empty (that's why its undefined).
I cannot give you any further input without knowing the code driving your bot.
For future submissions, please apply formatting for ease of reading and understanding.
krishan1kamal commentedon Dec 6, 2017
Hi @microsoftly Thanks for your support
I am getting adaptive card response in json how can i check that this is correct response or not please help
..[application/vnd.microsoft.card.adaptive].................
{"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","type":"AdaptiveCard","body":[{"type":"TextBlock","text":"Sure, I can help you with that. Let me ask
few quick questions to help you with that.","weight":"bolder","size":"medium","isSubtle":true,"color":"default","horizontalAlignment":"default","wrap":true},{"type":
"TextBlock","text":"Enter Full Name","weight":"bolder","size":"medium","isSubtle":true,"color":"default","horizontalAlignment":"default","wrap":true},{"type":"Input.
Text","id":"name","isRequired":true,"placeholder":"full name"},{"type":"TextBlock","text":"Enter EmployeeId","weight":"bolder","size":"medium","isSubtle":true,"color
":"default","horizontalAlignment":"default","wrap":true},{"type":"Input.Text","id":"employeeId","isRequired":true,"placeholder":"employee Id"}],"actions":[{"type":"A
ction.Submit","title":"Submit"}]}
microsoftly commentedon Dec 6, 2017
At the moment, there is not adaptive card support. I will be working on it soon.
microsoftly commentedon Dec 7, 2017
@krishan1kamal Adaptive card support has been added.
#45
krishan1kamal commentedon Dec 7, 2017
Hi @microsoftly thanks for your support
how can i pass multiple adaptive card json? please help
microsoftly commentedon Dec 7, 2017
I do not understand the question. Please refer to the existing tests as reference
krishan1kamal commentedon Dec 8, 2017
I am getting error please help
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
microsoftly commentedon Dec 8, 2017
The error is telling you exactly what is happening. The test is timing out. You're either not returning a promise, not calling done, or your expected response is never returned
krishan1kamal commentedon Dec 8, 2017
Hi @microsoftly its mocha timeout i have done with it thanks for your support
how can i pass multiple adaptive card json? please help
I have a multiple adaptive card in chat bot if i put one adaptive card value other adaptive card is appear i want to validate all adaptive card
and one more thing i want to know from you how i pass value of adaptive card field as a message
please help
krishan1kamal commentedon Dec 12, 2017
Hi @microsoftly i have done with all question thanks for your support