Skip to content

ROS 2 Testing documentation #1441

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

Open
simutisernestas opened this issue Apr 27, 2021 · 5 comments
Open

ROS 2 Testing documentation #1441

simutisernestas opened this issue Apr 27, 2021 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@simutisernestas
Copy link
Contributor

Are there any plans on adding node testing examples?

@clalancette
Copy link
Contributor

Are there any plans on adding node testing examples?

Can you explain in more detail what you are looking for?

@simutisernestas
Copy link
Contributor Author

Nothing too specific would be great to have guidelines and best practices guide for testing ros2 applications. For instance, it could be unit, integration tests, and examples of using colcon test and overall ros2 testing tools like launch_testing package, etc. The problem I'm currently facing is just a lack of informational resources in order to properly test ros2 application.

@clalancette
Copy link
Contributor

OK, that makes sense. I'm going to move this over to the ros2_documentation repository, as that seems to be the place where we would do documentation of this sort.

@clalancette clalancette transferred this issue from ros2/examples Apr 27, 2021
@clalancette clalancette changed the title ros2 testing examples ROS 2 Testing documentation Apr 27, 2021
@simutisernestas
Copy link
Contributor Author

Thanks! If someone would be willing to give some guidance I could help with documenting it.

@clalancette clalancette added the help wanted Extra attention is needed label May 13, 2021
@Achllle
Copy link
Contributor

Achllle commented Sep 5, 2024

Also surprised to find there's no documentation regarding integration testing in ROS 2. Wanted to jot down my findings from looking into this to maybe save someone else some time.

ROS 1 has rostest, which seems to be ported to ROS 2 with ros_testing, but there's also launch_testing which in the examples seems to focus on externally monitoring a particular node and checking its std output, rather than actually running TestCases or gtests within a script. I can't find more than a few words of documentation for ros_testing.

Two relevant discourse.ros.org discussions:

From which I took away:

  1. You can do whatever works for you. It's good that there are options for those who want to develop custom setups or have preferences, but I'd guess that most people are just looking for a recommended solution with examples they can start working with. Whatever is easiest, best documented, most supported.
  2. Autoware seems to have developed their own solution for smoke testing and integration testing. I personally would prefer to use an official ROS 2 recommended approach.
  3. nav2 has an extensive integration test suite. There's a lot here, making it a good starting point for writing a testing tutorial and perhaps a bad place to start for those trying to just get a simple use case to work. It also shows the use of ament_add_test, which I can't seem to find much information about.

EDIT: since Humble, there's also launch_pytest which aims to replace launch_testing and make it simpler by relying on pytest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants