I try to test my flows by running them in a "simulation mode", i.e. injecting same type of data as it later will receive live. For specific needs, specifically for flows built for "long term" data collection, I have also configured the logic as a simulator allowing me to test the logic with data injections at higher rate to check if the logic gives the expected result
Apart from this I'm continuously testing that "everything in my system is working as expected". But maybe this is more a topic of Monitoring?
Anyway, this is how I thought when I built & configured my system;
Node-RED is the master of my relatively complex & distributed system, today comprising 7 RPi's, 1 Jetson Nano and 1 Lenovo laptop. In addition to Node-RED, I have a number of external services and applications running in all of them. Communication between all is mainly utilizing MQTT
My "Main" Node-RED instance is monitoring the others as well as all the various services (mostly written in Python) and applications; means some commands are sent out regularly and a certain qualified response back is expected (kind of heartbeat). If the "heartbeat" stops, a restart of the service or app is first initiated. If this should fail, the targeted device will keep rebooting until the service is back and operational. If "anything" should go wrong with Node-RED itself, I trust systemd to handle the restart. To notify myself that something is not functional, I use Telegram to provide me with details of the failed service or application. When "everything" is up running again, I get a final "All systems go" notification. This setup has worked very well, things has sometimes stopped working but they have always recovered correctly. So far, so good.
Why so many devices? Well, mainly it is about distance and location; my distributed video system setup has 4 wifi connected RPi's with 2 USB cameras in each. I could throw them all out and buy new wifi ip cameras, but hey, they are all working pretty well as they are. Then I run the video analytics in the Jetson Nano, the laptop handles the video storage. Some of the other RPi's are justified simply because it is easier to use wifi instead of installing new wires. Thats about it.