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

[Question] How to write unit tests for simple bot applications

Open krishan1kamal opened this issue 9 years ago • 9 comments

I am new to creating bot application using Luis. i want to write the unit test cases for simple bot application using Luis. I already gone through the examples and spend a lot of time on this to understand the test cases which are given in this website.Still didn't understand anyone.Can anyone please give me the very simple test case for bot application using Luis for understanding purpose. I am using nodejs

krishan1kamal avatar Nov 19 '17 12:11 krishan1kamal

Hi @krishan1kamal,

Do you want to test communication between LUIS App and your bot or how your bot handles LUIs results? We have several tests in this section: https://github.com/Microsoft/BotBuilder-v3/tree/master/Node/core/tests

There are several frameworks for unit testing out there being Mocha a very popular one: https://github.com/mochajs/mocha https://stackoverflow.com/questions/4308786/what-is-the-best-testing-framework-to-use-with-node-js

What is the scenario of your application? What kind of bot you want to build? Can you share some code so we can have an idea of your scope?

Cheers, Francisco

FranciscoPonceGomez avatar Nov 20 '17 19:11 FranciscoPonceGomez

Error: Dialog[/common] already exists in library[*].

I am getting this error

krishan1kamal avatar Nov 21 '17 06:11 krishan1kamal

@bilby91 didn't you write a testing framework for bots in node?

JasonSowers avatar Nov 21 '17 21:11 JasonSowers

Hey!

@JasonSowers We ended up using and contributing in BotTester. I highly recommend it! We are using it at Suttna for all our integration tests.

bilby91 avatar Nov 21 '17 21:11 bilby91

Great, thanks for the info and recommendation!

JasonSowers avatar Nov 21 '17 21:11 JasonSowers

Closing the issue assuming it as resolved. Feel free to reopen if the issue persists.

fanidamj-zz avatar Jan 04 '18 22:01 fanidamj-zz

Hi @FranciscoPonceGomez can you check the link which you have mentioned, seems like it has been broken. Thanks in advance

Edwardfelix08 avatar Mar 22 '19 13:03 Edwardfelix08

@Edwardfelix08 The Bot Builder V3 node sdk tests are here now: https://github.com/Microsoft/BotBuilder-v3/tree/master/Node/core/tests

EricDahlvang avatar Mar 22 '19 15:03 EricDahlvang

@EricDahlvang Thanks.

Edwardfelix08 avatar Mar 25 '19 07:03 Edwardfelix08