whaleygeek / pyenergenie

A python interface to the Energenie line of products
MIT License
82 stars 51 forks source link

Better simulation/test environment #77

Open whaleygeek opened 8 years ago

whaleygeek commented 8 years ago

As most of my work is done when mobile, without hardware, I would like to improve the simulation/test environment so that I can do more representative testing when mobile.

In particular:

  1. ways to build active simulations or mocks of each device type, that have a very simple repeatable behaviour, injecting messages into the receive pipeline, and receiving messages from the transmit pipeline - perhaps connected via a radio_mock module, a simple software bus.
  2. the ability to use all these mocks in repeatable regression tests using unittest
  3. perhaps a version of the setup_tool or web_console, that can be run in parallel with a running mocked system, and drive the simulated device end of things, making it easy to tinker with specific scenarios.

The trigger for this was issue #75 which is as a result of not completely testing this specific mode of use (iterating the registry and interacting with the non connected objects) properly.