Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

docs: add default structure for all test cases #1872

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4b9571f
docs: add default structure for all test cases
AlexandraTrifan Jan 10, 2025
5ff3e68
docs/tests: Added general dir to the default structure.
andreidanila1 Jan 10, 2025
f721951
docs/pqm: Changed the instrument labels.
andreidanila1 Jan 8, 2025
a474445
docs/tests/general: Added core tests.
andreidanila1 Jan 8, 2025
f330367
docs/tests/plugins: Added PQM plugin tests.
andreidanila1 Jan 8, 2025
9371771
test_cases:datalogger
IonutMuthi Dec 19, 2024
986263d
docs: add initial test cases for the DAC plugin.
AlexandraTrifan Dec 20, 2024
96d02d9
docs: add initial migration of test cases for m2k and swiot
AlexandraTrifan Dec 20, 2024
99a6f46
test_cases:regmap
IonutMuthi Dec 18, 2024
d531f46
docs/tests: add install test cases and about page test cases
bindea-cristian Jan 21, 2025
21d8407
docs/tests: Add debugger tests
Andrei-Fabian-Pop Dec 13, 2024
67423c0
docs/tests: Add tests for Debugger plugin
Andrei-Fabian-Pop Dec 19, 2024
6f7b758
docs/tests: Add tests for Debugger plugin preferences
Andrei-Fabian-Pop Dec 19, 2024
2a34122
docs/tests: Add tests for tool detach/atach
Andrei-Fabian-Pop Dec 19, 2024
396493a
docs/tests: Add tests for M2K Spectrum Analyzer
Andrei-Fabian-Pop Dec 19, 2024
f5cae8b
docs/tests: Add tests for M2K Signal Generator
Andrei-Fabian-Pop Jan 13, 2025
55d7f3d
docs/tests: Add tests for M2K Pattern Generator
Andrei-Fabian-Pop Dec 19, 2024
868f979
docs/tests: Add tests for M2K Voltmeter
Andrei-Fabian-Pop Dec 20, 2024
c0727ec
docs/tests: Modify file structure to match design
Andrei-Fabian-Pop Jan 13, 2025
c6a3c34
docs/tests: Modify the test case structure
Andrei-Fabian-Pop Jan 20, 2025
7ee2dac
docs / tests: added adc and general preferences tests
andrei47w Jan 9, 2025
d5df8d1
docs / tests: fix adc and preferences tests
andrei47w Jan 23, 2025
66f0943
docs / tests: add prerequisites in adc and preferences
andrei47w Jan 28, 2025
5c206d2
docs / tests: change headers in adc tests
andrei47w Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ Contents

.. toctree::
:includehidden:
:maxdepth: 3
:maxdepth: 6

user_guide/index
plugins/index
tests/index


user_guide/preferences
Expand Down
8 changes: 4 additions & 4 deletions docs/plugins/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Application Specific plugins
* :ref:`Faults <faults>`

* PQM
* :ref:`RMS <rms>`
* :ref:`Harmonics <harmonics>`
* :ref:`Waveform <waveform>`
* :ref:`Settings <settings>`
* :ref:`RMS <pqm-rms>`
* :ref:`Harmonics <pqm-harmonics>`
* :ref:`Waveform <pqm-waveform>`
* :ref:`Settings <pqm-settings>`


Contents
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/pqm/harmonics.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _harmonics:
.. _pqm-harmonics:

Harmonics
================================================================================
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/pqm/rms.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _rms:
.. _pqm-rms:

RMS
================================================================================
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/pqm/settings.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _settings:
.. _pqm-settings:

System settings
================================================================================
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/pqm/waveform.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _waveform:
.. _pqm-waveform:

Waveform
================================================================================
Expand Down
313 changes: 313 additions & 0 deletions docs/tests/general/core/add_dev_tests.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
.. _add_dev_tests:

Add device
==========

.. note::

User guide: :ref:`Scopy Overview <user_guide>`.

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 <tst-emu-en>`.

**Preconditions:**
- Scopy is installed on the system.
- iio-emu is installed on the system.
- Use :ref:`M2k.Emu <m2k-emu-add>` 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 <tst-add-verify>`.

**Preconditions:**
- Scopy is installed on the system.
- iio-emu is installed on the system.
- Use :ref:`M2k.Emu <m2k-emu-add>` 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 <tst-add-verify>`.

**Preconditions:**
- Scopy is installed on the system.
- iio-emu is installed on the system.
- Use :ref:`M2k.Emu <m2k-emu-add>` 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 <tst-add-verify>`.

**Preconditions:**
- Scopy is installed on the system.
- iio-emu is installed on the system.
- Use :ref:`M2k.Emu <m2k-emu-add>` 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 <tst-add-verify>`.

**Preconditions:**
- Scopy is installed on the system.
- iio-emu is installed on the system.
- Use :ref:`M2k.Emu <m2k-emu-add>` 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
Loading
Loading