ros2-testing

Design and validate ROS 2 node tests with pytest, gtest, and launch_testing.

18|2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill ros2-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ros2-testing
Source: https://github.com/wimblerobotics/ros2-copilot-skills/tree/main/ros2-testing
Command: npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill ros2-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ROS 2 testing is complex across Python (pytest) and C++ (gtest) while also coordinating launch-based tests. This Skill guides you to design, implement, and verify unit, integration, and system tests for ROS 2 nodes, ensuring reliability in Jazzy and Rolling.

Core Features & Use Cases

  • Unit testing with pytest for Python nodes, including fixtures and type checks.
  • C++ unit testing with gtest for native nodes and libraries.
  • Integration and system testing with launch_testing to validate node orchestration and parameter interactions.
  • CMake/colcon test workflows that mirror ROS 2 build/test pipelines and provide runnable examples.
  • Example-driven guidance covering common ROS 2 testing patterns and best practices.

Quick Start

Use the provided templates to add ROS 2 node tests and run them with colcon test.

Frequently Asked Questions about ros2-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write ROS 2 node tests using pytest and gtest?

You can design and validate ROS 2 node tests using pytest for Python and gtest for C++, ensuring unit tests with fixtures and type checks satisfy colcon integration requirements.

What's the best way to run integration and launch-based tests for ROS 2 nodes?

Integration and system testing with launch_testing validates ROS 2 node orchestration and parameter interactions, mirroring CMake and colcon build/test pipelines to verify system reliability.

Can I use colcon test workflows to validate both Python and C++ ROS 2 packages?

Yes, colcon test workflows validate both Python and C++ ROS 2 packages by mirroring standard build and test pipelines, providing runnable examples that coordinate unit and launch-based tests.

Does ROS 2 testing support both Jazzy and Rolling distributions?

ROS 2 testing supports both Jazzy and Rolling distributions, guiding the design and verification of unit, integration, and system tests to ensure node reliability across active ROS 2 releases.

How do I set up CMake and colcon test pipelines for ROS 2 nodes?

Setting up CMake and colcon test pipelines involves applying provided templates to add ROS 2 node tests, running them with colcon test to mirror standard build and test workflows.