Is there a way to do regression/unit/end-to-end tests of my whole configuration setup. I.e. simulating of sensor changes and then testing for expected outcomes?
1 Like
My first attempt at functional testing makes use of mqtt mock entities in place of my real zwave entities.
The test suite acts as an mqtt client, publishes test triggers and checks the responses from HA.
It’s a bit crude since it needs to flush retained mqtt messages when it first starts and sometimes has to yield to the paho network loop - which it does using python3 queue timeouts - but it works.
Here’s the testcase for my on-demand heating functions:
https://github.com/markferry/home-assistant-config/blob/dev/test/test_on_demand.py#L103