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

FOGL-9154: Added RST files for the system tests #1520

Merged
merged 8 commits into from
Jan 31, 2025
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
55 changes: 55 additions & 0 deletions tests/system/python/e2e/docs/test_e2e_coap_PI.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
E2E CSV to PI Server Test
~~~~~~~~~~~~~~~~~~~~~~~~~

Objective
+++++++++
This test performs end-to-end validation of Fledge by ingesting data via the `fledge-south-coap` plugin and forwarding it to the PI Server using the `fledge-north-OMF` plugin.

This test consists of *TestE2E_CoAP_PI* class, which contains a single test case function:

1. **test_end_to_end**: Verifies that data is ingested into Fledge and sent to the PI Server. It also checks the data sent and received counts, confirms the creation of the required asset, and ensures that the data sent from Fledge via the OMF plugin reaches the PI Server.


Prerequisite
++++++++++++

1. Fledge must be installed by `make` command
2. The FLEDGE_ROOT environment variable should be exported to the directory where Fledge is installed.
3. Install the prerequisites to run a test:

.. code-block:: console

$ cd fledge/python
$ python3 -m pip install -r requirements-test.txt --user

The minimum required parameters to run,

.. code-block:: console

--pi-host=PI_SYSTEM_HOST
PI Server HostName/IP
--pi-port=PI_SYSTEM_PORT
PI Server port
--pi-admin=PI_SYSTEM_ADMIN
PI Server user login
--pi-passwd=PI_SYSTEM_PWD
PI Server user login password
--pi-db=PI_SYSTEM_DB
PI Server Database
--wait-time=WAIT_TIME
Generic wait time (in seconds) between processes
--retries=RETIRES
Number of tries for polling
--junit-xml=JUNIT_XML
Specifies the file path or directory where the JUnit XML test results should be saved.

Execution of Test
+++++++++++++++++

.. code-block:: console

$ cd fledge/tests/system/python/ ;
$ export FLEDGE_ROOT=<path_to_fledge_installation>
$ export PYTHONPATH=$FLEDGE_ROOT/python
$ python3 -m pytest -s -vv e2e/test_e2e_coap_PI.py --pi-host="<PI_SYSTEM_HOST>" --pi-port="<PI_SYSTEM_PORT>" --pi-admin="<PI_SYSTEM_ADMIN>" \
--pi-passwd="<PI_SYSTEM_PWD>" --pi-db="<PI_SYSTEM_DB>" --wait-time="<WAIT_TIME>" --retries="<RETIRES>" --junit-xml="<JUNIT_XML>"
56 changes: 56 additions & 0 deletions tests/system/python/e2e/docs/test_e2e_csv_PI.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
E2E CSV to PI Server Test
~~~~~~~~~~~~~~~~~~~~~~~~~

Objective
+++++++++
This test performs end-to-end validation of Fledge by ingesting data from a CSV file into Fledge using the `fledge-south-playback` plugin, and then sending the data to the PI Server via the `fledge-north-OMF` plugin.

This test consists of *TestE2E_CSV_PI* class, which contains a single test case function:

1. **test_e2e_csv_pi**: Verifies that data is inserted into Fledge and sent to PI. The test also checks the data sent and received counts, confirms whether the required asset is created, and ensures that the data sent from Fledge via the OMF plugin reaches the PI Server.


Prerequisite
++++++++++++

1. Fledge must be installed by `make` command
2. The FLEDGE_ROOT environment variable should be exported to the directory where Fledge is installed.
3. Install the prerequisites to run a test:

.. code-block:: console

$ cd fledge/python
$ python3 -m pip install -r requirements-test.txt --user


The minimum required parameters to run,

.. code-block:: console

--pi-host=PI_SYSTEM_HOST
PI Server HostName/IP
--pi-port=PI_SYSTEM_PORT
PI Server port
--pi-admin=PI_SYSTEM_ADMIN
PI Server user login
--pi-passwd=PI_SYSTEM_PWD
PI Server user login password
--pi-db=PI_SYSTEM_DB
PI Server Database
--wait-time=WAIT_TIME
Generic wait time (in seconds) between processes
--retries=RETIRES
Number of tries for polling
--junit-xml=JUNIT_XML
Specifies the file path or directory where the JUnit XML test results should be saved.

Execution of Test
+++++++++++++++++

.. code-block:: console

