#ROSA Testing This document provides an overview of the testing architecture for ROSA. It covers the categories of tests applied across the software development lifecycle and describes the automated execution of these tests via GitHub Actions.
The following test categories are included in our testing setup. Further details are provided below.
- Static Code Analysis
- Unit Tests
- Security Tests
- Build Tests
- Acceptance Tests
- Integration Tests
- Performance Tests
- Usability Tests
- Location:
./tests/rosa/tools/test_calculation.py
- Purpose: To ensure the mathematical functions and calculations in ROSA perform correctly across various edge cases and inputs.
- Running Tests:
- Manually:
- Navigate to the project root directory in the command line.
- Execute
pytest ./tests/rosa/tools/test_calculation.py
. - View results: Results will appear in the command-line output or can be formatted into a report using the
pytest-html
plugin.
- Automatically:
- Frequency:
- Triggered by code changes and commits to the
src/rosa/tools/calculation.py
file on GitHub. - Runs during nightly builds with other unit tests.
- Triggered by code changes and commits to the
- Results Location: GitHub Actions Unit Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: PyTest
- Tips:
- Ensure that all functions in
calculation.py
are covered, including edge cases. - Test for both typical inputs and boundary conditions to ensure robustness.
- Ensure that all functions in
- Location:
./tests/rosa/tools/test_log.py
- Purpose: To verify the functionality of log reading and handling operations in ROSA, including error handling and filtering.
- Running Tests:
- Manually:
- Navigate to the project root directory in the command line.
- Execute
pytest ./tests/rosa/tools/test_log.py
. - View results: Results will appear in the command-line output or can be formatted into a report using the
pytest-html
plugin.
- Automatically:
- Frequency:
- Triggered by code changes and commits to the
src/rosa/tools/log.py
file on GitHub. - Runs during nightly builds with other unit tests.
- Triggered by code changes and commits to the
- Results Location: GitHub Actions Unit Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: PyTest
- Tips:
- Ensure all log-related edge cases are tested, including invalid paths, empty files, and large files.
- Test the filtering functionality thoroughly.
- Location:
./tests/rosa/tools/test_ros1.py
- Purpose: To validate the integration and functionality of ROS1 tools within ROSA, ensuring correct interactions with the ROS1 environment.
- Running Tests:
- Manually:
- Ensure that ROS1 is set up and running in your environment.
- Execute
pytest ./tests/rosa/tools/test_ros1.py
. - View results: Results will appear in the command-line output or can be formatted into a report using the
pytest-html
plugin.
- Automatically:
- Frequency:
- Triggered by code changes and commits to the
src/rosa/tools/ros1.py
file on GitHub. - Runs during nightly builds with other unit tests.
- Triggered by code changes and commits to the
- Results Location: GitHub Actions Unit Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: PyTest
- Tips:
- Ensure tests are skipped if the ROS version is not compatible.
- Test interactions with ROS1 nodes, topics, services, and parameters.
- Location:
./tests/rosa/tools/test_ros2.py
- Purpose: To validate the integration and functionality of ROS2 tools within ROSA, ensuring correct interactions with the ROS2 environment.
- Running Tests:
- Manually:
- Ensure that ROS2 is set up and running in your environment.
- Execute
pytest ./tests/rosa/tools/test_ros2.py
. - View results: Results will appear in the command-line output or can be formatted into a report using the
pytest-html
plugin.
- Automatically:
- Frequency:
- Triggered by code changes and commits to the
src/rosa/tools/ros2.py
file on GitHub. - Runs during nightly builds with other unit tests.
- Triggered by code changes and commits to the
- Results Location: GitHub Actions Unit Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: PyTest
- Tips:
- Ensure tests are skipped if the ROS version is not compatible.
- Test interactions with ROS2 nodes, topics, services, and parameters.
- Location:
./tests/rosa/tools/test_rosa_tools.py
- Purpose: To test the general ROSA tools and their integration, including utility functions and framework-specific features.
- Running Tests:
- Manually:
- Navigate to the project root directory in the command line.
- Execute
pytest ./tests/rosa/tools/test_rosa_tools.py
. - View results: Results will appear in the command-line output or can be formatted into a report using the
pytest-html
plugin.
- Automatically:
- Frequency:
- Triggered by code changes and commits to the
src/rosa/tools/rosa_tools.py
file on GitHub. - Runs during nightly builds with other unit tests.
- Triggered by code changes and commits to the
- Results Location: GitHub Actions Unit Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: PyTest
- Tips:
- Ensure compatibility across different ROS versions.
- Validate tool initialization and injection of dependencies.
- Location:
./tests/rosa/tools/test_system.py
- Purpose: To verify the system-related functionalities within ROSA, such as verbosity settings, debugging, and system wait functions.
- Running Tests:
- Manually:
- Navigate to the project root directory in the command line.
- Execute
pytest ./tests/rosa/tools/test_system.py
. - View results: Results will appear in the command-line output or can be formatted into a report using the
pytest-html
plugin.
- Automatically:
- Frequency:
- Triggered by code changes and commits to the
src/rosa/tools/system.py
file on GitHub. - Runs during nightly builds with other unit tests.
- Triggered by code changes and commits to the
- Results Location: GitHub Actions Unit Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: PyTest
- Tips:
- Test the different system states, such as verbosity and debugging modes.
- Validate the correct implementation of timing functions.