Comments (8)
Why not try the following:
[
{
out: "schedule a meeting"
},
{
in: "Who will be attending?",
},
{
out: "blah blah"
},
{
in: "I didn't understand that"
},
// and so on
];
from alarm-bot-unit-testing.
Hey, as I said it's not going to test actual logic to determine if "blah blah" is person name. Its purely write your expected and unexpected array & BotTester to process your test array and no logical testing.
In my case when user says 'John' I am using MS graph to resolved it to my closest John in the network.
from alarm-bot-unit-testing.
@morsh , Is this project just about unit testing of alarm-bot ? or this project does have alarm-bot capabilities along with unit testing ? I'm confused because I looked in bot.js which has real dialogs like
help, set_alarm and are you unite testing those with arrays from [../dialog/flows..] directories.
Sorry If I'm unclear but in my project I have a following dialog which is triggered by LUIS.
var builder = require('botbuilder');
module.exports = function(bot) {
bot.dialog('Help', function (session) {
builder.Prompts.text(session, `I can help you to schedule a meeting, reschedule or cancel
existing);
session.endDialog();
}).triggerAction({
matches: 'Help'
});
}
in order to follow according to alarm-bot-unit-testing I had to create bot.js and recreate same dialog in bot.js. even though my projects existing app.js file has all root dialogs,cortana default dialogs etc. So I wonder if bot.js from alarm-bot-unit-testing is actually a test dialog file.
from alarm-bot-unit-testing.
@rjgmail88 - in order to test the dialog, you need to abstract the dialog logic from the code connecting this logic to the bot framework service.
For this you need to implement an app.js + bot.js in a similar way like the sample.
Notice: this is an old sample using botbuilder version < 4.0, and is mainly used as a reference on how to add unit tests to a bot application.
from alarm-bot-unit-testing.
Thanks @morsh . Do you have any latest example anywhere I can refer to. I implemented my testing same was as this project does but, i feel LUIS mock isnt working. My test runs even though I comment luis-mock.js file.
from alarm-bot-unit-testing.
@rjgmail88 - sorry, but I don't know any other repos/articles regarding testing of bots.
from alarm-bot-unit-testing.
@morsh, do you have or know any similar testing capabilities for botbuilder v4 nodejs sdk ? I am looking for writing some unit tests for dialogs for my bot built in v4 node sdk.
from alarm-bot-unit-testing.
@rjgmail88 - sorry, but I no longer maintain this repo
from alarm-bot-unit-testing.
Related Issues (3)
- test case HOT 1
- HeroCard Actions with button HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alarm-bot-unit-testing.