rsmp-nordic / rsmp_validator

Official RSMP Nordic automated test tool, build with Ruby and Rpec.
https://rsmp-nordic.github.io/rsmp_validator/
MIT License
4 stars 1 forks source link

Testing supervisors #401

Open emiltin opened 1 month ago

emiltin commented 1 month ago

The validator has a the capability to run tests against supervisor.

However there only a few test included so far, convering connection sequence and aggregated status. The reason is that when testing a supervisor, the validator acts as a site. In RSMP the supervisor initiates all commands, status request, etc. so there's not much the validador can initiate to perform testing. For example, we don't have a way to make the supervisor send commands.

There might be a few more things we can do, e.g raising alarms.

But to test commands and build a more comprehensive test suite, we would need a way to trigger specific actions in the supervisor, e.g. sending commands.

I don't think this is possible with the current version of RMSP core directly.

We we could perhaps use (abuse?) a status message to indicate to the supervisor that it should send specific commands, so we can test the flow. But it would be a bit of a hack.

Another option would be to add new message types to core for supporting testing and debugging.

RSMP 4 is expected to be build in top of MQTT, which has no inherent concept of server/client. Everything connects to the central broker. Current idea is to allow any site to implement both sites and SXL (modules). So a supervisor system could implement command interface for triggering test flows. See https://github.com/rsmp-nordic/rsmp_core_v4 for more on RMSP 4.

emiltin commented 2 weeks ago

Alarms could be tested to some degree, since they are triggered by the site.