$ cd fledge/tests/system/python/ ;
$ export FLEDGE_ROOT=<path_to_fledge_installation>
$ export PYTHONPATH=$FLEDGE_ROOT/python
$ python3 -m pytest -s -vv e2e/test_e2e_csv_pi.py --pi-host="<PI_SYSTEM_HOST>" --pi-port="<PI_SYSTEM_PORT>" --pi-admin="<PI_SYSTEM_ADMIN>" \
--pi-passwd="<PI_SYSTEM_PWD>" --pi-db="<PI_SYSTEM_DB>" --wait-time="<WAIT_TIME>" --retries="<RETIRES>" --junit-xml="<JUNIT_XML>"
56 changes: 56 additions & 0 deletions tests/system/python/e2e/docs/test_e2e_csv_multi_filter_pi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
E2E CSV Multi-Filter to PI Test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Objective
+++++++++
This test is designed to perform end-to-end testing of Fledge by ingesting data into Fledge using the `fledge-south-playback` plugin from a CSV file, with filters of the `fledge-filter-scale`, `fledge-filter-asset`, `fledge-filter-rate`, `fledge-filter-delta`, and `fledge-filter-rms` plugins attached. The data is then sent to the PI Server using the service of the `fledge-north-OMF` plugin, which has the `fledge-filter-threshold` plugin attached.

This test consists of *TestE2eCsvMultiFltrPi* class, which contains a single test case function:

1. **test_end_to_end**: Verifies that data is inserted into Fledge using the playback south plugin with filters for Delta, RMS, Rate, Scale, Asset, and Metadata, and then sent to PI. It also checks the data sent and received counts, verifies the creation of the required asset, and ensures that the data sent from Fledge via the OMF plugin reaches the PI Server.


Prerequisite
++++++++++++

1. Fledge must be installed by `make` command
2. The FLEDGE_ROOT environment variable should be exported to the directory where Fledge is installed.
3. Install the prerequisites to run a test:

.. code-block:: console

$ cd fledge/python
$ python3 -m pip install -r requirements-test.txt --user


The minimum required parameters to run,

.. code-block:: console

--pi-host=PI_SYSTEM_HOST
PI Server HostName/IP
--pi-port=PI_SYSTEM_PORT
PI Server port
--pi-admin=PI_SYSTEM_ADMIN
PI Server user login
--pi-passwd=PI_SYSTEM_PWD
PI Server user login password
--pi-db=PI_SYSTEM_DB
PI Server Database
--wait-time=WAIT_TIME
Generic wait time (in seconds) between processes
--retries=RETIRES
Number of tries for polling
--junit-xml=JUNIT_XML
Specifies the file path or directory where the JUnit XML test results should be saved.

Execution of Test
+++++++++++++++++

.. code-block:: console

$ cd fledge/tests/system/python/ ;
$ export FLEDGE_ROOT=<path_to_fledge_installation>
$ export PYTHONPATH=$FLEDGE_ROOT/python
$ python3 -m pytest -s -vv e2e/test_e2e_csv_multi_filter_pi.py --pi-host="<PI_SYSTEM_HOST>" --pi-port="<PI_SYSTEM_PORT>" --pi-admin="<PI_SYSTEM_ADMIN>" \
--pi-passwd="<PI_SYSTEM_PWD>" --pi-db="<PI_SYSTEM_DB>" --wait-time="<WAIT_TIME>" --retries="<RETIRES>" --junit-xml="<JUNIT_XML>"
55 changes: 55 additions & 0 deletions tests/system/python/e2e/docs/test_e2e_expr_pi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
E2E Expression to PI Server Test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Objective
+++++++++
This test is designed to perform end-to-end testing of Fledge by ingesting data into Fledge using the `fledge-south-coap` plugin and sending it to the PI Server using the `fledge-north-OMF` plugin.

This test consists of *TestE2eExprPi* class, which contains a single test case function:

1. **test_end_to_end**: Verifies that data is ingested into Fledge and sent to the PI Server. It also checks the data sent and received counts, ensures the required asset is created, and confirms that the data sent from Fledge via the OMF plugin reaches the PI Server.


Prerequisite
++++++++++++

1. Fledge must be installed by `make` command
2. The FLEDGE_ROOT environment variable should be exported to the directory where Fledge is installed.
3. Install the prerequisites to run a test:

