Very useful video, thank you! There seems to be lots of ROS2 youtube content with overambitious titles like "Program an autonomous robot butler in one week!", but much less that focuses on the less sexy but very important stuff like automated testing
Very nice summary! I just wonder why you chose to build the path to the tested nodes relative to the test-file so that you always run the scripts from src and not install. With this setup (and no symlink-install) 'ros2 run' and your test could potentially run two different nodes. (You fix something in src, your test succeeds, you then start the node with ros2 run (and forgot to rebuild) and have the bug again.
Thank you Nikolas! But in the case you mentioned (with no symlink-install), we have to rebuild no matter what, right? If we forget to rebuild, we won't have the updated code (feature) available for run. So without symlink-install, we have no choice but to build. This example test assumes that build steps are correct. But if the ownership of "build check" is also shared with our tests, then yes, we should test for install paths :)
Awesome video!! Any chance you can help me tho I have a setup of 3 nodes I want to test. As the information comes in the first node, consumed by the second, adding so data to it and publishes it further for the third node to consume. Having a hard time making this work
In that case, unit testing (non-ROS): testing your methods with usual unit testing frameworks ROS node testing: you'll need to make the corresponding pub, sub or service in the test node for you node under test. For instance, to test the subscriber in the first node, make a publisher and send data on the topic. You node under test will respond to it. Probe the response. Same with other nodes Integration testing: Mock the first input and test that the final (or maybe also intermediate if they are robot behaviors) result is as expected
Thank you so much. I'm happy this helped you. Yeah, I'll probably ask open Robotics about the process to do it. I agree that test infra documentation isn't up to date. I know those guys are swamped with other stuff, so this video should help the community :)
Very useful video, thank you! There seems to be lots of ROS2 youtube content with overambitious titles like "Program an autonomous robot butler in one week!", but much less that focuses on the less sexy but very important stuff like automated testing
For me as an ROS2-beginner - This was a great video about unit testing. Thanks!
Glad to be of help, Stefan!
Great video. Can you make tutorial on software automated testing for ROS2? Along with integration Testing and E2E testing?
That's a longer one. This will be a part of a bigger ros 2 project series soon :)
Finally!!!! Please can you make a series for software testing in robotics? 🙏
Glad to be of help :)
Could you please elaborate on what you’d like in the series?
Very nice summary! I just wonder why you chose to build the path to the tested nodes relative to the test-file so that you always run the scripts from src and not install. With this setup (and no symlink-install) 'ros2 run' and your test could potentially run two different nodes. (You fix something in src, your test succeeds, you then start the node with ros2 run (and forgot to rebuild) and have the bug again.
Thank you Nikolas!
But in the case you mentioned (with no symlink-install), we have to rebuild no matter what, right? If we forget to rebuild, we won't have the updated code (feature) available for run. So without symlink-install, we have no choice but to build.
This example test assumes that build steps are correct. But if the ownership of "build check" is also shared with our tests, then yes, we should test for install paths :)
Awesome video!! Any chance you can help me tho
I have a setup of 3 nodes I want to test. As the information comes in the first node, consumed by the second, adding so data to it and publishes it further for the third node to consume.
Having a hard time making this work
In that case,
unit testing (non-ROS): testing your methods with usual unit testing frameworks
ROS node testing: you'll need to make the corresponding pub, sub or service in the test node for you node under test. For instance, to test the subscriber in the first node, make a publisher and send data on the topic. You node under test will respond to it. Probe the response. Same with other nodes
Integration testing: Mock the first input and test that the final (or maybe also intermediate if they are robot behaviors) result is as expected
Thanks for the tutorial! I wonder if you have the example code for integration tests in github?
I currently don’t have them. But we’re soon building a ROS 2 based project which will have them as well. Stay tuned for that :)
I have subcribed to your channel! you lecture is so good!
Thank you so much! Glad to be of help 😁
Good intro, you might want to modify the title for (python) only, in the event you wanted to release a separate one on C++.
That is a great suggestion. I updated the thumbnail. Thanks :D
can you
please share git repo of your work?
I unfortunately don’t have the codebase for hands on ROS 2 series anymore :(
Honestly, this content should be part of the official ROS2 documentation. The current documentation on testing is horrible. Why not try to submit it?
Thank you so much. I'm happy this helped you. Yeah, I'll probably ask open Robotics about the process to do it. I agree that test infra documentation isn't up to date. I know those guys are swamped with other stuff, so this video should help the community :)
Thank You So much buddy 😀😀
Thanks for watching :)