To run non-ROS pytest via Catkin

asked 2021-09-23 08:48:45 -0500

130s gravatar image

updated 2021-09-23 09:12:33 -0500

Is there a way to run pytest-based, non-ROS test cases (so that I don't need rostest) via Catkin?

  • Ideally, I'm hoping there's something equivalent of catkin_add_nosetests (docs.ros.org) that runs unittest/nosetest-based, non-ROS or ROS-based tests via Catkin.
  • Alternatively, if there isn't such a one-stop solution, I'm open for workaround.
    • I know colcon, the next gen build tool, supports pytest built-in. I'm interested in that direction but I also have userbase that are stuck with Catkin.

ros_pytest provides a way to run rostest for the test cases that are built on pytest framework. That is nice, but not all tests should require ROS. I want to utilize Catkin's feature to run the tests in all federated packages for both ROS-based and non-ROS-based test cases.

edit retag flag offensive close merge delete

Comments

@machinekoder care to chime in?

130s gravatar image 130s  ( 2021-09-23 09:13:25 -0500 )edit

You should be able to run the tests also with the pytest runner. It doesn't matter if the test source code contains ROS specific stuff or not.

machinekoder gravatar image machinekoder  ( 2021-12-24 05:39:11 -0500 )edit