.. code-block:: console

$ cd fledge/python
$ python3 -m pip install -r requirements-test.txt --user

The minimum required parameters to run,

.. code-block:: console

--pi-host=PI_SYSTEM_HOST
PI Server HostName/IP
--pi-port=PI_SYSTEM_PORT
PI Server port
--pi-admin=PI_SYSTEM_ADMIN
PI Server user login
--pi-passwd=PI_SYSTEM_PWD
PI Server user login password
--pi-db=PI_SYSTEM_DB
PI Server Database
--wait-time=WAIT_TIME
Generic wait time (in seconds) between processes
--retries=RETIRES
Number of tries for polling
--junit-xml=JUNIT_XML
Specifies the file path or directory where the JUnit XML test results should be saved.

Execution of Test
+++++++++++++++++

.. code-block:: console

$ cd fledge/tests/system/python/ ;
$ export FLEDGE_ROOT=<path_to_fledge_installation>
$ export PYTHONPATH=$FLEDGE_ROOT/python
$ python3 -m pytest -s -vv e2e/test_e2e_expr_pi.py --pi-host="<PI_SYSTEM_HOST>" --pi-port="<PI_SYSTEM_PORT>" --pi-admin="<PI_SYSTEM_ADMIN>" \
--pi-passwd="<PI_SYSTEM_PWD>" --pi-db="<PI_SYSTEM_DB>" --wait-time="<WAIT_TIME>" --retries="<RETIRES>" --junit-xml="<JUNIT_XML>"
56 changes: 56 additions & 0 deletions tests/system/python/e2e/docs/test_e2e_filter_fft_threshold.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
E2E Filter with FFT Threshold Test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Objective
+++++++++
This test is designed to perform end-to-end testing of Fledge by ingesting data from a CSV file into Fledge using the `fledge-south-playback` plugin, with the `fledge-filter-fft` plugin attached. The data is then sent to the PI Server using the `fledge-north-OMF` plugin, with the `fledge-filter-threshold` plugin applied.

This test consists of *TestE2eFilterFFTThreshold* class, which contains a single test case function:

1. **test_e2e_csv_pi**: Verifies that data is ingested into Fledge using the playback south plugin with an FFT filter, then sent to PI after passing through the threshold filter. It checks the data sent and received counts, ensures the required asset is created, and confirms that the data sent from Fledge via the OMF plugin reaches the PI Server.


Prerequisite
++++++++++++

1. Fledge must be installed by `make` command
2. The FLEDGE_ROOT environment variable should be exported to the directory where Fledge is installed.
3. Install the prerequisites to run a test:

.. code-block:: console

$ cd fledge/python
$ python3 -m pip install -r requirements-test.txt --user


The minimum required parameters to run,

.. code-block:: console

--pi-host=PI_SYSTEM_HOST
PI Server HostName/IP
--pi-port=PI_SYSTEM_PORT
PI Server port
--pi-admin=PI_SYSTEM_ADMIN
PI Server user login
--pi-passwd=PI_SYSTEM_PWD
PI Server user login password
--pi-db=PI_SYSTEM_DB
PI Server Database
--wait-time=WAIT_TIME
Generic wait time (in seconds) between processes
--retries=RETIRES
Number of tries for polling
--junit-xml=JUNIT_XML
Specifies the file path or directory where the JUnit XML test results should be saved.

Execution of Test
+++++++++++++++++

.. code-block:: console

$ cd fledge/tests/system/python/ ;
$ export FLEDGE_ROOT=<path_to_fledge_installation>
$ export PYTHONPATH=$FLEDGE_ROOT/python
$ python3 -m pytest -s -vv e2e/test_e2e_filter_fft_threshold.py --pi-host="<PI_SYSTEM_HOST>" --pi-port="<PI_SYSTEM_PORT>" --pi-admin="<PI_SYSTEM_ADMIN>" \
--pi-passwd="<PI_SYSTEM_PWD>" --pi-db="<PI_SYSTEM_DB>" --wait-time="<WAIT_TIME>" --retries="<RETIRES>" --junit-xml="<JUNIT_XML>"
47 changes: 47 additions & 0 deletions tests/system/python/e2e/docs/test_e2e_kafka.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Test Kafka
~~~~~~~~~~

