Testing and mocking

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
perbu
Posts: 9
Joined: Thu Mar 26, 2020 7:34 am

Testing and mocking

Post by perbu » Thu Mar 26, 2020 7:52 am

Hi.

I'm reasonably new with micropython. So far it has been a pleasant experience and I've got my first devices deployed after only a short time. :D

I'm used to working more or less test-driven and I'm very fond of pytest. So naturally I've been searching for test and mocking frameworks for micropython. Are there any? Ideally I want mock the externals modules and hardware I need and run the tests on the Unix port of Micropython. Running the tests on the MCU itself is not really a priority for me atm.

Any tips?

Per.

perbu
Posts: 9
Joined: Thu Mar 26, 2020 7:34 am

Re: Testing and mocking

Post by perbu » Sat Mar 28, 2020 11:20 am

This seems to be a surprisingly narrow topic. For me this is surprising, because the opportunity to test if for me one of the big driver for micropython.

Anyways, if anyone else should stumble on the thread my best advice would be to start out with @ToddFBass ESP32 Machine Emulator - https://github.com/tflander/esp32-machine-emulator

It seems to cover most of my needs, at least.

stijn
Posts: 735
Joined: Thu Apr 24, 2014 9:13 am

Re: Testing and mocking

Post by stijn » Sat Mar 28, 2020 1:02 pm

Some previous discussion: viewtopic.php?f=2&t=7376

Post Reply