Automated XML generation tool for DDS (Data Distribution Service) QoS test cases.
This tool generates an optimized set of test cases by applying the Pairwise Testing methodology across 16 different parameters, ensuring high coverage with maximum efficiency.
- Combinations: (True, True), (False, False)
- Description: Integrated parameter for PARTITION, USER_DATA, GROUP_DATA, and TOPIC_DATA.
- Combinations: (exists, exists), (not_exists, not_exists)
- Values: Reliable, Best_effort
- Combinations: 2 × 2 = 4cases
- Values: Volatile, Transient_Local, Transient, Persistent
- Combinations: 4 × 4 = 16cases
- Values:
PP: D < 2×PP2×PP: D ≥ 2×PPDURATION_INFINITY
- Combinations: 3 × 3 = 9cases
- Values:
(AUTOMATIC, 0.5×PP): lease_duration < 2×PP(AUTOMATIC, PP): lease_duration < 2×PP(AUTOMATIC, 2×PP): lease_duration ≥ 2×PP(AUTOMATIC, DURATION_INFINITY)(MANUAL_BY_PARTICIPANT, None)(MANUAL_BY_TOPIC, None)
- Combinations: 6 × 6 = 36cases
- Values:
(KEEP_ALL, None): KEEP_ALL(KEEP_LAST, 1): depth=1(KEEP_LAST, <(RTT/PP)+2): depth < (RTT/PP)+2(KEEP_LAST, =(RTT/PP)+2): depth = (RTT/PP)+2(KEEP_LAST, >(RTT/PP)+2): depth > (RTT/PP)+2
- Combinations: 5 × 5 = 25cases
- Values:
1: = 1<(RTT/PP)+2: < (RTT/PP)+2=(RTT/PP)+2: = (RTT/PP)+2>(RTT/PP)+2: > (RTT/PP)+2
- Combinations: 4 × 4 = 16cases
- Values:
1,(RTT/PP+3)×PP - Combinations: 2 × 2 = 4cases
- Values:
0.5×RTT,DURATION_INFINITY - Combinations: 2 × 2 = 4cases
- Values:
SHARED,EXCLUSIVE - Combinations: 2 × 2 = 4cases
- Values:
BY_RECEPTION_TIMESTAMP,BY_SOURCE_TIMESTAMP - Combinations: 2 × 2 = 4cases
- Description: Parameter applicable to Publisher only.
- Values:
True,False - Combinations: 2cases
- Description: Parameter applicable to Subscriber only.
- Values:
0,3 - Combinations: 2cases
- Description: Parameter applicable to Subscriber only.
- Values:
0,3 - Combinations: 2cases
Pairwise testing is a combinatorial software testing method that, for each pair of input parameters to a system, tests all possible discrete combinations of those parameters. This ensures high test coverage with a significantly reduced number of test cases.
Total Test Cases Generated: 853
XML Files: 1,706 total (853 cases × 2 files per case)
- pub_qos_case_00001.xml ~ pub_qos_case_00853.xml
- sub_qos_case_00001.xml ~ sub_qos_case_00853.xml
- Python 3.6 or higher
- Pairwise Algorithm Library:
pip install allpairspy
XML Generator/
├── xml_generator.py # Main execution script
├── xml/
│ ├── pub_qos.xml # Publisher template
│ └── sub_qos.xml # Subscriber template
└── output/ # Directory for generated XML files
cd "/home/user/ros2_ws/src/XML Generator"
python3 xml_generator.pyProvide the following inputs when prompted:
- PP (Publication Period): Publication Period
- RTT (Round Trip Time): Round Trip Time
============================================================
DDS QoS XML Generator
============================================================
Enter PP (Publication Period) in seconds: 0.1
Enter RTT (Round Trip Time) in seconds: 0.2
Input Values:
PP: 0.1 sec
RTT: 0.2 sec
RTT/PP: 2.00
Generating test case combinations...
Total 853 test cases generated.
Generating XML files...
Progress: 100/853 (11%)
Progress: 200/853 (23%)
...
Progress: 800/853 (93%)
Complete! A total of 853 test cases have been generated.
Output Directory: output/
- PP Value: Must be a value greater than 0.
- File Overwriting: Existing files with the same name in the output/ directory will be overwritten.
- Directory Creation: The
output/directory will be created automatically if it does not exist.
| Component | Laptop 1 | Laptop 2 |
|---|---|---|
| Model | LG Gram (15ZD970) | Lenovo IdeaPad 1 15ALC7 |
| Operating System | Ubuntu 22.04.5 LTS | Ubuntu 22.04.5 LTS |
| Processor (CPU) | Intel Core i7-7500U @ 2.70GHz | AMD Ryzen 5 5500U |
| Memory (RAM) | 8.0 GB (Available: 7.6GiB) | 6.0 GB (Available: 5.6GiB) |
The generated XMLs are compatible with the following middleware versions:
| DDS Implementation | Version |
|---|---|
| eProsima FastDDS | v2.6.9 |
| Eclipse CycloneDDS | v0.10.5 |
| RTI Connext DDS | v6.0.1 |