Objective
+++++++++
This test is designed to perform end-to-end testing of Fledge by ingesting data into Fledge using the `fledge-south-coap` plugin and sending it to the Kafka Server using the `fledge-north-kafka` plugin.


This test consists of *TestE2EKafka* class, which contains a single test case function:

1. **test_end_to_end**: Verifies that data is ingested into Fledge through the south service of the fledge-south-coap plugin and sent to the Kafka Server via the fledge-north-kafka plugin. It also checks the data sent and received counts, ensures the required asset is created, and confirms that the data sent from Fledge via the fledge-north-kafka plugin reaches the Kafka Server.


Prerequisite
++++++++++++

1. Fledge must be installed by `make` command
2. The FLEDGE_ROOT environment variable should be exported to the directory where Fledge is installed.
3. Install the prerequisites to run a test:

.. code-block:: console

$ cd fledge/python
$ python3 -m pip install -r requirements-test.txt --user

The minimum required parameters to run,

.. code-block:: console

--kafka-host=KAFKA_HOST
IP Address of Kafka Server
--wait-time=WAIT_TIME
Generic wait time (in seconds) between processes
--retries=RETIRES
Number of tries for polling
--junit-xml=JUNIT_XML
Specifies the file path or directory where the JUnit XML test results should be saved.

Execution of Test
+++++++++++++++++

.. code-block:: console

$ cd fledge/tests/system/python/ ;
$ export FLEDGE_ROOT=<path_to_fledge_installation>
$ export PYTHONPATH=$FLEDGE_ROOT/python
$ python3 -m pytest -s -vv e2e/test_e2e_kafka.py --kafka-host="<KAFKA_HOST>" --wait-time="<WAIT_TIME>" --retries="<RETIRES>" --junit-xml="<JUNIT_XML>"
60 changes: 60 additions & 0 deletions tests/system/python/e2e/docs/test_e2e_modbus_c_pi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
E2E Modbus to PI Server Test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Objective
+++++++++
This test is designed to perform end-to-end testing of Fledge by ingesting data into Fledge using the `fledge-south-modbus-c` plugin and sending it to the PI Server using the `fledge-north-OMF` plugin.

This test consists of *TestE2EModbusCPI* class, which contains a single test case function:

1. **test_end_to_end**: Verifies that data is ingested into Fledge and successfully sent to PI. It checks the data sent and received counts, ensures the required asset is created, and confirms that the data sent from Fledge through the OMF plugin reaches the PI Server.


Prerequisite
++++++++++++

1. Fledge must be installed by `make` command
2. The FLEDGE_ROOT environment variable should be exported to the directory where Fledge is installed.
3. Install the prerequisites to run a test:

.. code-block:: console

$ cd fledge/python
$ python3 -m pip install -r requirements-test.txt --user

The minimum required parameters to run,

.. code-block:: console

--modbus-host=MODBUS_HOST
IP Address of Modbus
--modbus-port=MODBUS_PORT
Port of Modbus
--pi-host=PI_SYSTEM_HOST
PI Server HostName/IP
--pi-port=PI_SYSTEM_PORT
PI Server port
--pi-admin=PI_SYSTEM_ADMIN
PI Server user login
--pi-passwd=PI_SYSTEM_PWD
PI Server user login password
--pi-db=PI_SYSTEM_DB
PI Server Database
--wait-time=WAIT_TIME
Generic wait time (in seconds) between processes
--retries=RETIRES
Number of tries for polling
--junit-xml=JUNIT_XML
Specifies the file path or directory where the JUnit XML test results should be saved.

Execution of Test
+++++++++++++++++

.. code-block:: console

$ cd fledge/tests/system/python/ ;
$ export FLEDGE_ROOT=<path_to_fledge_installation>
$ export PYTHONPATH=$FLEDGE_ROOT/python
$ python3 -m pytest -s -vv e2e/test_e2e_modbus_c_pi.py --modbus-host="<MODBUS_HOST>" --modbus-port="<MODBUS_PORT>" --pi-host="<PI_SYSTEM_HOST>" \
--pi-port="<PI_SYSTEM_PORT>" --pi-admin="<PI_SYSTEM_ADMIN>" --pi-passwd="<PI_SYSTEM_PWD>" --pi-db="<PI_SYSTEM_DB>" --wait-time="<WAIT_TIME>" \
--retries="<RETIRES>" --junit-xml="<JUNIT_XML>"
Loading