Size: 2579
Comment:
|
Size: 2594
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 18: | Line 18: |
Usage: rosunit [options] <file> | Usage: rosunit [options] <file> [test args...] |
Show EOL distros:
Package Summary
Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.
- Author: Ken Conley
- License: BSD
- Repository: ros
- Source: svn https://code.ros.org/svn/ros/stacks/ros/tags/ros-1.4.10
Package Summary
Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.
- Author: Ken Conley
- License: BSD
- Repository: ros
- Source: svn https://code.ros.org/svn/ros/stacks/ros/tags/ros-1.6.9
Package Summary
Unit-testing package for ROS. This is a lower-level library for rostest and handles unit tests, whereas rostest handles integration tests.
- Author: Ken Conley
- License: BSD
- Source: git https://github.com/ros/ros.git (branch: ros-1.8)
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: Dirk Thomas <dthomas AT osrfoundation DOT org>
- Author: Ken Conley
- License: BSD
- Bug / feature tracker: https://code.ros.org/trac/ros/query?status=assigned&status=new&status=reopened&component=ros&order=priority
- Source: git https://github.com/ros/ros.git (branch: groovy-devel)
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: Dirk Thomas <dthomas AT osrfoundation DOT org>
- Author: Ken Conley
- License: BSD
- Bug / feature tracker: https://github.com/ros/ros_comm/issues
- Source: git https://github.com/ros/ros.git (branch: hydro-devel)
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: Dirk Thomas <dthomas AT osrfoundation DOT org>
- Author: Ken Conley
- License: BSD
- Bug / feature tracker: https://github.com/ros/ros/issues
- Source: git https://github.com/ros/ros.git (branch: indigo-devel)
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: Dirk Thomas <dthomas AT osrfoundation DOT org>
- Author: Ken Conley
- License: BSD
- Bug / feature tracker: https://github.com/ros/ros/issues
- Source: git https://github.com/ros/ros.git (branch: jade-devel)
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: Dirk Thomas <dthomas AT osrfoundation DOT org>
- Author: Ken Conley
- License: BSD
- Bug / feature tracker: https://github.com/ros/ros/issues
- Source: git https://github.com/ros/ros.git (branch: kinetic-devel)
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: Dirk Thomas <dthomas AT osrfoundation DOT org>
- Author: Ken Conley
- License: BSD
- Bug / feature tracker: https://github.com/ros/ros/issues
- Source: git https://github.com/ros/ros.git (branch: kinetic-devel)
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: Dirk Thomas <dthomas AT osrfoundation DOT org>
- Author: Ken Conley
- License: BSD
- Bug / feature tracker: https://github.com/ros/ros/issues
- Source: git https://github.com/ros/ros.git (branch: melodic-devel)
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)
Contents
Overview
rosunit provides tools for running unit tests within ROS. It currently supports:
- gtest
Python unittest (via rostest wrappers)
The main consumer of rosunit are various rosbuild CMake macros as well as test reporting infrastructure. The rosbuild system uses rosunit to ensure that unit tests properly terminate.
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
-t, --text
- Runs a gtest-compatible executable inside of a process monitor. If the test does not succeed within the time limit (default 1 minute), the test is killed and marked as a failure. Executable is not run within a ROS graph.
--name
Set test name. Test name defaults to name of executable. This option should be set when running wrapped tests, e.g. with python.
--time-limit
- Time limit for test.
Helper Scripts
clean_junit_xml.py
Aggregate test results in test_results/_hudson, stripping any characters that cause Hudson trouble.
check_test_ran.py <test-file.xml>
check_test_ran.py --rostest <pkg-name> <test-file.xml>
Look for test results file. If none exists, write new test results file that indicates test failure. If the --rostest option is passed in, it will use rostest's filename-generation scheme to look or the correct test file.
summarize_results.py <package>
- Summarize test results for a single package.
test_results_dir.py
- Print the directory that test results are written to.
pycoverage_to_html.py
Generate HTML versions of coverage.py test results.
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.