From 963b49048a83122e654ac53247900a0a45481da5 Mon Sep 17 00:00:00 2001 From: Andrei Popa Date: Thu, 9 Jan 2025 14:11:48 +0200 Subject: [PATCH] docs / tests: added adc and general preferences tests Signed-off-by: Andrei Popa Signed-off-by: AlexandraTrifan --- .../general/general_preferences_tests.rst | 546 ++++++++++++++ docs/tests/general/index.rst | 1 + docs/tests/plugins/adc/adc_tests.rst | 682 ++++++++++++++++++ docs/tests/plugins/index.rst | 2 + 4 files changed, 1231 insertions(+) create mode 100644 docs/tests/general/general_preferences_tests.rst create mode 100644 docs/tests/plugins/adc/adc_tests.rst diff --git a/docs/tests/general/general_preferences_tests.rst b/docs/tests/general/general_preferences_tests.rst new file mode 100644 index 000000000..aaf52dd79 --- /dev/null +++ b/docs/tests/general/general_preferences_tests.rst @@ -0,0 +1,546 @@ +.. _general_preferences_tests: + +General Preferences - Test Suite +================================== + +Setup environment: +^^^^^^^^^^^^^^^^^^ + +**M2K.emu:** + - Press the add device button + - Enable emulator for adalm2000 + - Verify and add device with M2KPlugin and ADCPlugin enabled +**Pluto.emu:** + - Press the add device button + - Enable emulator for pluto + - Verify and add device with ADCPlugin enabled +**Pluto.usb:** + - Connect a pluto device via usb to your PC + - Connect to the device in Scopy with ADCPlugin enabled + + +Test 1 - Save/Load Scopy session +-------------------------------------------------- + +.. _TST.PREF.SAVE_LOAD_SESSION: + +UID: + TST.PREF.SAVE_LOAD_SESSION + +Description: + Manage sessions to retain or load overall application states + (only applies to plugins which have this implemented). + +Preconditions: + - Emulator tests + - Setup M2K.emu + - OS: all + +Steps: + 1. Set preference to enabled + 2. Open Oscilloscope tool + 3. Modify the time base value to 1s + 4. Close Scopy + 5. Open the app using the same setup and check if the time base + - **Expected result:** time base is 1s + 6. Redo all the steps with the preference disabled + - **Expected result:** time base is the default value + 7. Press the "Settings file location" open buttons + - **Expected results:** should open a file browser containing + .ini files for every plugins' session saved + + +Test 2 - Doubleclick to attach/detach tool +-------------------------------------------------- + +.. _TST.PREF.DOUBLECLICK_ATTACH_DETACH: + +UID: + TST.PREF.DOUBLECLICK_ATTACH_DETACH + +Description: + Tools can be detached from the main window by double-clicking + them in the left menu. + +Preconditions: + - Emulator tests + - Setup M2K.emu + - OS: all + +Steps: + 1. Set preference to enabled. + 2. Double-click Oscilloscope tool to detach it. + - **Expected result:** Oscilloscope tool should detach from + the main window into a new one. + 3. Redo all the steps with the preference disabled. + - **Expected result:** Nothing should happen. + +Test 3 - Save/Load tool attached state +-------------------------------------------------- + +.. _TST.PREF.SAVE_LOAD_TOOL_STATE: + +UID: +TST.PREF.SAVE_LOAD_TOOL_STATE + +Description: + Manage sessions to retain tool attached states. + +Preconditions: + - Emulator tests + - Depends on Test 2 + - Setup M2K.emu + - OS: all + +Steps: + 1. Set preference to enabled. + 2. Double-click Oscilloscope tool to detach it. + 3. Close Scopy. + 4. Open the app using the same setup. + - **Expected result:** Oscilloscope is still detached. + 5. Redo all the steps with the preference disabled. + - **Expected result:** Oscilloscope should not be detached. + + +Test 4 - Doubleclick control buttons to open menu +-------------------------------------------------- + +.. _TST.PREF.DOUBLECLICK_CONTROL_MENU: + +UID: + TST.PREF.DOUBLECLICK_CONTROL_MENU + +Description: + Open menu from MenuControlButtons by double-clicking them. + +Preconditions: + - Emulator tests + - Setup Pluto.emu + - OS: all + +Steps: + 1. Set preference to enabled. + 2. Open ADC - Time tool. + 3. Double-click Cursors button in the bottom right ( + do not click on the button's icon). + + - **Expected result:** A hovering menu should open above the button. + 4. Redo all the steps with the preference disabled. + - **Expected result:** No menu should open. + +Test 5 - Enable OpenGL plotting +-------------------------------------------------- + +.. _TST.PREF.ENABLE_OPENGL_PLOTTING: + +UID: + TST.PREF.ENABLE_OPENGL_PLOTTING + +Description: + Use GPU acceleration for rendering plots (OpenGL-based). + +Preconditions: + - Emulator tests + - Depends on Test "Plot FPS" + - Setup M2K.emu + - OS: all + +Steps: + 1. Set preference to enabled. + 2. Set Debug preference "Show plot FPS" to enabled. + 3. Open Oscilloscope tool and run it. + - **Expected result:** The red text inside the plot + should contain "OpenGL rendering." + 4. Redo all the steps with the preference disabled. + - **Expected result:** The red text inside the plot + should contain "Software rendering." + + +Test 6 - Enable menu animations +-------------------------------------------------- + +.. _TST.PREF.ENABLE_MENU_ANIMATIONS: + +UID: + TST.PREF.ENABLE_MENU_ANIMATIONS + +Description: + Toggle visual animations for menu transitions. + +Preconditions: + - Emulator tests + - Setup M2K.emu + - OS: any + +Steps: + 1. Set preference to enabled. + 2. Open Oscilloscope tool and toggle between trigger and channel menus. + - **Expected result:** Opening menus should be animated. + 3. Redo all the steps with the preference disabled. + - **Expected result:** Opening menus shouldn't have any animations. + + +Test 7 - Enable the status bar for displaying important messages +----------------------------------------------------------------- + +.. _TST.PREF.ENABLE_STATUS_BAR: + +UID: + TST.PREF.ENABLE_STATUS_BAR + +Description: + Show status messages on the bottom of the app window. + +Preconditions: + - Emulator tests + - Setup M2K.emu + - OS: any + +Steps + 1. Set preference to enabled. + 2. Do the setup again and look for a message bar when pressing "connect." + - **Expected result:** A message about connecting should appear at the bottom of the window. + 3. Redo all the steps with the preference disabled. + - **Expected result:** No message should pop up. + + +Test 8 - Show Grid +-------------------------------------------------- + +.. _TST.PREF.SHOW_GRID: + +UID: + TST.PREF.SHOW_GRID + +Description: + Display grid lines for better visual referencing on plots. + +Preconditions: + - Emulator tests + - Setup Pluto.emu + - OS: any + +Steps: + 1. Set preference to enabled. + 2. Open ADC - Time tool. + - **Expected result:** A grid should be visible on the plot. + 3. Redo all the steps with the preference disabled. + - **Expected result:** No grid on the plot. + + +Test 9 - Show Graticule +-------------------------------------------------- + +.. _TST.PREF.SHOW_GRATICULE: + +UID: +TST.PREF.SHOW_GRATICULE + +Description: + Display lines for axes centered on 0 points on plots. + +Preconditions: + - Emulator tests + - Setup Pluto.emu + - OS: any + +Steps: + 1. Set preference to enabled. + 2. Open ADC - Time tool. + - **Expected result:** A horizontal and a vertical + measurement line should be centered on the 0-axis + points (both may not be visible at the same time). + 3. Redo all the steps with the preference disabled. + - **Expected result:** The lines should border the entire + plot instead of centering on 0 points. + + +Test 10 - Use Lazy Loading +-------------------------------------------------- + +.. _TST.PREF.USE_LAZY_LOADING: + +UID: + - TST.PREF.USE_LAZY_LOADING + +Description: + - Load IIO resources as needed to improve initial load performance. + +Preconditions: + - Emulator tests + - Setup Pluto.usb + - OS: Windows + +Steps: + 1. Set preference to enabled. + 2. Open Scopy console executable. + 3. After connecting to Pluto as described in the setup, look + in the console for "device connection took:" times. + 4. Redo all the steps with the preference disabled and + compare the elapsed times. + + - **Expected result:** Elapsed times connecting to some + plugins should be lower when lazy loading is enabled. + + +Test 11 - Use native dialogs +------------------------------- + +.. _TST.PREF.USE_NATIVE_DIALOGS: + +UID: + TST.PREF.USE_NATIVE_DIALOGS + +Description: + Use system-native dialog windows. + +Preconditions: + - None + - OS: all + +Steps: + 1. Set preference to enabled. + 2. Press the Load button on the left menu. + - **Expected result:** A native file browser window should open. + 3. Redo all the steps with the preference disabled. + - **Expected result:** A non-native, Scopy-specific, + file browser window should open. + + +Test 12 - Auto-connect to previous session +-------------------------------------------------- + +.. _TST.PREF.AUTO_CONNECT_PREVIOUS_SESSION: + +UID: + TST.PREF.AUTO_CONNECT_PREVIOUS_SESSION + +Description: + Automatically reconnect to the last used devices on startup. + +Preconditions: + - Emulator tests + - Setup Pluto.usb + - OS: any + +Steps: + 1. Set preference to enabled. + 2. Connect to the device and then close the application. + 3. Open Scopy. + - **Expected result:** Scopy should automatically connect + to the Pluto device. + 4. Redo all the steps with the preference disabled. + - **Expected result:** Should not connect automatically. + + +Test 13 - Font scale +-------------------------------------------------- + +.. _TST.PREF.FONT_SCALE: + +UID: + TST.PREF.FONT_SCALE + +Description: + Adjust font size within the app (this is experimental, so some + layout artifacts may appear). + +Preconditions: + - Emulator tests + - Setup Pluto.emu + - OS: any + +Steps: + 1. Set preference to 1.45, restart Scopy, and inspect some tools. + - **Expected result:** All app text and some buttons should be larger. + 2. Repeat the steps for font size 1. + - **Expected result:** Text should return to default size. + + +Test 14 - Theme +-------------------------------------------------- + +.. _TST.PREF.THEME: + +UID: + TST.PREF.THEME + +Description: + Change application theme. + +Preconditions: + - Emulator tests + - Setup Pluto.emu + - OS: any + +Steps: + 1. Set preference to a different theme and restart the app. + - **Expected result:** Themes should change while retaining + the same UX and usability in all tools. + + +Test 15 - Language +-------------------------------------------------- + +.. _TST.PREF.LANGUAGE: + +UID: + TST.PREF.LANGUAGE + +Description: + Change the language of the application interface. + +Preconditions: + - Emulator tests + - Setup M2K.emu + - OS: any + +Steps + 1. Set preference to a different language and restart the app. + - **Expected result:** Some text language should change in the M2K tools. + + +Test 16 - Connect to multiple devices +-------------------------------------------------- + +.. _TST.PREF.CONNECT_MULTIPLE_DEVICES: + +UID: + TST.PREF.CONNECT_MULTIPLE_DEVICES + +Description: + Enable connections to multiple hardware and emulator devices at once. + +Preconditions: + - Emulator tests + - Setup M2K.emu and Pluto.usb + - OS: any + +Steps: + 1. Set preference to enabled. + 2. Connect to 2 devices following the setup. + - **Expected result:** Two devices should appear in the left + menu and be fully functional. + 3. Repeat the steps with the preference disabled. + - **Expected result:** When connecting to the second device, + the first one should automatically disconnect. + + +Test 17 - Regularly scan for new devices +-------------------------------------------------- + +.. _TST.PREF.REGULARLY_SCAN_NEW_DEVICES: + +UID: + TST.PREF.REGULARLY_SCAN_NEW_DEVICES + +Description: + Continuously scan and recognize newly connected devices. + +Preconditions: + - Emulator tests + - Setup Pluto.usb + - OS: any + +Steps: + 1. Connect the Pluto to the machine via USB. + - **Expected result:** Pluto should automatically appear in + the device list, and a toggle switch for scanning should + appear in the top right. + 2. Repeat the steps with the preference disabled. + - **Expected result:** Pluto should not appear automatically, + only when pressing the on-demand Scan button. + +Test 18 - Session devices +-------------------------------------------------- + +.. _TST.PREF.SESSION_DEVICES: + +UID: + TST.PREF.SESSION_DEVICES + +Description: + Automatically connect to saved devices. + +Preconditions: + - Setup Pluto.usb + - "Auto-connect to previous session" needs to be enabled. + - OS: any + +Steps: + 1. After connecting to M2K, go to the preferences and press "Refresh." + 2. Check the current device's URI. + 3. Go back to the homepage and forget the device by pressing the red + "X" button on the device. + 4. Close and reopen Scopy. + - **Expected result:** Should automatically connect to the URI you + checked. + +Test 19 - Show plot FPS +-------------------------------------------------- + +.. _TST.PREF.SHOW_PLOT_FPS: + +UID: + TST.PREF.SHOW_PLOT_FPS + +Description: + Show FPS on plots. + +Preconditions: + - Emulator tests + - Setup M2K.emu, Pluto.usb + - OS: any + +Steps: + 1. Open Oscilloscope and run it. + 2. Open ADC - Time and run it. + - **Expected result:** Should show the FPS on the plot + (M2K may look different from other plugins). + 3. Repeat the steps with the preference disabled. + - **Expected result:** No FPS should be visible. + +Test 20 - Plot target FPS +-------------------------------------------------- + +.. _TST.PREF.PLOT_TARGET_FPS: + +UID: + TST.PREF.PLOT_TARGET_FPS + +Description: + Manage the maximum FPS plots should run at + (this may also affect the IIO acquisition). + +Preconditions: + - Emulator tests + - Setup Pluto.usb + - "Show plot FPS" needs to be enabled. + - OS: any + +Steps: + 1. Set the preference to each value and run ADC - Time to check FPS. + - **Expected result:** Plot FPS should be capped at the selected value. + + +Test 21 - Reset settings and plugins to default +-------------------------------------------------- + +.. _TST.PREF.RESET_SETTINGS_DEFAULT: + +UID: + TST.PREF.RESET_SETTINGS_DEFAULT + +Description: + Resets all settings and plugins to default values. + +Preconditions: + - Emulator tests + - Setup M2K.emu + - OS: any + +Steps: + 1. Change general preferences and M2K preferences. + 2. Press the "Restart" button and restart the app. + - **Expected result:** All changed preferences should have + the default values. diff --git a/docs/tests/general/index.rst b/docs/tests/general/index.rst index 471196f0a..f9c14aa18 100644 --- a/docs/tests/general/index.rst +++ b/docs/tests/general/index.rst @@ -10,6 +10,7 @@ Contents :includehidden: :maxdepth: 3 + general_preferences_tests .. add the path to each core feature test case here example core/homepage_tests diff --git a/docs/tests/plugins/adc/adc_tests.rst b/docs/tests/plugins/adc/adc_tests.rst new file mode 100644 index 000000000..50d9a5294 --- /dev/null +++ b/docs/tests/plugins/adc/adc_tests.rst @@ -0,0 +1,682 @@ +.. _adc_tests: + +ADC Plugin - Test Suite +======================= + +.. note:: + + User guide: :ref:`ADC user guide` + +Setup environment +^^^^^^^^^^^^^^^^^^ + +.. _adalm-pluto_device_usb: + +**Pluto.usb:** + - Connect a pluto device via usb to your PC + - connect to the device in Scopy with ADCPlugin enabled + +.. _adalm-pluto_device_siggen: + +**Pluto.signalGenerator:** + - Requires DAC and Debugger tests to work + - Go to Debugger, select context0/ad9361-phy/TX_LO/frequency and set it to 2400000000. + Do the same for context0/ad9361-phy/RX_LO/frequency + - Go to DAC plugin, mode: DDS, dds mode: independent I/Q control. + TX1_I_F1 scale: -40, TX1_I_F2: -40, TX1_Q_F1: -30, TX1_Q_F2: -30. set all frequency values to 1MHz. + - Run DAC plugin. + +ADC-Time +^^^^^^^^^ + +Test 1 - X-AXIS +--------------- + +.. _TST.ADC_TIME.X_AXIS: + +UID: + TST.ADC_TIME.X_AXIS + +Description: + Verify X-axis behavior under different configurations + +Preconditions: + - Pluto.usb setup + - OS: any + +Steps: + 1. Scroll down and turn on plot labels in the settings panel + 2. Set XMode to Samples on the X-axis + 3. Set buffer size to 100 + 4. Press Single + - **Expected result:** Plot labels should go up to 100, and channel curves + should span across the whole plot + 5. Turn off Sync buffer-plot sizes + 6. Set plot size to 200 + 7. Press Single + - **Expected result:** Plot labels should go up to 200, and channel curves should span across the whole plot + 8. Turn on Rolling mode + - **Expected result:** Plot labels should invert, going from 200 to 0 + 9. Change XMin to 200 and XMax to -100 + 10. Press Single + - **Expected result:** Plot labels should range from 300 to -100, with channel curves centered and between samples 200 and 0 + + +Test 2 - Y-AXIS +--------------- +.. _TST.ADC_TIME.Y_AXIS: + +UID: + TST.ADC_TIME.Y_AXIS + +Description: + Verify Y-axis behavior under different configurations + +Preconditions: + - Pluto.usb setup + - OS: any + +Steps: + 1. Scroll down and turn on plot labels in the settings panel + 2. Turn on Autoscale and press Run + - **Expected result:** Y-axis should automatically scale according to channel curves + 3. Press Stop + 4. Turn Autoscale off + 5. Set YMode to ADC Counts + 6. Set Min to -4000 and Max to 4000 + 7. Press Single + - **Expected result:** Y-axis labels should range from -4000 to 4000, and curves should vertically adjust accordingly + + +Test 3 - XY PLOT +---------------- + +.. _TST.ADC_TIME.XY_PLOT: + +UID: + TST.ADC_TIME.XY_PLOT + +Description: + Verify XY plot functionality and visualization + +Preconditions: + - Pluto.usb setup + - Pluto.signalGenerator setup + - OS: any + +Steps: + 1. Run Pluto.signalGenerator setup + 2. Turn on XY PLOT + - **Expected result:** A new plot should appear on the right + 3. Turn on Autoscale + - **Expected result:** On the time plot, both channel curves should + look the same, but voltage0 should have a higher amplitude + 4. Set X Axis source to voltage0 + - **Expected result:** A small circular curve should appear on the XY plot + 5. Set X Axis source to voltage1 + - **Expected result:** A larger circular curve should appear on the XY plot + 6. Turn Plot X source on and off + - **Expected result:** A line cutting the circle should be visible in a different color + +Test 4 - Settings +----------------- + +.. _TST.ADC_TIME.SETTINGS: + +UID: + TST.ADC_TIME.SETTINGS + +Description: + Change Plot Title and toggle various plot settings + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Change Plot Title to "test" + - **Expected result:** text in top left should change to "test" + 2. Turn on and off plot labels + - **Expected result:** labels on x and y axis should appear + 3. Change thickness and style to all available modes and observe the changes + - **Expected result:** channel curves' appearance should behave as expected + +Test 5 - Print +-------------- + +.. _TST.ADC_TIME.PRINT: + +UID: + TST.ADC_TIME.PRINT + +Description: + Save the plot as a PDF file via the print functionality + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Run Pluto.signalGenerator setup + 2. Press the single button and then the print button. Select a folder and save the file + - **Expected result:** a new PDF file should appear within the folder containing + the last view of the plot + +Test 6 - Info +-------------- + +.. _TST.ADC_TIME.INFO: + +UID: + TST.ADC_TIME.INFO + +Description: + Open the ADC plugin documentation via the info button + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Press the info button in the top left corner of the window + - **Expected result:** this should open the ADC plugin documentation. + + +Test 7 - Plot Navigation +------------------------- + +.. _TST.PLOT_NAVIGATION: + +UID: + TST.PLOT_NAVIGATION + +Description: + Test plot zooming, panning, and undo features + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Scroll down and turn on plot labels in the settings panel + 2. Place mouse cursor within the plot and use the scroll wheel + - **Expected result:** should zoom in/out on the area at the cursor, should not be able to zoom out more than the default view + 3. Right-click the plot after zooming in + - **Expected result:** should undo the zoom + 4. Select an area on the plot using left-click + - **Expected result:** should zoom in exactly on the selected area + 5. Zoom in using the selection method, then hold left shift button and zoom using the scroll wheel + - **Expected result:** should pan left and right + 6. Zoom in using all methods described above and press right-click until zoom is back to default + - **Expected result:** should undo each zoom operation one by one + + +Test 8 - ADC-Time Channel Settings +----------------------------------- + +.. _TST.ADC_TIME_CHANNEL_SETTINGS: + +UID: + TST.ADC_TIME_CHANNEL_SETTINGS + +Description: + Test Y-axis settings and adjustments for the ADC-Time tool + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Double-click on the voltage0 channel and go to the right menu which pops up + 2. Enable Y-AXIS and move up and down the axis handle + - **expected result:** this should move the channel curve within the Y-axis + 3. Turn autoscale off. Set YMode to ADC Counts, Min to -4000 and Max to 4000, and press single + - **expected result:** only voltage0 curve should vertically adjust + 4. Turn off Y-AXIS + +Test 9 - Measure +---------------- + +.. _TST.MEASURE: + +UID: + TST.MEASURE + +Description: + Test the Measure functionality, enabling panels and checking frequency and stats + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Double-click on the voltage0 channel and go to the right menu which pops up + 2. Open the Measure menu at the bottom of the window, enable Measure Panel and Stats panel + - **Expected result:** check frequency measure and stats in the horizontal measurements table, + middle measure and stats in the vertical measurements table. Frequency should be around 1MHz in + both panels, middle should be hovering around the 0 value in both panels + 3. Open the Measure menu and show all Stats and Measurements + - **Expected result:** all checkboxes in the measurement tables should be checked and each + should have a corresponding label above and below the plot + 4. Turn off measurements + + +Test 10 - Cursors +----------------- + +.. _TST.CURSORS: + +UID: + TST.CURSORS + +Description: + Test cursor functionality including synchronization, tracking, and moving readouts + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Double-click on the voltage0 channel and go to the right menu which pops up + 2. Run Pluto.signalGenerator setup + 3. In ADC, set X-AXIS buffer size to 200, XMode to Sample, and TMode to ADC Counts + 4. Open the Cursors menu at the bottom of the window. Enable X and Enable Y + 5. Move the X cursors on the plot via the axis handles and place one on voltage0 sine high peak and the other on the next low peak + - **Expected result:** delta x should be around 15 samples between voltage0 high peak and low peak + 6. Lock X cursors via the Cursor menu. Move one cursor to a voltage1 high peak + - **Expected result:** the second cursor should move and maintain the same delta. High peak to low peak should match in both voltage0 and voltage1 + 7. Enable track and select voltage0 + - **Expected result:** markers should appear on the voltage0 curve synced with the X cursor. Values in cursor readouts should change accordingly + 8. Select voltage1 channel + - **Expected result:** markers and readouts should now be related to voltage1 + 9. Turn off track and measure voltage0 and voltage1 amplitudes + - **Expected result:** for voltage0 delta y should be around 1.4kV and for voltage1 500V + 10. Enable move readouts. Click and hold the readouts to move them + - **Expected result:** should be able to move the readouts anywhere within the plot + + +ADC-Frequency +^^^^^^^^^^^^^^^^^^ + +Test 1 - X-Axis settings +------------------------- + +.. _TST.ADC_FREQ.X_AXIS_SETTINGS: + +UID: + TST.ADC_FREQ.X_AXIS_SETTINGS + +Description: + Adjust X-axis settings for frequency and sample-based plotting in the ADC plugin + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Scroll down and turn on plot labels in the settings panel + 2. Set XMode to Samples, buffer size to 4000, and press single + - **Expected result:** Plot labels should go up to 4000, and channel curves should span across the whole plot + 3. Set XMode to Frequency, XMin to 0.5 MHz, XMax to 2 MHz, and press single + - **Expected result:** Plot labels should be from 0.5 MHz to 2 MHz, and channel curves should be centered + 4. Set frequency offset to 1 MHz and press single + - **Expected result:** Curves should move 1 MHz to the left + + +Test 2 - Y-Axis settings +------------------------ + +.. _TST.ADC_FREQ.Y_AXIS_SETTINGS: + +UID: + TST.ADC_FREQ.Y_AXIS_SETTINGS + +Description: + Adjust Y-axis settings, including autoscaling and manual range settings + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Scroll down and turn on plot labels in the settings panel + 2. Turn on autoscale and press run + - **Expected result:** Y-axis should automatically scale according to the channel curves + 3. Press stop, turn autoscale off, set YMode to ADC Counts, Min to -140, Max to 20, and press single + - **Expected result:** Y-axis labels should be from -140 to 20, and curves should vertically adjust + 4. Set power offset to 20 dB and press single + - **Expected result:** Curves should move 20 dB up + 5. Press run and change through all the window options and window correction + - **Expected result:** The curves should change slightly in real time + +Test 3 - Settings adjustment +----------------------------- + +.. _TST.ADC_FREQ.SETTINGS_ADJUSTMENT: + +UID: + TST.ADC_FREQ.SETTINGS_ADJUSTMENT + +Description: + Adjust plot settings such as title, labels, thickness, and style + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Change Plot Title to "test" + - **Expected result:** Text in the top left should change to "test" + 2. Turn on and off plot labels + - **Expected result:** Labels on X and Y axis should appear + 3. Change thickness and style to all available modes and observe the changes + - **Expected result:** Channel curves should adjust appearance as expected + + +Test 4 - Print plot +-------------------- + +.. _TST.ADC_FREQ.PRINT_PLOT: + +UID: + TST.ADC_FREQ.PRINT_PLOT + +Description: + Print the current plot to a PDF file + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Run Pluto.signalGenerator setup + 2. Press the single button and then the print button + 3. Select a folder and save the file + - **Expected result:** A new PDF file should appear in the folder containing the last view of the plot + +Test 5 - View plugin documentation +----------------------------------- + +.. _TST.ADC_FREQ.VIEW_PLUGIN_DOC: + +UID: + TST.ADC_FREQ.VIEW_PLUGIN_DOC + +Description: + Open the ADC plugin documentation + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Press the info button in the top left corner of the window + - **Expected result:** The ADC plugin documentation should open + + +Test 6 - Y-Axis channel settings +--------------------------------- + +.. _TST.ADC_FREQ.Y_AXIS_CHANNEL_SETTINGS: + +UID: + TST.ADC_FREQ.Y_AXIS_CHANNEL_SETTINGS + +Description: + Adjust the Y-axis for individual channel curve manipulation + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Enable Y-Axis and move the axis handle up and down + - **Expected result:** The channel curve should move within the Y-axis + 2. Turn off autoscale, set YMode to ADC Counts, Min to -140, Max to 20, and press single + - **Expected result:** Only the voltage0 curve should vertically adjust + 3. Turn off Y-Axis + + +Test 7 - Marker settings +------------------------ + +.. _TST.ADC_FREQ.MARKER_SETTINGS: + +UID: + TST.ADC_FREQ.MARKER_SETTINGS + +Description: + Use markers to identify peaks on channel curves + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Run Pluto.signalGenerator setup + 2. Press run and enable the marker + 3. Set marker type to peak and count to 5 + - **Expected result:** 5 markers should appear on voltage0's curve at the highest peaks + 4. Repeat the process with a count of 7 + 5. Check the table below the plot in peak mode + - **Expected result:** The highest peak should be at 1 MHz + 6. Set marker type to fixed and count to 5 + - **Expected result:** 5 movable cursors should appear + 7. Repeat for a count of 7 + + +Test 8 - Cursor settings +------------------------- + +.. _TST.ADC_FREQ.CURSOR_SETTINGS: + +UID: + TST.ADC_FREQ.CURSOR_SETTINGS + +Description: + Use cursors to measure specific points on channel curves + +Preconditions: + - Setup Pluto.usb + - OS: any + +Steps: + 1. Run Pluto.signalGenerator setup + 2. Press run and set X-Axis buffer size to 200, XMode to Sample, and TMode to ADC Counts + 3. Open the Cursors menu and enable X and Y cursors + 4. Move the X cursor on the plot and place one on voltage0's highest peak + - **Expected result:** The cursor should measure 1 MHz in the readouts + 5. Enable track and select voltage0 + - **Expected result:** Markers should appear on the voltage0 curve, synced with the X cursor + 6. Select voltage1 channel + - **Expected result:** Markers and readouts should now be related to voltage1 + 7. Turn off track and measure voltage0's highest peak using the Y cursor + - **Expected result:** The cursor should measure about -13 dB in the readouts + 8. Enable move readouts and click and hold the readouts to move them + - **Expected result:** Readouts should be movable within the plot + + +Preferences tests +^^^^^^^^^^^^^^^^^^ + +Test 1 - X Scale Position +-------------------------- + +.. _TST.PREF.X_SCALE_POS: + +UID: + TST.PREF.X_SCALE_POS + +Description: + Change the X-axis scale position and verify the label's position on the plot + +Preconditions: + - Pluto.emu + - Press the add device button. + - Enable emulator for Pluto. + - Verify and add device with ADCPlugin enabled. + - OS: any + +Steps: + 1. Change Plot X-Axis scale position to Top, restart app, open ADC-Time and enable plot labels in SETTINGS panel + - **Expected result:** Axis labels should appear on top + 2. Do this again for Bottom option + - **Expected result:** Axis labels should appear on the bottom + 3. Repeat for ADC-Frequency + - **Expected result:** Same result for ADC-Frequency + + +Test 2 - Y Scale Position +------------------------- + +.. _TST.PREF.Y_SCALE_POS: + +UID: + TST.PREF.Y_SCALE_POS + +Description: + Change the Y-axis scale position and verify the label's position on the plot + +Preconditions: + - Pluto.emu + - Press the add device button + - Enable emulator for Pluto + - Verify and add device with ADCPlugin enabled + - OS: any + +Steps: + 1. Change Plot Y-Axis scale position to Right, restart app, open ADC-Time and enable plot labels in SETTINGS panel + - **Expected result:** Axis labels should appear on the right + 2. Do this again for Left option + - **Expected result:** Axis labels should appear on the left + 3. Repeat for ADC-Frequency + - **Expected result:** Same result for ADC-Frequency + + +Test 3 - Channel Handle Position +-------------------------------- + +.. _TST.PREF.CH_HANDLE_POS: + +UID: + TST.PREF.CH_HANDLE_POS + +Description: + Change the Y-handle position and verify the appearance of the handle + +Preconditions: + - Pluto.emu + - Press the add device button + - Enable emulator for Pluto + - Verify and add device with ADCPlugin enabled + - OS: any + +Steps: + 1. Change Plot channel Y-handle position to Right, restart app, open ADC-Time, double click voltage0 to open channel settings and enable Y-AXIS + - **Expected result:** Axis handle should appear on the right + 2. Do this again for Left option + - **Expected result:** Axis handle should appear on the left + 3. Repeat for ADC-Frequency + - **Expected result:** Same result for ADC-Frequency + + +Test 4 - X Cursor Position +--------------------------- + +.. _TST.PREF.X_CURSOR_POS: + +UID: + TST.PREF.X_CURSOR_POS + +Description: + Change the X-cursor position and verify the cursor's appearance + +Preconditions: + - Pluto.emu + - Press the add device button + - Enable emulator for Pluto + - Verify and add device with ADCPlugin enabled + - OS: any + +Steps: + 1. Change Plot X-Cursor position to Top, restart app, open ADC-Time and enable x cursors + - **Expected result:** X cursor handle should appear on top + 2. Do this again for Bottom option + - **Expected result:** X cursor handle should appear on the bottom + 3. Repeat for ADC-Frequency + - **Expected result:** Same result for ADC-Frequency + + +Test 5 - Y Cursor Position +-------------------------- + +.. _TST.PREF.Y_CURSOR_POS: + +UID: + TST.PREF.Y_CURSOR_POS + +Description: + Change the Y-cursor position and verify the cursor's appearance + +Preconditions: + - Pluto.emu + - Press the add device button + - Enable emulator for Pluto + - Verify and add device with ADCPlugin enabled + - OS: any + +Steps: + 1. Change Plot Y-Cursor position to Right, restart app, open ADC-Time and enable y cursors + - **Expected result:** Y cursor handle should appear on the right + 2. Do this again for Left option + - **Expected result:** Y cursor handle should appear on the left + 3. Repeat for ADC-Frequency + - **Expected result:** Same result for ADC-Frequency + + +Test 6 - Show Buffer +-------------------- + +.. _TST.PREF.SHOW_BUFFER: + +UID: + TST.PREF.SHOW_BUFFER + +Description: + Enable/disable the buffer and verify its appearance on the plot + +Preconditions: + - Pluto.emu + - Press the add device button + - Enable emulator for Pluto + - Verify and add device with ADCPlugin enabled + - OS: any + +Steps: + 1. Set buffer to disabled, open ADC-Time + - **Expected result:** There should be no buffer previewer above the plot + 2. Do this again for the enabled option + - **Expected result:** Buffer previewer should appear above the plot + + +Test 7 - Default YMode +---------------------- + +.. _TST.PREF.DEFAULT_YMODE: + +UID: +TST.PREF.DEFAULT_YMODE + +Description: + Set the default Y-mode and verify its behavior in ADC-Time + +Preconditions: + - Pluto.emu + - Press the add device button + - Enable emulator for Pluto + - Verify and add device with ADCPlugin enabled + - OS: any + +Steps: + 1. Set YMode to % Full scale, restart app, open ADC-Time + - **Expected result:** In Y-AXIS, YMODE should be % Full scale diff --git a/docs/tests/plugins/index.rst b/docs/tests/plugins/index.rst index ffd245d65..e16077404 100644 --- a/docs/tests/plugins/index.rst +++ b/docs/tests/plugins/index.rst @@ -10,6 +10,8 @@ Contents :includehidden: :maxdepth: 3 + adc/adc_tests + .. add the path to each plugin test case here example dac/dac_tests