FlexBE / flexbe_app

The classic user interface (editor + runtime control) for the FlexBE behavior engine. See the flexbe_webui for latest
BSD 3-Clause "New" or "Revised" License
48 stars 49 forks source link

checkBehavior as command line tool #54

Closed benmaidel closed 4 years ago

benmaidel commented 4 years ago

@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.

pschillinger commented 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:

Does any of these options sound helpful to you?

benmaidel commented 4 years ago

@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.

pschillinger commented 4 years ago

Thanks for already preparing a PR! I will take a look.

pschillinger commented 4 years ago

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.

pschillinger commented 4 years ago

Release with 2.2.4