Giter Site home page Giter Site logo

Testing Botkit Blocks about botkit HOT 12 CLOSED

howdyai avatar howdyai commented on July 30, 2024
Testing Botkit Blocks

from botkit.

Comments (12)

amplicity avatar amplicity commented on July 30, 2024 7

My team has created a mock for mocking botkit conversations. We have been using that internally for automated testing with mocha. We're running some checks to see how fit it would be for botkit as a whole..will cycle back and push a fork if it's applicable.

from botkit.

amplicity avatar amplicity commented on July 30, 2024 6

@nikbora As referenced above, our team has been internally using a mock solution to test botkit conversations and api responses.

I've uploaded our mock and some test examples to the repo below. hope this is helpful!

https://github.com/amplicity/BotMock

from botkit.

RafaelCosman avatar RafaelCosman commented on July 30, 2024

@ghostsquad We don't have any system for testing yet -- would you be interested in submitting a PR with one?

from botkit.

ghostsquad avatar ghostsquad commented on July 30, 2024

How did you test Botkit? manual testing?

from botkit.

anonrig avatar anonrig commented on July 30, 2024

You can mock the Slacks API responses and make Botkit think that it is connecting with Slack @ghostsquad

from botkit.

RafaelCosman avatar RafaelCosman commented on July 30, 2024

@ghostsquad we don't yet have a solid testing system for Botkit and would love help implementing one. We do have a couple of tests. For example, we test storage modules using storage/storage_test.js.

from botkit.

karlbright avatar karlbright commented on July 30, 2024

It should be noted that storage options are now in separate repos/modules and have tests using stubs etc against them.

from botkit.

 avatar commented on July 30, 2024

I think the best way is to use a web-token and code some command issuing layer over some like slack-cli slack client for command line. We can catch answers from bot, we can speak in different ambients, and also it's not need to fake each crucial function nor objects. I just was reading a test for an hour, that is using near to 4 libraries, and I had to do a lot of effort to understand just a % of the whole testing scripts. What do you think?

from botkit.

wagmiwiz avatar wagmiwiz commented on July 30, 2024

Hey guys, I too am curious as to what people are doing to automatically test their bot/conversation logic, other than connecting it to Slack and manually interacting with it.

Does anyone have example code with a mocked up Slack API or a mocked up conversation object used in automated tests?

from botkit.

 avatar commented on July 30, 2024

I've got it! I am using nightmare, it works like a charm. But need coding.

from botkit.

wagmiwiz avatar wagmiwiz commented on July 30, 2024

@amplicity that sounds cool, looking forward to it. Feel free to share your process even if you don't think it belongs inside of botkit, perhaps via another repo or a blog post.

from botkit.

peterswimm avatar peterswimm commented on July 30, 2024

moving discussion over here #850

from botkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.