Ros2_test_compose: a YAML-to-pytest generator for ROS2 integration testing

Hi everyone,

I’m a PhD student, and after a few years my codebase has grown quite a bit, spread across different git repos, Docker containers, and machines. I knew it would be good to add some tests to avoid regressions and losing work or features. However, writing unit tests alone as a student would probably cost me another year of my PhD.

So instead I went for integration tests, which are easier to write in a ROS environment and make more sense for a pipeline where the internal functions keep changing but the overall behavior should stay stable.

I know I could just write these with pytest directly, but that felt repetitive too, so I ended up building a package that generates pytest/launch_test suites from YAML files instead.

This package differs from ros2-easy-test in that you only write a description of the test, no Python code at all, which makes it much faster to write and modify tests.

I hope this package can be useful to some of you.

1 Like