Skip to content

Commit e7a72fc

Browse files
authored
Slim 13.1 - continuous testing plan (#24)
* Add TESTING.md
1 parent 869ba9c commit e7a72fc

File tree

1 file changed

+141
-0
lines changed

1 file changed

+141
-0
lines changed

TESTING.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# ROSA Testing
2+
3+
## Introduction
4+
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.
5+
6+
---
7+
8+
## Testing Categories
9+
10+
The following test categories are included in our testing setup. Further details are provided below.
11+
12+
- [ ] Static Code Analysis
13+
- [x] Unit Tests
14+
- [x] Security Tests
15+
- [ ] Build Tests
16+
- [ ] Acceptance Tests
17+
- [x] Integration Tests
18+
- [x] Performance Tests
19+
- [ ] Usability Tests
20+
21+
### Unit Tests
22+
23+
#### Calculation Tools
24+
25+
- **Location:** `./tests/rosa/tools/test_calculation.py`
26+
- **Purpose:** To ensure the mathematical functions and calculations in ROSA perform correctly across various edge cases and inputs.
27+
- **Running Tests:**
28+
- **Manually:**
29+
1. Navigate to the project root directory in the command line.
30+
2. Execute `pytest ./tests/rosa/tools/test_calculation.py`.
31+
3. View results: Results will appear in the command-line output or can be formatted into a report using the `pytest-html` plugin.
32+
- **Automatically:**
33+
- **Frequency:**
34+
- Triggered by code changes and commits to the `src/rosa/tools/calculation.py` file on GitHub.
35+
- Runs during nightly builds with other unit tests.
36+
- **Results Location:** [GitHub Actions Unit Test Results](https://github.com/nasa-jpl/rosa/actions/workflows/unit-tests.yml)
37+
- **Contributing:**
38+
- **Framework Used:** [PyTest](https://docs.pytest.org/en/8.2.x/)
39+
- **Tips:**
40+
- Ensure that all functions in `calculation.py` are covered, including edge cases.
41+
- Test for both typical inputs and boundary conditions to ensure robustness.
42+
43+
#### Log Tools
44+
45+
- **Location:** `./tests/rosa/tools/test_log.py`
46+
- **Purpose:** To verify the functionality of log reading and handling operations in ROSA, including error handling and filtering.
47+
- **Running Tests:**
48+
- **Manually:**
49+
1. Navigate to the project root directory in the command line.
50+
2. Execute `pytest ./tests/rosa/tools/test_log.py`.
51+
3. View results: Results will appear in the command-line output or can be formatted into a report using the `pytest-html` plugin.
52+
- **Automatically:**
53+
- **Frequency:**
54+
- Triggered by code changes and commits to the `src/rosa/tools/log.py` file on GitHub.
55+
- Runs during nightly builds with other unit tests.
56+
- **Results Location:** [GitHub Actions Unit Test Results](https://github.com/nasa-jpl/rosa/actions/workflows/unit-tests.yml)
57+
- **Contributing:**
58+
- **Framework Used:** [PyTest](https://docs.pytest.org/en/8.2.x/)
59+
- **Tips:**
60+
- Ensure all log-related edge cases are tested, including invalid paths, empty files, and large files.
61+
- Test the filtering functionality thoroughly.
62+
63+
#### ROS1 Tools
64+
65+
- **Location:** `./tests/rosa/tools/test_ros1.py`
66+
- **Purpose:** To validate the integration and functionality of ROS1 tools within ROSA, ensuring correct interactions with the ROS1 environment.
67+
- **Running Tests:**
68+
- **Manually:**
69+
1. Ensure that ROS1 is set up and running in your environment.
70+
2. Execute `pytest ./tests/rosa/tools/test_ros1.py`.
71+
3. View results: Results will appear in the command-line output or can be formatted into a report using the `pytest-html` plugin.
72+
- **Automatically:**
73+
- **Frequency:**
74+
- Triggered by code changes and commits to the `src/rosa/tools/ros1.py` file on GitHub.
75+
- Runs during nightly builds with other unit tests.
76+
- **Results Location:** [GitHub Actions Unit Test Results](https://github.com/nasa-jpl/rosa/actions/workflows/unit-tests.yml)
77+
- **Contributing:**
78+
- **Framework Used:** [PyTest](https://docs.pytest.org/en/8.2.x/)
79+
- **Tips:**
80+
- Ensure tests are skipped if the ROS version is not compatible.
81+
- Test interactions with ROS1 nodes, topics, services, and parameters.
82+
83+
#### ROS2 Tools
84+
85+
- **Location:** `./tests/rosa/tools/test_ros2.py`
86+
- **Purpose:** To validate the integration and functionality of ROS2 tools within ROSA, ensuring correct interactions with the ROS2 environment.
87+
- **Running Tests:**
88+
- **Manually:**
89+
1. Ensure that ROS2 is set up and running in your environment.
90+
2. Execute `pytest ./tests/rosa/tools/test_ros2.py`.
91+
3. View results: Results will appear in the command-line output or can be formatted into a report using the `pytest-html` plugin.
92+
- **Automatically:**
93+
- **Frequency:**
94+
- Triggered by code changes and commits to the `src/rosa/tools/ros2.py` file on GitHub.
95+
- Runs during nightly builds with other unit tests.
96+
- **Results Location:** [GitHub Actions Unit Test Results](https://github.com/nasa-jpl/rosa/actions/workflows/unit-tests.yml)
97+
- **Contributing:**
98+
- **Framework Used:** [PyTest](https://docs.pytest.org/en/8.2.x/)
99+
- **Tips:**
100+
- Ensure tests are skipped if the ROS version is not compatible.
101+
- Test interactions with ROS2 nodes, topics, services, and parameters.
102+
103+
#### ROSA Tools
104+
105+
- **Location:** `./tests/rosa/tools/test_rosa_tools.py`
106+
- **Purpose:** To test the general ROSA tools and their integration, including utility functions and framework-specific features.
107+
- **Running Tests:**
108+
- **Manually:**
109+
1. Navigate to the project root directory in the command line.
110+
2. Execute `pytest ./tests/rosa/tools/test_rosa_tools.py`.
111+
3. View results: Results will appear in the command-line output or can be formatted into a report using the `pytest-html` plugin.
112+
- **Automatically:**
113+
- **Frequency:**
114+
- Triggered by code changes and commits to the `src/rosa/tools/rosa_tools.py` file on GitHub.
115+
- Runs during nightly builds with other unit tests.
116+
- **Results Location:** [GitHub Actions Unit Test Results](https://github.com/nasa-jpl/rosa/actions/workflows/unit-tests.yml)
117+
- **Contributing:**
118+
- **Framework Used:** [PyTest](https://docs.pytest.org/en/8.2.x/)
119+
- **Tips:**
120+
- Ensure compatibility across different ROS versions.
121+
- Validate tool initialization and injection of dependencies.
122+
123+
#### System Tools
124+
125+
- **Location:** `./tests/rosa/tools/test_system.py`
126+
- **Purpose:** To verify the system-related functionalities within ROSA, such as verbosity settings, debugging, and system wait functions.
127+
- **Running Tests:**
128+
- **Manually:**
129+
1. Navigate to the project root directory in the command line.
130+
2. Execute `pytest ./tests/rosa/tools/test_system.py`.
131+
3. View results: Results will appear in the command-line output or can be formatted into a report using the `pytest-html` plugin.
132+
- **Automatically:**
133+
- **Frequency:**
134+
- Triggered by code changes and commits to the `src/rosa/tools/system.py` file on GitHub.
135+
- Runs during nightly builds with other unit tests.
136+
- **Results Location:** [GitHub Actions Unit Test Results](https://github.com/nasa-jpl/rosa/actions/workflows/unit-tests.yml)
137+
- **Contributing:**
138+
- **Framework Used:** [PyTest](https://docs.pytest.org/en/8.2.x/)
139+
- **Tips:**
140+
- Test the different system states, such as verbosity and debugging modes.
141+
- Validate the correct implementation of timing functions.

0 commit comments

Comments
 (0)