From 439929a000c6685ec108a3d21d9d83a3733b3bc9 Mon Sep 17 00:00:00 2001 From: AlexandraTrifan Date: Fri, 10 Jan 2025 17:14:02 +0200 Subject: [PATCH 01/32] docs: add default structure for all test cases Signed-off-by: AlexandraTrifan --- docs/index.rst | 3 ++- docs/tests/index.rst | 13 +++++++++++++ docs/tests/plugins/index.rst | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 docs/tests/index.rst create mode 100644 docs/tests/plugins/index.rst diff --git a/docs/index.rst b/docs/index.rst index 268420b8d..e00b4f75e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,11 +23,12 @@ Contents .. toctree:: :includehidden: - :maxdepth: 3 + :maxdepth: 6 user_guide/index plugins/index developer_guide/index + tests/index user_guide/preferences diff --git a/docs/tests/index.rst b/docs/tests/index.rst new file mode 100644 index 000000000..85f00124c --- /dev/null +++ b/docs/tests/index.rst @@ -0,0 +1,13 @@ +.. _tests_general: + +Test Cases +=============================================================================== + +Contents +--------------------------------------------------------------------- + +.. toctree:: + :includehidden: + :maxdepth: 3 + + plugins/index \ No newline at end of file diff --git a/docs/tests/plugins/index.rst b/docs/tests/plugins/index.rst new file mode 100644 index 000000000..ffd245d65 --- /dev/null +++ b/docs/tests/plugins/index.rst @@ -0,0 +1,16 @@ +.. _tests_plugins: + +Plugins Test Cases +=============================================================================== + +Contents +--------------------------------------------------------------------- + +.. toctree:: + :includehidden: + :maxdepth: 3 + +.. + add the path to each plugin test case here + example dac/dac_tests + From 0c1715a2975bcd27f1c5c3d405cb4927edc0e2d9 Mon Sep 17 00:00:00 2001 From: andreidanila1 Date: Fri, 10 Jan 2025 17:56:59 +0200 Subject: [PATCH 02/32] docs/tests: Added general dir to the default structure. Signed-off-by: andreidanila1 --- docs/tests/general/index.rst | 16 ++++++++++++++++ docs/tests/index.rst | 5 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 docs/tests/general/index.rst diff --git a/docs/tests/general/index.rst b/docs/tests/general/index.rst new file mode 100644 index 000000000..471196f0a --- /dev/null +++ b/docs/tests/general/index.rst @@ -0,0 +1,16 @@ +.. _tests_general: + +General Test Cases +=============================================================================== + +Contents +--------------------------------------------------------------------- + +.. toctree:: + :includehidden: + :maxdepth: 3 + +.. + add the path to each core feature test case here + example core/homepage_tests + diff --git a/docs/tests/index.rst b/docs/tests/index.rst index 85f00124c..71b0951ea 100644 --- a/docs/tests/index.rst +++ b/docs/tests/index.rst @@ -1,4 +1,4 @@ -.. _tests_general: +.. _tests_scopy: Test Cases =============================================================================== @@ -10,4 +10,5 @@ Contents :includehidden: :maxdepth: 3 - plugins/index \ No newline at end of file + plugins/index + general/index From 3b8bdb8d13aa12c197c3030c420e2af9926f90fb Mon Sep 17 00:00:00 2001 From: andreidanila1 Date: Wed, 8 Jan 2025 12:16:12 +0200 Subject: [PATCH 03/32] docs/pqm: Changed the instrument labels. Signed-off-by: andreidanila1 --- docs/plugins/index.rst | 8 ++++---- docs/plugins/pqm/harmonics.rst | 2 +- docs/plugins/pqm/rms.rst | 2 +- docs/plugins/pqm/settings.rst | 2 +- docs/plugins/pqm/waveform.rst | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index 05d0b8a67..ebdc161a5 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -45,10 +45,10 @@ Application Specific plugins * :ref:`Faults ` * PQM - * :ref:`RMS ` - * :ref:`Harmonics ` - * :ref:`Waveform ` - * :ref:`Settings ` + * :ref:`RMS ` + * :ref:`Harmonics ` + * :ref:`Waveform ` + * :ref:`Settings ` Contents diff --git a/docs/plugins/pqm/harmonics.rst b/docs/plugins/pqm/harmonics.rst index 848a7b466..abdce1629 100644 --- a/docs/plugins/pqm/harmonics.rst +++ b/docs/plugins/pqm/harmonics.rst @@ -1,4 +1,4 @@ -.. _harmonics: +.. _pqm-harmonics: Harmonics ================================================================================ diff --git a/docs/plugins/pqm/rms.rst b/docs/plugins/pqm/rms.rst index f1c646dc2..9fc210b26 100644 --- a/docs/plugins/pqm/rms.rst +++ b/docs/plugins/pqm/rms.rst @@ -1,4 +1,4 @@ -.. _rms: +.. _pqm-rms: RMS ================================================================================ diff --git a/docs/plugins/pqm/settings.rst b/docs/plugins/pqm/settings.rst index a38d272d3..3c1f375aa 100644 --- a/docs/plugins/pqm/settings.rst +++ b/docs/plugins/pqm/settings.rst @@ -1,4 +1,4 @@ -.. _settings: +.. _pqm-settings: System settings ================================================================================ diff --git a/docs/plugins/pqm/waveform.rst b/docs/plugins/pqm/waveform.rst index f2d966319..0847813c1 100644 --- a/docs/plugins/pqm/waveform.rst +++ b/docs/plugins/pqm/waveform.rst @@ -1,4 +1,4 @@ -.. _waveform: +.. _pqm-waveform: Waveform ================================================================================ From e63becf11adc8fdead0b43751ea19eba639e8ff9 Mon Sep 17 00:00:00 2001 From: andreidanila1 Date: Wed, 8 Jan 2025 12:22:49 +0200 Subject: [PATCH 04/32] docs/tests/general: Added core tests. The tests cover: home page, add page, connection flow, emu and device interaction. Signed-off-by: andreidanila1 --- docs/tests/general/core/add_dev_tests.rst | 313 +++++++++++++++++ docs/tests/general/core/connection_tests.rst | 164 +++++++++ docs/tests/general/core/dev_tests.rst | 338 +++++++++++++++++++ docs/tests/general/core/emu_tests.rst | 292 ++++++++++++++++ docs/tests/general/core/hp_tests.rst | 186 ++++++++++ docs/tests/general/index.rst | 6 + 6 files changed, 1299 insertions(+) create mode 100644 docs/tests/general/core/add_dev_tests.rst create mode 100644 docs/tests/general/core/connection_tests.rst create mode 100644 docs/tests/general/core/dev_tests.rst create mode 100644 docs/tests/general/core/emu_tests.rst create mode 100644 docs/tests/general/core/hp_tests.rst diff --git a/docs/tests/general/core/add_dev_tests.rst b/docs/tests/general/core/add_dev_tests.rst new file mode 100644 index 000000000..dc028294a --- /dev/null +++ b/docs/tests/general/core/add_dev_tests.rst @@ -0,0 +1,313 @@ +.. _add_dev_tests: + +Add device +========== + +.. note:: + + User guide: :ref:`Scopy Overview `. + +Setup environment: +------------------ + +.. _m2k-emu-add: + +**M2k.Emu:** + - Open Scopy. + - Start the iio-emu process using "adalm2000" in the dropdown and + "ip:127.0.0.1" as URI. + +Test 1: Verifying the device scanning functionality. +---------------------------------------------------- + +**UID:** TST.ADD.SCAN_ALL + +**Description:** This test checks that the device scan correctly detects and +lists available devices when initiated. + +**Preconditions:** + - Scopy is installed on the system. + - OS: ANY. + +**Steps:** + 1. Connect an **ADALM2000** device to the system by USB. + 2. Open Scopy. + 3. Click on **Add device** (+) button. + 4. Click on the refresh button on the right located in the **Add page** scan + section. + 5. Wait until the refresh animation stops. + - **Expected result:** In the "Context" dropdown, all available devices + are listed, each item containing the device name/description and URI. The + **ADALM2000** device [usb] must appear in the list. + +**Result:** PASS/FAIL + +Test 2: Verifying the local device scanning functionality. +---------------------------------------------------------- + +**UID:** TST.ADD.SCAN_LOCAL + +**Description:** This test checks that the device scan correctly detects and +lists available local devices when initiated. + +**Preconditions:** + - Scopy is installed on the system. + - There is at least one IIO device connected to the system that has local + backend. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **local** checkbox located in the **Add page** scan section. + 4. Wait until the refresh animation stops. + - **Expected result:** In the "Context" dropdown, all available local + devices are listed, each item containing the device name/description and URI. + If there is no available device the "No scanned devices available!" message + is displayed. + +**Result:** PASS/FAIL + +Test 3: Verifying the ip device scanning functionality. +------------------------------------------------------- + +**UID:** TST.ADD.SCAN_IP + +**Description:** This test checks that the device scan correctly detects and +lists available ip devices when initiated. + +**Preconditions:** + - Scopy is installed on the system. + - There is at least one IIO device connected to the system that has ip + backend. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **ip** checkbox located in the **Add page** scan section. + 4. Wait until the refresh animation stops. + - **Expected result:** In the "Context" dropdown, all available ip + devices are listed, each item containing the device name/description and URI. + If there is no available device the "No scanned devices available!" message + is displayed. + +**Result:** PASS/FAIL + +Test 4: Verifying the usb device scanning functionality. +-------------------------------------------------------- + +**UID:** TST.ADD.SCAN_USB + +**Description:** This test checks that the device scan correctly detects and +lists available usb devices when initiated. + +**Preconditions:** + - Scopy is installed on the system. + - OS: ANY. + +**Steps:** + 1. Connect an **ADALM2000** device to the system by USB. + 2. Open Scopy. + 3. Click on **Add device** (+) button. + 4. Click on **usb** checkbox located in the **Add page** scan section. + 5. Wait until the refresh animation stops. + - **Expected result:** In the "Context" dropdown, all available usb + devices are listed, each item containing the device name/description + and URI. The **ADALM2000** device must appear in the list. + +**Result:** PASS/FAIL + +Test 5: Verifying the serial device scanning functionality. +----------------------------------------------------------- + +**UID:** TST.ADD.SCAN_SERIAL + +**Description:** This test checks that the device scan correctly detects and +lists available serial devices when initiated. + +**Preconditions:** + - Scopy is installed on the system. + - There is at least one IIO device connected to the system that has serial + backend. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on the refresh button on the right located in the **Add page** + serial port section. + 4. Wait until the refresh animation stops. + - **Expected result:** In the "Name" dropdown, all available serial + devices are listed, each item containing the device name/description + and URI. If there is no available device the "No scanned devices + available!" message is displayed. + +**Result:** PASS/FAIL + +Test 6: Scanning with no device. +-------------------------------- + +**UID:** TST.ADD.SCAN_EMPTY + +**Description:** This test checks whether an appropriate message is displayed +when no device is found. + +**Preconditions:** + - Scopy is installed on the system. + - OS: ANY. + +**Steps:** + 1. Run Scopy. + 2. Make sure that no devices using USB backends are connected to the system. + 3. Click on **Add device** (+) button. + 4. Click on **usb** checkbox located in the **Add page** scan section. + 5. Wait until the refresh animation stops. + - **Expected result:** The "No scanned devices available!" message is + displayed. + +**Result:** PASS/FAIL + +.. _tst-add-verify: + +Test 7: Device validation. +-------------------------- + +**UID:** TST.ADD.VERIFY + +**Description:** This test verifies that the device validation works correctly. + +**Test prerequisites:** + - :ref:`TST.EMU.EN `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: ANY. + +**Steps:** + 1. Click on **Add device** (+) button. + 2. Introduce the "ip:127.0.0.1" URI. + 3. Click on **Verify** button. + - **Expected result:** A loading animation starts and after a short time + a page with device details and compatible plugins is displayed. + +**Result:** PASS/FAIL + +Test 8: Verify the "BACK" button from compatible plugin page. +------------------------------------------------------------- + +**UID:** TST.ADD.PLUGINS_BACK + +**Description:** This test checks if the **BACK** button works correctly. + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: ANY. + +**Steps:** + 1. Click on **Add device** (+) button. + 2. Introduce the "ip:127.0.0.1" URI. + 3. Click on **Verify** button. + 4. Click on **BACK** button. + - **Expected result:** The verify page is displayed. + +**Result:** PASS/FAIL + +.. _tst-add-plugins-add: + +Test 9: Verify the "ADD DEVICE" button from compatible plugin page (single plugin). +----------------------------------------------------------------------------------- + +**UID:** TST.ADD.PLUGINS_ADD_SINGLE + +**Description:** This test checks if the **ADD DEVICE** button works correctly. +Only the main plugin of the device is used. + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: ANY. + +**Steps:** + 1. Click on **Add device** (+) button. + 2. Introduce the "ip:127.0.0.1" URI. + 3. Click on **Verify** button. + - **Expected result:** Only the M2kPlugin should be selected in the + compatible plugins section. + 4. Click on **ADD DEVICE** button. + - **Expected result:** The device is added to the device browser, the + device's info page is displayed, and the m2k tools are added to the + tool menu. + +**Result:** PASS/FAIL + +Test 10: Verify the "ADD DEVICE" button from compatible plugin page (multiple plugins). +--------------------------------------------------------------------------------------- + +**UID:** TST.ADD.PLUGINS_ADD_MULTIPLE + +**Description:** This test checks if the **ADD DEVICE** button works correctly. +Multiple plugins are used. + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: ANY. + +**Steps:** + 1. Click on **Add device** (+) button. + 2. Introduce the "ip:127.0.0.1" URI. + 3. Click on **Verify** button. + - **Expected result:** Only the M2kPlugin should be selected in the + compatible plugins section. + 4. Select the DebuggerPlugin. + 5. Click on **ADD DEVICE** button. + - **Expected result:** The device is added to the device browser, the + device's info page is displayed, and all tools, including the debugger, are added + to the tool menu. + +**Result:** PASS/FAIL + +Test 11: Verify the "ADD DEVICE" button from compatible plugin page with no plugin selected. +-------------------------------------------------------------------------------------------- + +**UID:** TST.ADD.PLUGINS_EMPTY + +**Description:** This test checks if the **ADD DEVICE** button works correctly. + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: ANY. + +**Steps:** + 1. Click on **Add device** (+) button. + 2. Introduce the "ip:127.0.0.1" URI. + 3. Click on **Verify** button. + - **Expected result:** Only the M2kPlugin should be selected in the + compatible plugins section. + 4. Uncheck the M2kPlugin. + 5. Click on **ADD DEVICE** button. + - **Expected result:** A NO_PLUGIN device is added in device browser and + in tool menu. + +**Result:** PASS/FAIL \ No newline at end of file diff --git a/docs/tests/general/core/connection_tests.rst b/docs/tests/general/core/connection_tests.rst new file mode 100644 index 000000000..4675babbe --- /dev/null +++ b/docs/tests/general/core/connection_tests.rst @@ -0,0 +1,164 @@ +.. _connection_tests: + +Connection flow +=============== + +.. note:: + + User guide: :ref:`Scopy Overview `. + +Setup environment: +------------------ + +.. _m2k-emu-conn: + +**M2k.Emu:** + - Open Scopy. + - Start the iio-emu process using "adalm2000" in the dropdown and + "ip:127.0.0.1" as URI. + - Add the device in device browser. + +.. _m2k-usb-conn: + +**M2k.Usb:** + - Open Scopy. + - Connect an **ADALM2000** device to the system by USB. + - Add the device in device browser. + +.. _tst-conn-succ: + +Test 1: Verify the connection flow. +----------------------------------- + +**UID:** TST.CONN.SUCC + +**Description:** This test checks if the **Connect** button works correctly. + +**Test prerequisites:** + - :ref:`TST.ADD.PLUGINS_ADD_SINGLE ` + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed in the system. + - Use :ref:`M2k.Emu ` setup. + - OS: ANY. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on **Connect** button. + - **Expected result:** The **Disconnect** button appears, a status LED + is displayed under the icon in the device browser, and a progress bar + appears in the application's status bar. After a while, the connection + is established, the status LED turns green, and the tools in the menu + become accessible. + +**Result:** PASS/FAIL + +Test 2: Unplug the device while connecting (AUTO-SCAN). +------------------------------------------------------- + +**UID:** TST.CONN.UNPLUG_AUTO + +**Description:** This test verifies Scopy's behavior when the device is +unplugged during the connection process. + +**Test prerequisites:** + - :ref:`TST.HP.AUTO_SCAN_ON `. + +**Preconditions:** + - Scopy is installed on the system. + - The "Regularly scan for new devices" preference is enabled in the + preferences page. + - Use :ref:`M2k.Usb ` setup. + - OS: ANY. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on **Connect** button. + 3. Unplug the device while connecting. + - **Expected result:** The device is removed from device browser. + +**Result:** PASS/FAIL + +Test 3: Unplug the device while connecting (MANUAL-SCAN). +--------------------------------------------------------- + +**UID:** TST.CONN.UNPLUG_AUTO + +**Description:** This test verifies Scopy's behavior when the device is +unplugged during the connection process. + +**Test prerequisites:** + - :ref:`TST.HP.MANUAL_SCAN `. + +**Preconditions:** + - Scopy is installed on the system. + - The "Regularly scan for new devices" preference is disabled in the + preferences page. + - Use :ref:`M2k.Usb ` setup. + - OS: ANY. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on **Connect** button. + 3. Unplug the device while connecting. + - **Expected result:** A warning icon appears in the top-right corner + of the device in the device browser, and when hovered over, the + message "The device is not available! Verify the connection!" is + displayed. + +**Result:** PASS/FAIL + +Test 4: Unplug the device before connecting. +-------------------------------------------- + +**UID:** TST.CONN.UNPLUG_BEFORE + +**Description:** This test verifies Scopy's behavior when the device is +unplugged before the connection process. + +**Test prerequisites:** + - :ref:`TST.HP.MANUAL_SCAN `. + +**Preconditions:** + - Scopy is installed on the system. + - The "Regularly scan for new devices" preference is disabled in the + preferences page. + - Use :ref:`M2k.Usb ` setup. + - OS: ANY. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Unplug the device. + 3. Click on **Connect** button. + - **Expected result:** The connection process starts but does not + complete. A warning icon appears in the top-right corner. + +**Result:** PASS/FAIL + +Test 5: Disconnecting a device. +------------------------------- + +**UID:** TST.CONN.DISCONN + +**Description:** This test checks if the **Disconnect** button works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed in the system. + - Use :ref:`M2k.Emu ` setup. + - OS: ANY. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on **Connect** button. + 3. Wait until the connection is done . + 4. Click on **Disconnect** button. + - **Expected result:** The device is disconnected, the **Connect** + button appears, the device remains in the device browser, and the + tools in the menu are no longer accessible. + +**Result:** PASS/FAIL \ No newline at end of file diff --git a/docs/tests/general/core/dev_tests.rst b/docs/tests/general/core/dev_tests.rst new file mode 100644 index 000000000..16d774460 --- /dev/null +++ b/docs/tests/general/core/dev_tests.rst @@ -0,0 +1,338 @@ +.. _dev_tests: + +Device interaction +================== + +.. note:: + + User guide: :ref:`Scopy Overview `. + +Setup environment: +------------------ + +.. _m2k-emu-dev: + +**M2k.Emu:** + - Open Scopy. + - Start the iio-emu process using "adalm2000" in the dropdown and + "ip:127.0.0.1" as URI. + - Add the device in device browser. + +.. _m2k-usb-dev: + +**M2k.Usb:** + - Open Scopy. + - Connect an **ADALM2000** device to the system by USB. + - Add the device in device browser. + +Test 1: Verifying the device button. +------------------------------------ + +**UID:** TST.HP.DEV_BTN + +**Description:** To verify that clicking on the device button triggers the +expected action: displaying device details and device tools. + +**Test prerequisites:** + - :ref:`TST.ADD.PLUGINS_ADD_SINGLE `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the device icon. + 2. Observe the application's behavior. + - **Expected result:** The device details page is displayed in the + info page section, and in the tool menu (on the left), the device + is added with a list of available tools (in this form, the tools + cannot be accessed). + +**Result:** PASS/FAIL + +Test 2: Remove a device from device browser. +-------------------------------------------- + +**UID:** TST.DEV.FORGET + +**Description:** This test checks if the "Forget" (x) button work correctly. + +**Test prerequisites:** + - :ref:`TST.ADD.PLUGINS_ADD_SINGLE `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click the **Forget** button located at the bottom-right of the device icon. + - **Expected result:** The device is removed from device browser. + +**Result:** PASS/FAIL + +Test 3: Remove a device from device browser while it is connected. +------------------------------------------------------------------ + +**UID:** TST.DEV.FORGET_CONN + +**Description:** This test verifies whether Scopy properly handles the removal +of a connected device. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on **Connect** button. + 3. Click the **Forget** button located at the bottom-right of the device icon. + - **Expected result:** Initially, the device is disconnected and then + successfully removed from the device browser. + +**Result:** PASS/FAIL + +Test 4: Edit the name of the device. +------------------------------------ + +**UID:** TST.DEV.EDIT_NAME + +**Description:** This test checks if the **Edit pen** button work correctly. + +**Test prerequisites:** + - :ref:`TST.ADD.PLUGINS_ADD_SINGLE `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Place the cursor in the top-right corner of the device icon in the + device browser. + 2. After the pen icon appears, click on it. + 3. Delete "M2k". + 4. Write "M3k". + 5. Press enter. + - **Expected result:** The device name changes both in the device + browser and in the tool menu. + +**Result:** PASS/FAIL + +Test 5: Select a tool. +---------------------- + +**UID:** TST.DEV.SELECT_TOOL + +**Description:** This test checks if the tool infrastructure works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on **Connect** button. + 3. Click on "Oscilloscope" tool. + - **Expected result:** The "Oscilloscope" tool is displayed and the + tool menu item is highlighted. + 4. Click on "Home" menu entry. + - **Expected result:** The device page is displayed and the home menu + item is highlighted. + +**Result:** PASS/FAIL + +.. _tst-dev-detach-tool: + +Test 6: Detach a tool. +---------------------- + +**UID:** TST.DEV.DETACH_TOOL + +**Description:** This test checks if the tool detachment mechanism is working +correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on **Connect** button. + 3. Double click on "Oscilloscope" tool. + - **Expected result:** The "Oscilloscope" tool is integrated into a + separate window from the application. The window title should be: + "Scopy-M2kPlugin-Oscilloscope-ip:127.0.0.1". + 4. Close the "Oscilloscope" window. + - **Expected result:** The "Oscilloscope" tool is reintegrated into + the main window. + 5. Detach the oscilloscope tool again. + 6. Close the application. + - **Expected result:** Scopy finished successfully. + +**Result:** PASS/FAIL + +Test 7: Reopen the app with a detached tool. +-------------------------------------------- + +**UID:** TST.DEV.DETACH_TOOL_RE + +**Description:** This test checks whether detached tools retain their state upon +reconnection. + +**Test prerequisites:** + - :ref:`TST.DEV.DETACH_TOOL `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - The application was previously closed with a detached tool (Oscilloscope). + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on **Connect** button. + - **Expected result:** The oscilloscope tool is detached. + +**Result:** PASS/FAIL + +Test 8: Collapse device tools in the tool menu. +----------------------------------------------- + +**UID:** TST.DEV.COLLAPSE + +**Description:** This test verifies if the collapse feature works properly in +the tool menu. + +**Test prerequisites:** + - :ref:`TST.ADD.PLUGINS_ADD_SINGLE `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`M2k.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the device icon from device browser. + 2. Click on the device header from tool menu. + - **Expected result:** The tools collapse. + 3. Repeat 2. + - **Expected result:** The tools expand. + +**Result:** PASS/FAIL + +.. _tst-dev-multi-conn: + +Test 9: Connecting to multiple devices. +--------------------------------------- + +**UID:** TST.DEV.MULTI_CONN + +**Description:** This test checks if connecting to multiple devices is working +properly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - The "Connect to multiple devices" preference is enabled in the preferences + page. + - Use :ref:`M2k.Emu ` and :ref:`M2k.Usb ` setups. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the emu device icon from device browser. + 2. Click on **Connect** button. + - **Expected result:** The connection is established successfully. + 3. Click on the usb device icon from device browser. + 4. Click on **Connect** button. + - **Expected result:** The connection is established successfully, both + device icons have a green status LED, both devices are entered into the + tool menu (the device header contains the device name and uri), and the + tools of each device can be accessed. If the menu contains too many + entries, then the scroll bar will become visible. + +**Result:** PASS/FAIL + +Test 10: Resource manager with multiple devices. +------------------------------------------------ + +**UID:** TST.DEV.RM_MULTI + +**Description:** This test verifies that the resource manager is being used +properly. + +**Test prerequisites:** + - :ref:`TST.DEV.MULTI_CONN `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - The "Connect to multiple devices" preference is enabled in the + preferences page. + - Use :ref:`M2k.Emu ` and :ref:`M2k.Usb ` setups. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the emu device icon from device browser. + 2. Click on **Connect** button. + 3. Click on the usb device icon from device browser. + 4. Click on **Connect** button. + 5. Click on the "Oscilloscope" run button of the emu device in the tool menu. + - **Expected result:** The button changes from stop button to run button + (green color). + 6. Click on the "Spectrum Analyzer" run button of the usb device in the tool menu. + - **Expected result:** The button changes from stop button to run button, + and the oscilloscope button (of the emu device) remains the same. + +**Result:** PASS/FAIL + +Test 11: Devices order in device browser. +----------------------------------------- + +**UID:** TST.DEV.ADD_ORDER + +**Description:** This test verifies that each newly added device is finally +entered into the device browser. + +**Test prerequisites:** + - :ref:`TST.ADD.PLUGINS_ADD_SINGLE `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - The "Connect to multiple devices" preference is enabled in the + preferences page. + - Use :ref:`M2k.Emu ` and :ref:`M2k.Usb ` setups. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Add the emu device. + 2. Add the usb device. + - **Expected result:** The usb device is on the right side of emu + device. + +**Result:** PASS/FAIL \ No newline at end of file diff --git a/docs/tests/general/core/emu_tests.rst b/docs/tests/general/core/emu_tests.rst new file mode 100644 index 000000000..7c698d0f0 --- /dev/null +++ b/docs/tests/general/core/emu_tests.rst @@ -0,0 +1,292 @@ +.. _emu_tests: + +EMU +=== + +.. note:: + + User guide: :ref:`Scopy Overview `. + +.. _tst-emu-en: + +Test 1: Enable the emulator. +---------------------------- + +**UID:** TST.EMU.EN + +**Description:** This test verifies if starting the emulator in Scopy works +correctly. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + 4. From "Device" dropdown select "adalm2000". + 5. Click on **Enable** button. + - **Expected result:** The IIO device tab is selected, and the URI + "ip:127.0.0.1" is entered in the corresponding section. + +**Result:** PASS/FAIL + +Test 2: EMU is not installed. +----------------------------- + +**UID:** TST.EMU.NOT + +**Description:** This test verifies if Scopy handles the situation correctly +when the IIO emulator is not found. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is not installed on the system. + - Modify the "iio_emu_path" preference from "preferences.ini" file with an + invalid path (you can access the file through the **Open** button in the + general preferences). + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + - **Expected result:** All the components are disabled and the message + "Can't find iio-emu in the system!" is displayed. + +**Result:** PASS/FAIL + +Test 3: Disable the emulator. +----------------------------- + +**UID:** TST.EMU.DIS + +**Description:** This test verifies if stopping the emulator in Scopy works +correctly. + +**Test prerequisites:** + - :ref:`TST.EMU.EN `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + 4. From "Device" dropdown select "adalm2000". + 5. Click on **Enable** button. + 6. Click on **Emulator** tab. + 7. Click on **Disable** button. + - **Expected result:** The fields in this tab become editable, and the + **Enable** button appears. + +**Result:** PASS/FAIL + +Test 4: Disable the emulator while the emulated device is connected. +-------------------------------------------------------------------- + +**UID:** TST.EMU.DIS_CONN + +**Description:** The test verifies if Scopy handles the situation correctly +when an emulated device is connected and the "iio-emu" process is stopped. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Start the iio-emu process using "adalm2000" in the dropdown and + "ip:127.0.0.1" as URI. + 3. Add the device in device browser. + 4. Connect to emu device. + 5. Click on **Add device** (+) button. + 6. Click on **Emulator** tab. + 7. Click on **Disable** button. + - **Expected result:** The fields in this tab become editable, and the + **Enable** button appears. After a few seconds, the device is + disconnected. + +**Result:** PASS/FAIL + +Test 5: Verify adalm2000 emu device. +------------------------------------ + +**UID:** TST.EMU.EN_ADALM2000 + +**Description:** This test verifies if starting the emulator in Scopy works +correctly (using adalm2000 device). + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + 4. From "Device" dropdown select "adalm2000". + 5. Click on **Enable** button. + 6. Click on **Verify** button. + - **Expected result:** The compatible plugins page opens. The compatible + plugins are: M2kPlugin (checked), ADCPlugin, DACPlugin, DataLoggerPlugin, + DebuggerPlugin, RegmapPlugin. + +**Result:** PASS/FAIL + +Test 6: Verify pluto emu device. +-------------------------------- + +**UID:** TST.EMU.EN_PLUTO + +**Description:** This test verifies if starting the emulator in Scopy works +correctly (using pluto device). + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + 4. From "Device" dropdown select "pluto". + 5. Click on **Enable** button. + 6. Click on **Verify** button. + - **Expected result:** The compatible plugins page opens. The compatible + plugins are: ADCPlugin (checked), DACPlugin (checked), DataLoggerPlugin + (checked), DebuggerPlugin (checked), RegmapPlugin (checked). + +**Result:** PASS/FAIL + +Test 7: Verify pqm emu device. +------------------------------ + +**UID:** TST.EMU.EN_PQM + +**Description:** This test verifies if starting the emulator in Scopy works +correctly (using pqm device). + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + 4. From "Device" dropdown select "pqm". + 5. Click on **Enable** button. + 6. Click on **Verify** button. + - **Expected result:** The compatible plugins page opens. The compatible + plugins are: PQMPlugin (checked), ADCPlugin, DACPlugin, DataLoggerPlugin, + DebuggerPlugin. + + +**Result:** PASS/FAIL + +Test 8: Verify swiot_config emu device. +--------------------------------------- + +**UID:** TST.EMU.EN_SWIOT_CONFIG + +**Description:** This test verifies if starting the emulator in Scopy works +correctly (using swiot_config device). + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + 4. From "Device" dropdown select "swiot_config". + 5. Click on **Enable** button. + 6. Click on **Verify** button. + - **Expected result:** The compatible plugins page opens. The compatible + plugins are: SWIOTPlugin (checked), DataLoggerPlugin, DebuggerPlugin. + +**Result:** PASS/FAIL + +Test 9: Verify swiot_runtime emu device. +---------------------------------------- + +**UID:** TST.EMU.EN_SWIOT_RUNTIME + +**Description:** This test verifies if starting the emulator in Scopy works +correctly (using swiot_runtime device). + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + 4. From "Device" dropdown select "swiot_runtime". + 5. Click on **Enable** button. + 6. Click on **Verify** button. + - **Expected result:** The compatible plugins page opens. The compatible + plugins are: SWIOTPlugin (checked), ADCPlugin, DataLoggerPlugin, + DebuggerPlugin, RegmapPlugin. + +**Result:** PASS/FAIL + +Test 10: Verify generic emu device. +----------------------------------- + +**UID:** TST.EMU.EN_GENERIC + +**Description:** This test verifies if starting the emulator in Scopy works +correctly (using generic device). + +**Test prerequisites:** + - :ref:`TST.ADD.VERIFY `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Open Scopy. + 2. Click on **Add device** (+) button. + 3. Click on **Emulator** tab. + 4. From "Device" dropdown select "generic". + 5. Click on **Enable** button. + 6. Click on **Verify** button. + - **Expected result:** The message **"ip:127.0.0.1" not a valid + context!** is displayed. + +**Result:** PASS/FAIL \ No newline at end of file diff --git a/docs/tests/general/core/hp_tests.rst b/docs/tests/general/core/hp_tests.rst new file mode 100644 index 000000000..33c97a6ee --- /dev/null +++ b/docs/tests/general/core/hp_tests.rst @@ -0,0 +1,186 @@ +.. _hp_tests: + +Homepage +======== + +.. note:: + + User guide: :ref:`Scopy Overview `. + +Test 1: The homepage displays correctly when running the application. +--------------------------------------------------------------------- + +**UID:** TST.HP.RUN + +**Description:** This test checks if the homepage is displayed correctly. + +**Preconditions:** + - Scopy is installed on the system. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Observe the application's behavior. + - **Expected result:** The application launches without errors and the + home page is displayed. + +**Result:** PASS/FAIL + +Test 2: Verifying the "Add device" (+) button. +---------------------------------------------- + +**UID:** TST.HP.ADD + +**Description:** This test checks if the **Add device** button works correctly. + +**Preconditions:** + - Scopy is installed on the system. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Navigate to the application's home page. + 3. Click on the **Add device** button. + 4. Observe the application's behavior. + - **Expected result:** The page for adding a new device is displayed in + the info page section. + +**Result:** PASS/FAIL + +.. _tst-hp-auto-scan-on: + +Test 3: Verifying the auto-scan feature (ON). +--------------------------------------------- + +**UID:** TST.HP.AUTO_SCAN_ON + +**Description:** This test checks if the auto-scan feature detects and lists all + available devices correctly. + +**Preconditions:** + - Scopy is installed on the system. + - The "Regularly scan for new devices" preference is enabled in the + preferences page. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Ensure the **Scan** switch is enabled in the device browser section. + 3. Connect an **ADALM2000** device to the system by USB. + 4. Observe the application's behavior. + - **Expected result:** After a short period, the device appears in the + device browser section. + +**Result:** PASS/FAIL + +.. _tst-hp-auto-scan-off: + +Test 4: Verifying the auto-scan feature (OFF). +---------------------------------------------- + +**UID:** TST.HP.AUTO_SCAN_OFF + +**Description:** This test checks the behavior of the application when the auto- +scan is turned off. + +**Preconditions:** + - Scopy is installed on the system. + - The "Regularly scan for new devices" preference is enabled in the + preferences page. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Ensure the **Scan** switch is disabled in the device browser section. + 3. Connect an **ADALM2000** device to the system by USB. + 4. Observe the application's behavior. + - **Expected result:** The device should not be visible in the device + browser. + +**Result:** PASS/FAIL + +.. _tst-hp-manual-scan: + +Test 5: Verifying the manual scan feature. +------------------------------------------ + +**UID:** TST.HP.MANUAL_SCAN + +**Description:** This test checks if the manual scan feature detects and lists +all available devices correctly. + +**Preconditions:** + - Scopy is installed on the system. + - The "Regularly scan for new devices" preference is disabled in the + preferences page. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Connect an **ADALM2000** device to the system by USB. + 3. Wait a few seconds to ensure that the connection has been successfully + established. + 4. Click on the **Scan** button. + 5. Observe the application's behavior. + - **Expected result:** The device appears in the device browser section. + +**Result:** PASS/FAIL + +Test 6: Navigation using the buttons in the info page. +------------------------------------------------------ + +**UID:** TST.HP.NAV + +**Description:** This test checks if the navigation buttons work correctly. + +**Test prerequisites:** + - :ref:`TST.HP.AUTO_SCAN_ON `. + +**Preconditions:** + - Scopy is installed on the system. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Ensure the **Scan** switch is enabled in the device browser section. + 3. Connect an **ADALM2000** device to the system by USB. + 4. Wait until the device appears in device browser. + 5. Ensure that you are on "Welcome to Scopy" page. + 6. Click on the right arrow button. + - **Expected result:** The info page changes from the 'Welcome to Scopy' + page to the add page and in device browser the related button is + highlighted. + 7. Click on the left arrow button. + - **Expected result:** The "Welcome to Scopy" page is displayed and the + related button is highlighted. + 8. Click on the left arrow button. + - **Expected result:** The device's page is displayed and the device + icon is highlighted. + +**Result:** PASS/FAIL + +Test 7: Auto-scan behavior when the device is unplugged. +-------------------------------------------------------- + +**UID:** TST.HP.UNPLUGGED + +**Description:** This test checks if the auto-scan feature detects and lists all +available devices correctly. + +**Test prerequisites:** + - :ref:`TST.HP.AUTO_SCAN_ON `. + +**Preconditions:** + - Scopy is installed on the system. + - OS: ANY. + +**Steps:** + 1. Open Scopy. + 2. Ensure the **Scan** switch is enabled in the device browser section. + 3. Connect an **ADALM2000** device to the system by USB. + 4. Wait until the device appears in device browser. + 5. Unplug the device. + 6. Observe the application's behavior. + - **Expected result:** The device is removed from device browser. + +**Result:** PASS/FAIL \ No newline at end of file diff --git a/docs/tests/general/index.rst b/docs/tests/general/index.rst index 471196f0a..0ba20e877 100644 --- a/docs/tests/general/index.rst +++ b/docs/tests/general/index.rst @@ -10,6 +10,12 @@ Contents :includehidden: :maxdepth: 3 + core/hp_tests + core/add_dev_tests + core/connection_tests + core/emu_tests + core/dev_tests + .. add the path to each core feature test case here example core/homepage_tests From 9f6a729a7eaeb1a85bf1d7b572f9084d6e990ebd Mon Sep 17 00:00:00 2001 From: andreidanila1 Date: Wed, 8 Jan 2025 12:25:07 +0200 Subject: [PATCH 05/32] docs/tests/plugins: Added PQM plugin tests. The tests cover all the PQM instruments. Signed-off-by: andreidanila1 --- docs/tests/plugins/index.rst | 2 + docs/tests/plugins/pqm/pqm_tests.rst | 998 +++++++++++++++++++++++++++ 2 files changed, 1000 insertions(+) create mode 100644 docs/tests/plugins/pqm/pqm_tests.rst diff --git a/docs/tests/plugins/index.rst b/docs/tests/plugins/index.rst index ffd245d65..9a3dd9115 100644 --- a/docs/tests/plugins/index.rst +++ b/docs/tests/plugins/index.rst @@ -10,6 +10,8 @@ Contents :includehidden: :maxdepth: 3 + pqm/pqm_tests + .. add the path to each plugin test case here example dac/dac_tests diff --git a/docs/tests/plugins/pqm/pqm_tests.rst b/docs/tests/plugins/pqm/pqm_tests.rst new file mode 100644 index 000000000..bd0a92255 --- /dev/null +++ b/docs/tests/plugins/pqm/pqm_tests.rst @@ -0,0 +1,998 @@ +.. _pqm_tests: + +PQM Tests +========= + +Rms tool +-------- + +.. note:: + + User guide: :ref:`Rms `. + +Setup environment: +^^^^^^^^^^^^^^^^^^ + +.. _pqm-emu-rms: + +**PQM.Emu:** + - Open Scopy. + - Start the iio-emu process using "pqm" in the dropdown and "ip:127.0.0.1" + as URI. + - Run: `python3 pqmDataWriter.py `_. + - Add the device in device browser. + - Connect to "ip:127.0.0.1". + +Test 1: Open Rms tool. +^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.RMS_OPEN + +**Description:** This test verifies that the Rms tool opens correctly and is +accessible without errors. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Rms** tool. + 2. Observe the application's behavior. + - **Expected result:** In the top section of the tool widget, there is + an Info button, a PQEvents indicator, a Run button, a Single button, + and a Settings button. The Settings menu is open, and the Settings + button is in a checked state. In the center of the widget, there are + two plots, each with labels positioned above them. + +**Result:** PASS/FAIL + +Test 2: Info button check. +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.RMS_INFO + +**Description:** This test verifies if the Info button works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Rms** tool. + 2. Click on the **Info** button. + - **Expected result:** The RMS documentation page is opened in the + browser. + +**Result:** PASS/FAIL + +Test 3: Single acquisition. +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.RMS_SINGLE + +**Description:** This test verifies if the single acquisition works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Rms** tool. + 2. Click on the **Single** button. + - **Expected result:** Both the plot and the header labels are populated + with values. A single block of data is acquired. + +**Result:** PASS/FAIL + +.. _tst-pqm-rms-run: + +Test 4: Data acquisition. +^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.RMS_RUN + +**Description:** This test verifies if the data acquisition works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Rms** tool. + 2. Click on the **Start** button. + - **Expected result:** Both the plot and the header labels are + populated with values. The data is updated every few seconds. + 3. Click on the **Stop** button. + - **Expected result:** The data acquisition stops. + +**Result:** PASS/FAIL + +Test 5: Settings button check. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.RMS_SETTINGS + +**Description:** This test verifies if the Settings button works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Rms** tool. + 2. Click on the **Settings** button. + - **Expected result:** The settings menu collapses and the button + becomes unchecked. + +**Result:** PASS/FAIL + +Test 6: Data logging. +^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.RMS_LOG + +**Description:** This test verifies if the logging mechanism works correctly. + +**Test prerequisites:** + - :ref:`TST.PQM.RMS_RUN `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Rms** tool. + 2. Make sure that the settings menu is open. + 3. Make sure that data acquisition is stopped. + - If data acquisition is running, the log section cannot be accessed. + 4. Click on the **LOG** switch button. + - **Expected result:** A browse section is displayed. + 5. Click on the **Browse** button. + - **Expected result:** A explorer window is displayed. Only directories + can be selected. + 6. Select a directory and click on the **Open** button. + - **Expected result:** The explorer window is closed and the path to + that directory is introduced in the browser section. + 7. Click on the **Run** button. + - **Expected result:** The **LOG** section remains open, but its + elements can no longer be accessed and a .csv file is created in + the selected directory. + 8. Click on the **Stop** button. + - **Expected result:** The **LOG** section can now be accessed, + and the .csv file is populated with data. + +**Result:** PASS/FAIL + +Test 7: Data logging wrong path. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.RMS_LOG_WRONG + +**Description:** This test verifies if the logging mechanism works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Rms** tool. + 2. Make sure that the settings menu is open. + 3. Make sure that data acquisition is stopped. + - If data acquisition is running, the log section cannot be accessed. + 4. Click on the **LOG** switch button. + - **Expected result:** A browse section is displayed. + 5. Enter an invalid path in the line edit. + 6. Click on the **Run** button. + - **Expected result:** The **LOG** section get closed and no .csv + file is created. + 7. Click on the **Stop** button. + - **Expected result:** The **LOG** section remains closed. + +**Result:** PASS/FAIL + +Test 8: PQEvents. +^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.RMS_PQEVENTS + +**Description:** This test verifies if the PQEvents indicator works correctly. + +**Test prerequisites:** + - :ref:`TST.PQM.RMS_RUN `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Rms** tool. + 2. Click on the **Run** button. + 3. Run ``iio_attr -u ip:127.0.0.1 -c pqm count0 countEvent 1`` command. + - **Expected result:** The PQEvents indicator becomes active. + 4. Click on the **Stop** button. + - **Expected result:** The PQEvents indicator is still active. + 5. Click on the **PQEvents** indicator. + - **Expected result:** The PQEvents indicator becomes inactive. + 6. Run ``iio_attr -u ip:127.0.0.1 -c pqm count0 countEvent 0`` command. + +**Result:** PASS/FAIL + +Harmonics tool +-------------- + +.. note:: + + User guide: :ref:`Harmonics `. + +Setup environment: +^^^^^^^^^^^^^^^^^^ + +.. _pqm-emu-harmonics: + +**PQM.Emu:** + - Open Scopy. + - Start the iio-emu process using "pqm" in the dropdown and "ip:127.0.0.1" + as URI. + - Run: `python3 pqmDataWriter.py `_. + - Add the device in device browser. + - Connect to "ip:127.0.0.1". + +Test 1: Open Harmonics tool. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_OPEN + +**Description:** This test verifies that the Harmonics tool opens correctly +and is accessible without errors. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Harmonics** tool. + 2. Observe the application's behavior. + - **Expected result:** In the top section of the tool widget, there + is an Info button, a PQEvents indicator, a Run button, a Single button, + and a Settings button. The Settings menu is open, and the Settings + button is in a checked state. In the center, there are three + components: THD, a table, and a plot. + +**Result:** PASS/FAIL + +Test 2: Info button check. +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_INFO + +**Description:** This test verifies if the Info button works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Harmonics** tool. + 2. Click on the **Info** button. + - **Expected result:** The Harmonics documentation page is opened in the + browser. + +**Result:** PASS/FAIL + +.. _tst-pqm-harmonics-single: + +Test 3: Single acquisition. +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_SINGLE + +**Description:** This test verifies if the single acquisition works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Harmonics** tool. + 2. Click on the **Single** button. + - **Expected result:** All the components are populated with values. The + data in the table must be reflected on the plot. A single block of data is + acquired. + +**Result:** PASS/FAIL + +.. _tst-pqm-harmonics-run: + +Test 4: Data acquisition. +^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_RUN + +**Description:** This test verifies if the data acquisition works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Harmonics** tool. + 2. Click on the **Start** button. + - **Expected result:** The data is updated every few seconds (only the + values from the table and from the plot are updated). The data in the table must + be reflected on the plot. + 3. Click on the **Stop** button. + - **Expected result:** The data acquisition stops. + +**Result:** PASS/FAIL + +Test 5: The features of the table. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_TABLE + +**Description:** This test verifies if the table functionalities works correctly. + +**Test prerequisites:** + - :ref:`TST.PQM.HARMONICS_SINGLE `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Harmonics** tool. + 2. Click on the **Single** button. + - **Expected result:** The row Ia is highlighted and the corresponding + values are drawn on the plot. + 3. Make sure that the settings menu is visible. + 4. Click on the **Ib** row from the table. + - **Expected result:** The entire row is selected and the Ib values are + displayed on the plot. In the setting menu, the active channel is also Ib. + 5. Select the first 6 values from row **Ic** (click on the first value and hold it down until you reach column 5). + - **Expected result:** Only the respective values remain highlighted, + and only the selected columns appear on the plot. The drawing color + is another one. + +**Result:** PASS/FAIL + +Test 6: Settings button check. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_SETTINGS + +**Description:** This test verifies if the Settings button works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Harmonics** tool. + 2. Click on the **Settings** button. + - **Expected result:** The settings menu collapses and the button + becomes unchecked. + 3. Click on the **Settings** button. + - **Expected result:** The settings menu opens, and the button is + checked. The menu contains two sections: **General** and **Log**. + The **General** section contains **Harmonics type** (set to + *harmonics* by default) and **Active channel** (set to *Ia* by + default). + 4. Select **Ib** from active channels dropdown. + - **Expected result:** The Ib row from the table is highlighted (if the + table is populated, then the plot data is changed accordingly). + +**Result:** PASS/FAIL + +Test 7: Data logging. +^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_LOG + +**Description:** This test verifies if the logging mechanism works correctly. + +**Test prerequisites:** + - :ref:`TST.PQM.HARMONICS_RUN `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Make sure that the settings menu is open. + 2. Make sure that data acquisition is stopped. + - If data acquisition is running, the log section cannot be accessed. + 3. Click on the **LOG** switch button. + - **Expected result:** A browse section is displayed. + 4. Click on the **Browse** button. + - **Expected result:** An explorer window is displayed. Only directories + can be selected. + 5. Select a directory and click on the **Open** button. + - **Expected result:** The explorer window is closed and the path to that + directory is introduced in the browse section. + 6. Click on the **Run** button. + - **Expected result:** The **LOG** section remains open, but its elements + can no longer be accessed and a .csv file is created in the selected directory. + 7. Click on the **Stop** button. + - **Expected result:** The **LOG** section can now be accessed, and the + .csv file is populated with data. + +**Result:** PASS/FAIL + +Test 8: Data logging wrong path. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_LOG_WRONG + +**Description:** This test verifies if the logging mechanism works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Make sure that the settings menu is open. + 2. Make sure that data acquisition is stopped. + - If data acquisition is running, the log section cannot be accessed. + 3. Click on the **LOG** switch button. + - **Expected result:** A browse section is displayed. + 4. Enter an invalid path in the line edit. + 5. Click on the **Run** button. + - **Expected result:** The **LOG** section is closed and no .csv file is + created. + 6. Click on the **Stop** button. + - **Expected result:** The **LOG** section remains closed. + +**Result:** PASS/FAIL + +Test 9: PQEvents. +^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.HARMONICS_PQEVENTS + +**Description:** This test verifies if the PQEvents indicator works correctly. + +**Test prerequisites:** + - :ref:`TST.PQM.HARMONICS_RUN `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Run** button. + 2. Run ``iio_attr -u ip:127.0.0.1 -c pqm count0 countEvent 1`` command. + - **Expected result:** The PQEvents indicator becomes active. + 3. Click on the **Stop** button. + - **Expected result:** The PQEvents indicator is still active. + 4. Click on the **PQEvents** indicator. + - **Expected result:** The PQEvents indicator becomes inactive. + 5. Run ``iio_attr -u ip:127.0.0.1 -c pqm count0 countEvent 0`` command. + +**Result:** PASS/FAIL + +Waveform tool +------------- + +.. note:: + + User guide: :ref:`Waveform `. + +Setup environment: +^^^^^^^^^^^^^^^^^^ + +.. _pqm-emu-waveform: + +**PQM.Emu:** + - Open Scopy. + - Start the iio-emu process using "pqm" in the dropdown and "ip:127.0.0.1" + as URI. + - Add the device in device browser. + - Connect to "ip:127.0.0.1". + +Test 1: Open Waveform tool. +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_OPEN + +**Description:** This test verifies that the Waveform tool opens correctly and +is accessible without errors. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Observe the application's behavior. + - **Expected result:** In the top section of the tool widget, there is + an Info button, a Run button, a Single button, and a Settings button. + The Settings menu is open, and the Settings button is in a checked + state. In the center, there are two plots. + +**Result:** PASS/FAIL + +Test 2: Info button check. +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_INFO + +**Description:** This test verifies if the Info button works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Click on the **Info** button. + - **Expected result:** The Waveform documentation page is opened in the + browser. + +**Result:** PASS/FAIL + +Test 3: Settings button check. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_SETTINGS + +**Description:** This test verifies if the Settings button works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Click on the **Settings** button. + - **Expected result:** The settings menu collapses and the button + becomes unchecked. + 3. Click on the **Settings** button. + - **Expected result:** The settings menu opens, and the button is + checked. + +**Result:** PASS/FAIL + +Test 4: Settings timespan check. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_SETTINGS_TIMESPAN + +**Description:** This test verifies if the timespan spin box works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Make sure that the settings menu is open. + 3. Click on (+) button. + - **Expected result:** The timespan is increased and the x-axis range is + now [-newValue, 0]. The maximum value must be 10. + 4. Click on (-) button. + - **Expected result:** The timespan is decreased and the x-axis range is + now [-newValue, 0]. The minimum value must be 0.02. + +**Result:** PASS/FAIL + +Test 5: Settings rolling switch check. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_SETTINGS_ROLLING + +**Description:** This test verifies if the rolling mode switch works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Make sure that the settings menu is open. + 3. Enable **Rolling mode** swich. + - **Expected result:** The switch is turned on, and the "triggered by" + dropdown is inactive. + +**Result:** PASS/FAIL + +Test 6: Single acquisition triggered. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_SINGLE_TRIG + +**Description:** This test verifies if the single acquisition works correctly +(triggered mode). + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Make sure that the **Rolling mode** switch is turned off. + 3. Click on the **Single** button. + - **Expected result:** The curves are displayed on the plot in single + shot format. A single block of data is acquired. + +**Result:** PASS/FAIL + +Test 7: Single acquisition rolling. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_SINGLE_ROLL + +**Description:** This test verifies if the single acquisition works correctly +(rolling mode). + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Make sure that the **Rolling mode** switch is turned on. + 3. Click on the **Single** button. + - **Expected result:** The curves are drawn from right to left until all + the required samples for the plot are acquired. A single block of data is + acquired. + +**Result:** PASS/FAIL + +Test 8: Data acquisition triggered. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_RUN_TRIG + +**Description:** This test verifies if the data acquisition works correctly +(triggered mode). + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Make sure that the **Rolling mode** switch is turned off. + 3. Click on the **Start** button. + - **Expected result:** The curves are displayed on the plot in single + shot format. When new data is available, it is displayed on the screen. + 4. Click on the **Stop** button. + - **Expected result:** The data acquisition stops. + +**Result:** PASS/FAIL + +.. _tst-pqm-waveform-run-roll: + +Test 9: Data acquisition rolling. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_RUN_ROLL + +**Description:** This test verifies if the data acquisition works correctly +(rolling mode). + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Make sure that the **Rolling mode** switch is turned on. + 3. Click on the **Start** button. + - **Expected result:** The curves are drawn from right to left until all + the required samples for the plot are acquired. If there are non-zero values, a + continuous motion illusion is created. + 4. Click on the **Stop** button. + - **Expected result:** The data acquisition stops. + +**Result:** PASS/FAIL + +Test 10: Plot zoom. +^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_PLOT_ZOOM + +**Description:** This test verifies if, when zooming in on one plot, the x-axis +range of the other plot is modified and matches the zoom range. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Waveform** tool. + 2. Zoom in on the first plot to a range smaller than the x-axis range. + - **Expected result:** The x-axis range of the second plot is modified + and matches the range of the first plot. + +**Result:** PASS/FAIL + +Test 11: Data logging. +^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_LOG + +**Description:** This test verifies if the logging mechanism works correctly. + +**Test prerequisites:** + - :ref:`TST.PQM.WAVEFORM_RUN_ROLL `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Make sure that the settings menu is open. + 2. Make sure that data acquisition is stopped. + - If data acquisition is running, the log section cannot be accessed. + 3. Click on the **LOG** switch button. + - **Expected result:** A browse section is displayed. + 4. Click on the **Browse** button. + - **Expected result:** An explorer window is displayed. Only directories + can be selected. + 5. Select a directory and click on the **Open** button. + - **Expected result:** The explorer window is closed and the path to that + directory is introduced in the browser section. + 6. Click on the **Run** button. + - **Expected result:** The **LOG** section remains open, but its elements + can no longer be accessed and a .csv file is created in the selected + directory. + 7. Click on the **Stop** button. + - **Expected result:** The **LOG** section can now be accessed, and the + .csv file is populated with data. + +**Result:** PASS/FAIL + +Test 12: Data logging wrong path. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.WAVEFORM_LOG_WRONG + +**Description:** This test verifies if the logging mechanism works correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Make sure that the settings menu is open. + 2. Make sure that data acquisition is stopped. + - If data acquisition is running, the log section cannot be accessed. + 3. Click on the **LOG** switch button. + - **Expected result:** A browse section is displayed. + 4. Enter an invalid path in the line edit. + 5. Click on the **Run** button. + - **Expected result:** The **LOG** section is closed and no .csv file is + created. + 6. Click on the **Stop** button. + - **Expected result:** The **LOG** section remains closed. + +**Result:** PASS/FAIL + +Settings tool +------------- + +.. note:: + + User guide: :ref:`Settings `. + +Setup environment: +^^^^^^^^^^^^^^^^^^ + +.. _pqm-emu-settings: + +**PQM.Emu:** + - Open Scopy. + - Start the iio-emu process using "pqm" in the dropdown and "ip:127.0.0.1" + as URI. + - Add the device in device browser. + - Connect to "ip:127.0.0.1". + +Test 1: Open Settings tool. +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.SETTINGS_OPEN + +**Description:** This test verifies that the Settings tool opens correctly and +is accessible without errors. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Settings** tool. + 2. Observe the application's behavior. + - **Expected result:** Three sections are displayed: **System Time**, + **Logging**, and **Config Values**. + +**Result:** PASS/FAIL + +Test 2: Read config values. +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.SETTINGS_READ + +**Description:** This test verifies if the device attribute reading is done +correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Settings** tool. + 2. Scroll down in the **Config values** section until you find the **Read** + and **Set** buttons. + 3. Click on the **Read** button. + - **Expected result:** All fields in the section are populated. + +**Result:** PASS/FAIL + +Test 3: Write config values. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**UID:** TST.PQM.SETTINGS_WRITE + +**Description:** This test verifies if the device attribute writing is done +correctly. + +**Test prerequisites:** + - :ref:`TST.CONN.SUCC `. + +**Preconditions:** + - Scopy is installed on the system. + - iio-emu is installed on the system. + - Use :ref:`PQM.Emu ` setup. + - OS: Windows, Linux-x86_64, Linux-arm64, Linux-arm32, macOS. + +**Steps:** + 1. Click on the **Settings** tool. + 2. Scroll down in the **Config values** section until you find the **Read** + and **Set** buttons. + 3. Click on the **Read** button. + - **Expected result:** All fields in the section are populated. + 4. Change the **MsV Threshold** value to 0.40. + 5. Click on the **Write** button. + 6. Click on the **Read** button. + - **Expected result:** The **MsV Threshold** attribute value must be + 0.40. + +**Result:** PASS/FAIL \ No newline at end of file From 73e306a4c415b838204f022f769c5b5d2ebfe7cd Mon Sep 17 00:00:00 2001 From: IonutMuthi Date: Thu, 19 Dec 2024 04:36:08 -0500 Subject: [PATCH 06/32] test_cases:datalogger Signed-off-by: IonutMuthi --- .../plugins/datalogger/datalogger_test.rst | 1087 +++++++++++++++++ docs/tests/plugins/index.rst | 5 + 2 files changed, 1092 insertions(+) create mode 100644 docs/tests/plugins/datalogger/datalogger_test.rst diff --git a/docs/tests/plugins/datalogger/datalogger_test.rst b/docs/tests/plugins/datalogger/datalogger_test.rst new file mode 100644 index 000000000..4323e6aee --- /dev/null +++ b/docs/tests/plugins/datalogger/datalogger_test.rst @@ -0,0 +1,1087 @@ +.. _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 Environment +------------------ + +.. _datalogger_adalm_pluto_emu_setup: + +**AdalmPluto.Emu:** + - Open Scopy + - Start the iio-emu process using Pluto option from the dropdown + - Connect to the Pluto Device + +.. _datalogger_adalm_pluto_device_setup: + +**AdalmPluto.Device:** + - Open Scopy + - Connect to the Pluto Device using IP or USB + +.. _datalogger_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 + +.. _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:** + - 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: + +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:** + - 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: + +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:** + - 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 + - Buffer is cleared and the starting point is reset to "0" + +**Result:** PASS/FAIL + +.. _TST_DATALOGGER_CREATE_NEW_DATA_LOGGER_TOOL: + +Test 5: Create a New Data Logger Tool +--------------------------------------- + +**UID:** TST.DATALOGGER.CREATE_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_A_CREATED_TOOL: + +Test 6: Remove a Created Tool +--------------------------------- + +**UID:** TST.DATALOGGER.REMOVE_A_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_VERIFY_REMOVAL_DISABLED_FOR_DEFAULT_TOOL: + +Test 7: Verify Removal Disabled for Default Tool +-------------------------------------------------- + +**UID:** TST.DATALOGGER.VERIFY_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: + +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:** + - 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 + - The file name structure is "Sopy-Data-Logger--