Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding script for testing interoperability and TestSuite (#1) #4

Merged
merged 7 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Testing Interoperability
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: workflow_dispatch
jobs:
Testing_Interoperability:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Downloads assets
uses: robinraju/release-downloader@v1.7
with:
latest: true
fileName: "*"
- name: Unzip
run: unzip '*.zip' -d executables
- name: Run Interoperability script
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cd executables
for i in ./* ; \
do for j in ./*; \
do python3 ./../interoperability_report.py -P $i -S $j -o=./../junit_interoperability_report.xml; \
done; \
done
- name: XUnit Viewer
id: xunit-viewer
uses: AutoModality/action-xunit-viewer@v1
with:
results: ./junit_interoperability_report.xml
- name: Attach the report
if: always()
uses: actions/upload-artifact@v1
with:
name: report
path: ./index.html
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,21 @@ shape_main
.depend.*
GNUmakefile*

#Bin and Object directories
# Bin and Object directories
bin/
objs/

# Other
*~
GeneratedCode

# Python files
.venv/
*.pyc

# Generated files
srcCxx/shape.*
srcCxx/shapePlugin.*
srcCxx/shapeSupport.*

.vscode/
91 changes: 91 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,95 @@
# dds-rtps

Validation of interoperability of products compliant with [OMG DDS-RTPS standard](https://www.omg.org/spec/DDSI-RTPS/). This is considered one of the core [DDS Specifications](https://www.dds-foundation.org/omg-dds-standard/). See https://www.dds-foundation.org/ for an overview of DDS.

The executables found on the [release tab of this repository](https://github.com/omg-dds/dds-rtps/releases) test discovery, DDS Topic and QoS matching, and interoperability for different QoS settings. The goal is to validate that the implementations perform these functions in compliance with OMG DDS-RTPS standard and can interoperate with each other.

# Interoperability Automatic Tests

The script `interoperability_report.py` generates automatically
the verification between two executables of these interoperability tests.
The tests that the script runs must be defined previosly (for example
`test_suite.py`).
Once the script finishes, it generates a report with the result
of the interoperability tests between both executables.

## Options of interoperability_report

The `interoperability_report.py` may configure the following options:

```
$ python3 interoperability_report.py -h

usage: interoperability_report.py [-h] -P publisher_name -S subscriber_name
[-v] [-f {junit,csv,xlxs}] [-o filename]
Interoperability Test
optional arguments:
-h, --help show this help message and exit
general options:
-P publisher_name, --publisher publisher_name
Publisher Shape Application
-S subscriber_name, --subscriber subscriber_name
Subscriber Shape Application
optional parameters:
-v, --verbose Print more information to stdout.
output options:
-f {junit,csv,xlxs}, --output-format {junit,csv,xlxs}
Output format.
-o filename, --output-name filename
Report filename.
```

**NOTE**: The option `-f` only supports junit.

### Example of use interoperability_report

This is an example that runs the `interoperability_report.py`
with the test suite `test_suite.py`

```
$ python3 interoperability_report.py -P <path_to_publisher_executable> -S <path_to_subscriber_executable>
```

This generates a report file in JUnit (xml) with the name of both executables
used, the date and the time in which it was generated. For example:
`<executable_name_publisher>-<executable_name_subscriber>-20230117-16_49_42.xml`

## Requirements

- Python 3.8+
- Create and enable a virtual environment (installing requirements)

## Using virtual environments

The build will be done using virtual environments, you should create and
activate the virtual environment and then install all dependencies. This can be
done by following these steps:

### Create virtual environment

In Linux® systems, you may need to install the corresponding python venv
package:

```
sudo apt install python3.8-venv
```

To create the virtual environment:

```
python3 -m venv .venv
```

### Activate virtual environment

```
source .venv/bin/activate
```

### Install requirements

This step is only required the first time or when the requirements change:

```
pip install -r requirements.txt
```
Loading