[Documentation] [TitleIndex] [WordIndex

New in Diamondback

  Show EOL distros: 

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | rosdep | rosemacs | roslang | roslib | rosmake | rospack | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | roslang | roslib | rosmake | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | roslang | roslib | rosmake | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | roslang | roslib | rosmake | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | roslang | roslib | rosmake | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | roslang | roslib | rosmake | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | roslang | roslib | rosmake | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | roslang | roslib | rosmake | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | roslang | roslib | rosmake | rosunit

Package Summary

Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.

  • Maintainer status: maintained
  • Maintainer: Michel Hidalgo <michel AT ekumenlabs DOT com>, Jacob Perron <jacob AT openrobotics DOT org>
  • Author: Ken Conley, Dirk Thomas <dthomas AT openrobotics DOT org>
  • License: BSD
  • Bug / feature tracker: https://github.com/ros/ros/issues
  • Source: git https://github.com/ros/ros.git (branch: noetic-devel)

Overview

rosunit is an internal tool for running unit tests within ROS. While it can be run by a regular user, most users will generally use rosunit indirectly via rosbuild test macros. The main feature that rosunit provides is terminating a unit test based on a timeout and generating an appropriate test failure. The rosbuild system uses this feature to ensure that unit tests properly terminate.

rosunit currently supports:

The library that comes with rosunit can be used as described at unittest#Code-level_Python_Unit_Tests

Usage

$ rosrun rosunit rosunit -h

Usage: rosunit [options] <file> [test args...]

Options:
  -h, --help            show this help message and exit
  -t, --text            Run with stdout output instead of XML output
  --time-limit=TIME_LIMIT
                        Set time limit for test
  --name=TEST_NAME      Test name

Helper Scripts

These helper scripts are intended for use only by the rosbuild and test reporting infrastructure.

clean_junit_xml.py

check_test_ran.py <test-file.xml>

check_test_ran.py --rostest <pkg-name> <test-file.xml>

summarize_results.py <package>

test_results_dir.py

pycoverage_to_html.py

Roadmap

Historically, rosunit is based on a refactoring of rostest. It provides the unit-test infrastructure and rostest provides the integration test infrastructure. rostest is also allowed to interact with a running ROS graph.

The initial separation was not perfect. There is more room to migrate more code from rostest into rosunit. Similarly, there is code within rosunit that would be better supported by a graph-less version of roslaunch, i.e. a process monitor unattached to a ROS master. Until that happens, rosunit contains code that is a copy of internal libraries within roslaunch.


2023-10-28 13:01