https://github.com/cetic/pynguin_ros_poc
This proof of concepts aims at generating tests using Pynguin on a ROS2 system.
https://github.com/cetic/pynguin_ros_poc
Last synced: 4 months ago
JSON representation
This proof of concepts aims at generating tests using Pynguin on a ROS2 system.
- Host: GitHub
- URL: https://github.com/cetic/pynguin_ros_poc
- Owner: cetic
- License: mit
- Created: 2024-02-02T12:55:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-05T10:12:26.000Z (over 2 years ago)
- Last Synced: 2024-04-13T09:20:25.144Z (about 2 years ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PoC Pynguin - ROS
This proof of concepts aims at generating tests using [Pynguin](https://github.com/se2p/pynguin) on a [ROS2](https://docs.ros.org/en/rolling/index.html) system.
## Usage
Install Docker: https://docs.docker.com/get-docker/
Grab this repository, then build and launch the sample listener/talker stack.
```bash
git clone git@github.com:cetic/pynguin_ros_poc.git
docker-compose build
docker-compose up
```
This will launch a ROS node, here it is a simple robot that is listening to a topic for instructions.
In another shell session, enter the container, run the following commands to prepare the environment and run the test generation:
```bash
# connect to vehicle container
docker exec -it vehicle /bin/bash
# activate ROS
source /opt/ros/humble/setup.bash
# prepare Pynguin
export PYNGUIN_DANGER_AWARE=1
export PYTHONDONTWRITEBYTECODE=1
export PYTHONUNBUFFERED=1
# run Pynguin on the vehicle package, need to ctrl+c at the end to finish the generation.
pynguin --project-path /home/ros/vehicle/src/vehicle_pkg/ --output-path ./pynguin-testgen --create-coverage-report True --module-name vehicle -v
```