Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

How to do manual tests

reszelaz edited this page Apr 26, 2021 · 13 revisions

This is a check-list of manual tests. It is just orientative. Expand it at will. This list assumes a clean environment with all Sardana dependencies already installed and access to a Tango system with the TangoTest DS running.

Hint: this list can be used as a template to be copy-pasted on a release manual test issues

Installation

  • Install Sardana (on Linux from the tar.gz : pip3 install <tarball_artifact_URL> (in conda use pip) and on Windows from MSI)

Create testing environment and run testsuite

  • Start Pool demo2. In a console do Pool demo2.
  • Start MacroServer demo2 and connect to the Pool demo2. In another console do: MacroServer demo2
  • Set MacroServer's MacroPath to point to the macro examples. In another IPython console do: tango.DeviceProxy('macroserver/demo2/1').put_property({'MacroPath':'<path_to_sardana_installation_dir>/macroserver/macros/examples'}) Note: Remember to use OS path separator e.g. / on Linux and \ on Windows
  • Restart MacroServer e.g. Ctrl+C in the MacroServer's console and start it again.
  • Create spock profile demo2. In another console do spock --profile=demo2
  • In spock run sar_demo macro.
  • Edit <path_to_sardana_installation_dir>/sardanacustomsettings.py to point to the demo2 door e.g. UNITTEST_DOOR_NAME = "door/demo2/1"
  • Run testsuite. In another console do pytest <path_to_sardana_installation_dir> Note: On openSuse 11.1 and Windows there are known problems with testsuite. Check previous release comments.

Test Sardana using Spock and expconf

  • Test interactive macros from spock e.g. ask_for_moveable, ask_peak Note: On Windows there is printed RuntimeWarning about difference between stdin and stdout encoding.
  • Execute umvr macro and verify that the position updates arrives.
  • In expconf configure scan files by setting ScanDir to: /tmp/ on Linux C:\Users\<username>\tmp on Windows and ScanFile to: demo1.h5, demo1.dat.
  • Configure online plot to show counters: On expconf GUI select for all the counter channels, Plot Type 'Spectrum' and Plot Axes '<mov>'
  • Configure snapshot group: with a motor and the sys/tg_test/1/ampli attribute.
  • Add the sys/tg_test/1/double_scalar attribute to the measurement group.
  • Open online plot: showscan online (This should ask to enable JsonRecorder, set it to true. Otherwise enable it in spock: senv JsonRecorder True).
  • Run step scan
  • Verify that records appear in spock output.
  • Verify that records were stored in scan files.
  • Verify that records were plotted on the online plot
  • Run showscan and access to the last scan data.
  • With edmac modify existing macro: ask_peak and run it to verify that the change was applied.
  • With edmac create a new macro in a new macro library: edmac my_macro <path_to_sardana_installation_dir>/macroserver/macros/examples/my_macros.py and run it. Note: Remember to use OS path separator e.g. '/' on Linux and '' on Windows

Test Sardana with TaurusGUI

  • Create a new GUI from scratch using TaurusGUI: $ taurus newgui
    • project page: directory = "/home//mygui"
    • general settings page: GUI Name = "MyGui"
    • custom logo: NEXT
    • synoptics page: NEXT
    • MacroServer Info page: Enable sardana Communication and select demo2 MS and Door name
    • Instruments from Pool page: Yes
    • the rest of the pages, NEXT...NEXT...NEXT...FINISH
    • note the message about installing the GUI!
  • install the GUI with pip
  • launch the GUI: $ MyGui
  • say yes to enable json (if not done yet)
  • set a nice panel layout

PMTV (PoolMotorTaurusValue)

  • Open a taurus form with all slit related motors
  • Activate compact mode
    • Move all motors with absolute and relative mode
    • Stop a motor in the middle of it's movement with the stop button
  • Activate normal mode (deactivate compact)
    • Move all motors with absolute and relative mode
    • Stop a motor in the middle of it's movement with the stop button
  • Activate expert mode
    • Define slit motors limits while the form is open. Expert mode buttons and limit indicators should switch from grey to active colors
    • Check every motor limit with expert buttons
  • Move a few motors using absolute and the apply button
  • Reset absolute blue values

PCTV (PoolChannelTaurusValue)

  • Open a taurus form with a counter, 1D and 2D experimental channels

For each of the channels repeat the following:

  • For 1D and 2D set a timer: "__self" using the "Tango attributes" form (opened from the context menu on the channel's label)
  • Set integration time e.g. 1, and press return
  • Start acquisition
  • Show value (2nd show does not work)

macroexecutor

  • Execute ascan macro
  • Pause it in the middel and resume
  • Abort it
  • Add it to favorites
  • Run lsm macro
  • Execute ascan from favorites
  • Run lsmac macro
  • Execute ascan from history
  • Edit dscan macro in spock yellow line and run it
  • Restart macroexecutor application
  • Run lsm from history
  • Run ascan from favorites

sequencer

  • Add ascan macro to the sequence
  • Add lsct macro as a post-acq hook of ascan
  • Add dscan macro to the sequence
  • Run the sequence
  • Save sequence to a file
  • Start new sequence Note: new sequences cannot always be created #305
  • Load sequence from a files
  • Run the loaded sequence

MacroButton

  • Start macrobutton:
    python3 -m sardana.taurus.qt.qtgui.extra_macroexecutor.macrobutton door_demo2_1
  • Execute lsmac macro with default parameter value for filter (.*).
  • Execute ascanct macro.
  • Execute ascan macro and stop it with the macrobutton (after prior pausing and confirming stopping in the pop-up).

QtSpock

  • Create default Spock profile (QtSpock requires it): spock and connect to Door_demo2_1.
  • Open QtSpock: python -m sardana.taurus.qt.qtgui.extra_sardana.qtspock
  • Execute lsm
  • Execute a ascan
  • Stop scan execution with Ctrl+C
  • Execute plotting macro examples e.g. J0_plot (it's buggy and appears twice, once in the qtconsole, and once in the pop-up dialog)

sardanaeditor

Note: There are known bugs on CentOS and Windows

  • Open sardanaeditor with macroserver name as argument.
    python3 -m sardana.taurus.qt.qtgui.extra_sardana.sardanaeditor MS_demo2_1
    
  • Browse macro libraries and open an existing macro.
  • Edit existing macro and save & apply chaneges.
  • Execute macro to see if changes were aplied.
  • Create a new macro using template.
  • Execute the newly created macro.