You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was hoping to find a test suite that I could use to figure out how to add unit tests to my own automations, but it looks like there aren't any tests for this? Please correct me if I'm missing something there.
I would be interested in contributing to tests but I wanted to see if the core developers had any ideas for how they'd want this to be implemented or plans already in place, so I don't waste time going in a direction that wouldn't be accepted in a PR
The text was updated successfully, but these errors were encountered:
Yes, this is something I have thought about without coming to any specific conclusions - AD is essentially a one man development effort, with assistance from other fine people, and testing has never bubbled up high enough in the priority stack to put significant time into.
There are 2 areas I am thinking of, the first being a framework for testing apps, the second would be testing of AD itself.
Testing of AD would break down into 3 areas at least:
Unit Testing
Integration Testing
Regression testing
Of these, I tend to care more regression testing the most, however that is the hardest to really make traction with as we would need test harnesses for HASS and MQTT to do this meaningfully. Not impossible but not trivial. Fort what it's worth, we have stubbed out testing in our CI/CD pipeline which would be the place to build this out.
In addition, a long time ago I added time travel in AD which would allow AD to be started at a specific time and run for a specific time, faster than real time which I always planned to use to assist with testing.
For APP testing, again, I am not sure what this might look like. I know that people have previously built harnesses to help with this, but again, to do this meaningfully would probably need harnesses for HASS and MQTT.
I have speculated that you could do this with MQTT discovery creating devices for HASS that you could then control with other apps - this works well for building devices in AD so I am confident this approach would work, but would take some effort.
So, that's where I am at - if you have ideas for how we could approach this and develop a framework, I am very interested in discussing further - it's probably the sort of thing we would want to throw around a little, so I would encourage you to drop into our discord channel (link is in the docs) and maybe we can come up with some ideas, so that if you are interested in putting something together we can fast track it, I'm always a lot happier to merge PRs when I know what they are and have understood them ahead of time.
Is there an existing feature request for this?
Your feature request
I was hoping to find a test suite that I could use to figure out how to add unit tests to my own automations, but it looks like there aren't any tests for this? Please correct me if I'm missing something there.
I would be interested in contributing to tests but I wanted to see if the core developers had any ideas for how they'd want this to be implemented or plans already in place, so I don't waste time going in a direction that wouldn't be accepted in a PR
The text was updated successfully, but these errors were encountered: