-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Launch-based Testing #161
Comments
On a first step, we will:
|
4 tasks
Basic testing functionality is provided by the |
hidmic
added
in progress
Actively being worked on (Kanban column)
and removed
ready
Work is about to start (Kanban column)
labels
Mar 7, 2019
29 tasks
hidmic
added
in review
Waiting for review (Kanban column)
and removed
in progress
Actively being worked on (Kanban column)
labels
May 16, 2019
Functionality provided here has been superseded by that introduced on #208. Refer to that issue for further reference. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature request
This is a feature request to enable launch-based testing, using (and likely extending) the current launch API. Acceptance criteria is limited to running both gtest and stdout-matching launch tests through regular build tools (e.g.
colcon
).Feature description
In ROS, the
rostest
integraton withroslaunch
allows for running test nodes in otherwise regular launch files.When run with the
rostest
CLI, these nodes (either gtest or nosetests based executables) make the whole launch test fail (or succeed) based on their return code. Fixture nodes can also cause a test failure by means of therequired
tag. All test nodes have user specified timeouts. Integration withcatkin
(i.e. CMake) is readily available too.Similarly, though in greater generality,
launch_testing
should provide the means to:or may not be using a testing framework itself (e.g. gtest, pytest, etc.).
Implementation considerations
launch_testing
To maximize code reuse, test descriptions must compose executable descriptions (see
#114 for a precedent on this pattern).
For test descriptions, assertions can be coupled or decoupled from their respective conditions. Compare:
where each new test kind is a subclass of a base
Test
action (anAction
subclass itself), withwhere two
Action
subclasses,Assert
(terminating) andExpect
(non-terminating), take aCondition
instance that in turn deals with the executables.In either case, the composing objects will setup timers to timeout and process event handlers to collect output, deal with testing framework details if need be (e.g. argument passing) and emit specific events (i.e.
AssertionError
) upon test failure. Then, a tests-awarelaunch.LaunchService
may react accordingly, shutting down the whole launch description and aggregating tests data.Note that in (1), defining launch description behavior upon executable termination becomes necessary (orthogonal to testing, but instrumental to mimic'ing ROS
required
tag usage for fixture executables). See the legacy exit handlers implementation for feature reference (though implementation in this case may rely on events).ros2launch
CLI must be updated with test verb to easily invoke a test-aware
launch.LaunchService
.The text was updated successfully, but these errors were encountered: