Open rjgmail88 opened 6 years ago
Hi, What do you mean by saying "re-writing the dialog"?
You can test a standalone dialog by specifying a dialog function or a watterfall in the form of array. The library produce a UniversalBot class instance and registers the given dialog with path = "/"
Also you could pass an instance of UniversalBot class. In that case, the library will not produce a testing bot instance. This option also allows to test conversation between user and the bot from end to end
best regards,
What did I mean 're-writing the dialog' In timmy.js in order to test bot's following responses dialog dialog('/') has been written in as follows. "bot": "How should I call you?" "bot": "Nice to meet you, \"Timmy\"!"
bot.dialog('/', [
session => builder.Prompts.text(session, 'How should I call you?'),
(session, response) => session.endDialog(`Nice to meet you, ${JSON.stringify(response.response)}!`)
]);
What am I asking ? How can I test Help dialog mentioned in my original post in my test case. Do I need to re-write the dialog in test case file ?
no, you don't no need to re-write, you could pass the same dialog
Is there a way you can help with the syntax.
@gudwin did you get chance to review my comment?
Yeah, I'm adding your case as example into the library. I'll commit a release soon and will leave comment here too
Hello, I am looking at timmy.js where I see in order to test conversation flow mentioned in script array a new dialog '/' has been defined. I was wondering what if I need to test my dialog from my Bot app.
Ex: I have following dialog which triggers by LUIS intent help/
I don't want re-write this dialog as shows in timmy.js.