botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Nodejs automated tests

Open hgjkant opened this issue 10 years ago • 2 comments

Hi, is it currently possible to do automated tests on a bot? I.e. passing a string to a bot and inspecting the result, like done in the TextBot tests?

bot.processMessage({ text: 'hello' }, function (err, reply) {
    assert(reply && reply.text == 'Hello World');
    done();
});

hgjkant avatar Jul 14 '16 12:07 hgjkant

Yes... look at the updated mocha tests. You just need a way to pass the ConsoleConnector into your bot so you may have to export a test function that your test harness can call to initialize the bot with a different connector.

Stevenic avatar Aug 05 '16 01:08 Stevenic

Thank you very much

hgjkant avatar Aug 05 '16 13:08 hgjkant