diff --git a/docs/tests/plugins/datalogger/datalogger_test.rst b/docs/tests/plugins/datalogger/datalogger_test.rst new file mode 100644 index 0000000000..6e76c314cd --- /dev/null +++ b/docs/tests/plugins/datalogger/datalogger_test.rst @@ -0,0 +1,997 @@ +.. _datalogger_tests: + +Datalogger Test Suite +================================================================================ + +:ref:`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: +Test 1: 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 + * 1 / 0 + * true / false + +.. _TST_DATALOGGER_RUN_STOP_DATA_LOGGING: +Test 2 : 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: + * Test 1 is passed + * 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 + * Expected result: Data is being collected and displayed on the plot + * Expected result: "Run" button is changed to "Stop" + 4. Press "Stop" button + * Expected result: Data is no longer being collected and displayed on the plot + * Expected result: "Stop" button is changed to "Run" + +Result: + * pass / fail + * 1 / 0 + * true / false + +.. _TST_DATALOGGER_CLEAR_COLLECTED_DATA: +Test 3 : 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: + * Test 2 is passed + * 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 + 5. Press "Stop" button + 6. Press "Clear" button + * Expected result: Data is removed from the plot + +Result: + * pass / fail + * 1 / 0 + * true / false + +.. _TST_DATALOGGER_CLEAR_DATA_WHILE_RUNNING: +Test 4 : 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: + * Test 2 is passed + * 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 + 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 + * 1 / 0 + * true / false + +.. _TST_DATALOGGER_CREATAE_NEW_DATA_LOGGER_TOOL: +Test 5 : 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 + * 1 / 0 + * true / false + +.. _TST_DATALOGGER_REMOVE_AN_CREATED_TOOL: +Test 6 : 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: + * Test 5 is passed + * connect to :ref:`AdalmPluto.Emu ` or :ref:`AdalmPluto.Device ` + +Seteps: + 1. Open Data logger plugin + 2. Press "+" button + 3. Press "x" button next to "+" + * Expected result: Tool is removed + +Result: + * pass / fail + * 1 / 0 + * true / false + +.. _TST_DATALOGGER_VERTIFY_REMOVAL_DISABLED_FOR_DEFAULT_TOOL: +Test 7 : 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 + * 1 / 0 + * true / false + +.. _TST_DATALOGGER_PRINT_COLLECTED_DATA: +Test 8 : Print Collected Data +------------------------------ + +UID: TST.DATALOGGER.PRINT_COLLECTED_DATA + +Description: + * Print the data and check if the data is printed + +OS: any + +Preconditions: + * Test 2 is passed + * 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 + 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--