diff --git a/docs/tests/plugins/datalogger/datalogger_test.rst b/docs/tests/plugins/datalogger/datalogger_test.rst new file mode 100644 index 000000000..a208dc4b8 --- /dev/null +++ b/docs/tests/plugins/datalogger/datalogger_test.rst @@ -0,0 +1,1113 @@ +.. _datalogger_tests: + +Datalogger Test Suite +================================================================================ + +.. note:: + + User guide :ref:`Data logger user guide ` + +The following apply to all tests below, any special requirements will be mentioned. + +**Prerequisites:** + * Scopy v2.0.0 or later with Data Logger installed on the system + * Tests listed as dependencies are successfully completed + * Reset .ini files to default by pressing "Reset" button in Preferences + +Setup +------- + +.. _adalm_pluto_emu_setup: + +**AdalmPluto.Emu:** + * Open Scopy + * Start the iio-emu process using Pluto option from the dropdown + * Connect to the Pluto Device + +.. _adalm_pluto_device_setup: + +**AdalmPluto.Device:** + * Open Scopy + * Connect to the Pluto Device using IP or USB + +.. _m2k_emu_setup: + +**M2k.Emu:** + * Open Scopy + * Start the iio-emu process using ADALM2000 option from the dropdown + * Connect to the M2k Device + +.. _TST_DATALOGGER_ENABLE_DISABLE_DATA_LOGGER_CHANNEL: + +Enable and Disable Data Logger Channel +------------------------------------------------ + +**UID:** TST.DATALOGGER.ENABLE_DISABLE_DATA_LOGGER_CHANNEL + +**Description:** Enable the channel and check if the channel is enabled + +**OS:** ANY + +**Preconditions:** + * Connect to :ref:`AdalmPluto.Emu ` or + :ref:`AdalmPluto.Device ` + +**Steps:** + 1. Open Data Logger plugin + 2. Using channel menu enable channel **voltage0** of **xadc** device + 3. Press **Run** button + 4. Wait for some data to be collected + + * **Expected result:** Curve will be displayed on the plot + + 5. Using channel menu disable channel **voltage0** of **xadc** device + + * **Expected result:** Curve will be removed from the plot + +**Result:** PASS/FAIL + +.. _TST_DATALOGGER_RUN_STOP_DATA_LOGGING: + +Run and Stop Data Logging +------------------------------------ + +**UID:** TST.DATALOGGER.RUN_STOP_DATA_LOGGING + +**Description:** Start the data logger and check if the data is being collected + +**OS:** ANY + +**Preconditions:** + * Connect to :ref:`AdalmPluto.Emu ` or + :ref:`AdalmPluto.Device ` + +**Prerequisites:** + * :ref:`Enable and Disable Data Logger Channel ` is passed + +**Steps:** + 1. Open Data logger plugin + 2. Using channel menu enable channel **voltage0** of **xadc** device + 3. Press **Run** button + + * **Expected result:** + + * Data is being collected and displayed on + the plot + * **Run** button is changed to **Stop** + + 4. Press **Stop** button + + * **Expected result:** + * Data is no longer being collected and + displayed on the plot + * **Stop** button is changed to **Run** + +**Result:** PASS/FAIL + +.. _TST_DATALOGGER_CLEAR_COLLECTED_DATA: + +Clear Collected Data +------------------------------ + +**UID:** TST.DATALOGGER.CLEAR_COLLECTED_DATA + +**Description:** Clear the data and check if the data is removed from the plot + +**OS:** ANY + +**Preconditions:** + * Connect to :ref:`AdalmPluto.Emu ` or + :ref:`AdalmPluto.Device ` + +**Prerequisites:** + * :ref:`Run and Stop Data Logging ` is passed + +**Steps:** + 1. Open Data logger plugin + 2. Using channel menu enable channel **voltage0** of **xadc** device + 3. Press **Run** button + 4. Wait for some data to be collected + 5. Press **Stop** button + 6. Press **Clear** button + + * **Expected result:** Data is removed from the plot + +**Result:** PASS/FAIL + +.. _TST_DATALOGGER_CLEAR_DATA_WHILE_RUNNING: + +Clear data while running +---------------------------------- + +**UID:** TST.DATALOGGER.CLEAR_DATA_WHILE_RUNNING + +**Description:** Clear the data while running and check if the data is removed from the plot + +**OS:** ANY + +**Preconditions:** + * Connect to :ref:`AdalmPluto.Emu ` or + :ref:`AdalmPluto.Device ` + +**Prerequisites:** + * :ref:`Run and Stop Data Logging ` is passed + +**Steps:** + 1. Open Data logger plugin + 2. Using channel menu enable channel **voltage0** of **xadc** device + 3. Press **Run** button + 4. Wait for some data to be collected + 5. Press **Clear** button + + * **Expected result:** Data is removed from the plot and buffer + is cleared the starting point is reset to "0" + +**Result:** PASS/FAIL + +.. _TST_DATALOGGER_CREATAE_NEW_DATA_LOGGER_TOOL: + +Create a New Data Logger Tool +--------------------------------------- + +**UID:** TST.DATALOGGER.CREATAE_NEW_DATA_LOGGER_TOOL + +**Description:** Create a new tool and check if the new tool is created + +**OS:** ANY + +**Preconditions:** + * Connect to :ref:`AdalmPluto.Emu ` or + :ref:`AdalmPluto.Device ` + +**Steps:** + 1. Open Data logger plugin + 2. Press **+** button + + * **Expected result:** New tool is created we are moved to the + new tool the new tool has **x** button next to **+** + +**Result:** PASS/FAIL + +.. _TST_DATALOGGER_REMOVE_AN_CREATED_TOOL: + +Remove an Created Tool +--------------------------------- + +**UID:** TST.DATALOGGER.REMOVE_AN_CREATED_TOOL + +**Description:** Remove the tool and check if the tool is removed + +**OS:** ANY + +**Preconditions:** + * Connect to :ref:`AdalmPluto.Emu ` or + :ref:`AdalmPluto.Device ` + +**Prerequisites:** + * :ref:`Create a New Data Logger Tool ` is passed + +**Steps:** + 1. Open Data logger plugin + 2. Press **+** button + 3. Press **x** button next to **+** + + * **Expected result:** Tool is removed + +**Result:** PASS/FAIL + +.. _TST_DATALOGGER_Vertify_REMOVAL_DISABLED_FOR_DEFAULT_TOOL: + +Verify Removal Disabled for Default Tool +-------------------------------------------------- + +**UID:** TST.DATALOGGER.VERTIFY_REMOVAL_DISABLED_FOR_DEFAULT_TOOL + +**Description:** Check if the remove tool is disabled for the first tool + +**OS:** ANY + +**Preconditions:** + * Connect to :ref:`AdalmPluto.Emu ` or + :ref:`AdalmPluto.Device ` + +**Steps:** + 1. Open Data logger plugin + 2. Press **+** button + + * **Expected result:** A new tool where **x** button is available + is created + + 3. Open original data logger tool + + * **Expected result:** No **x** button is available + +**Result:** PASS/FAIL + +.. _TST_DATALOGGER_PRINT_COLLECTED_DATA: + +Print Collected Data +------------------------------ + +**UID:** TST.DATALOGGER.PRINT_COLLECTED_DATA + +**Description:** Print the data and check if the data is printed + +**OS:** ANY + +**Preconditions:** + * Connect to :ref:`AdalmPluto.Emu ` or + :ref:`AdalmPluto.Device ` + +**Prerequisites:** + * :ref:`Run and Stop Data Logging ` is passed + +**Steps:** + 1. Open Data logger plugin + 2. Using channel menu enable channel **voltage0** of **xadc** device + 3. Press **Run** button + 4. Wait for some data to be collected + 5. Press **Print** button + 6. Chose directory where to save the file + + * **Expected result:** + Data is saved to a pdf file in the chosen + directory + * **Expected result:** + The file name structure is + "Sopy-Data-Logger--