Closed benmaidel closed 4 years ago
I agree that this would be a helpful feature. Unfortunately, I don't think that there is an "easy" way to achieve this. Main reason is that the particular "Check Behavior" function offered by the App includes a number of checks that rely on a complete model of the behavior, which requires most of the App's functionality (e.g., for resolving variables, verifying state interfaces, checking all possible execution paths for missing userdata).
Still, there would be some alternatives that appear to be more in reach and could already be helpful:
flexbe_testing
now also supports behavior tests. While this is meant to execute behaviors, the import_only
version is already enough to verify that all required states can be imported. I think this should be a must-have for behaviors in any CI pipeline.flexbe_ci
for an example), it should be possible to automate the "Check Behavior" button. I would still need to implement this, but it should be fairly easy.Does any of these options sound helpful to you?
@pschillinger thank's for your feedback. I've already suspected that it will go this way. We are already using the import_only
tests from flexbe_testing
and they help a lot. For your second solution I've prepared a PR https://github.com/FlexBE/flexbe_app/pull/55 with a draft solution. Would be great if you could take a look at it.
Thanks for already preparing a PR! I will take a look.
PR looked good, I just added a bit more error handling to prevent the App from crashing on invalid behaviors and merged it. In case you have any additions, feel free to re-open a PR.
I also changed the way how the report is parsed so that all behaviors are reported as separate tests and in case of failure, the error message generated by the App is shown by rostest.
Release with 2.2.4
@pschillinger Do you see any easy way to get the checkBehavior functionality from flexbe_app accessible from the command line? So we could do something like
rosrun flexbe_app check_behavior behavior_name
Background: We'd like to add the checkBehavior feature from flexbe_app to the rostest pipeline.