Register Map - Test suite

Note

User guide

The following apply for all tests bellow, any special requirements will be mentioned.

Prerequisites:
  • Scopy v2.0.0 or later with Register Map installed on the system

  • Tests listed as dependencies are successfully completed

  • Reset .ini files to default by pressing “Reset” button in Preferences

Note

Tester

Test Date

Scopy version

Plugin version (N/A if not applicable)

Comments

Setup Environment

AdalmPluto.Emu:
  • Open Scopy

  • Start the iio-emu process using pluto option from the dropdown

  • Connect to the Pluto Device

AdalmPluto.Device:
  • Open Scopy

  • Connect to the Pluto Device using Ip or USB

M2k.Emu:
  • Open Scopy

  • Start the iio-emu process using adalm2000 option from the dropdown

  • Check the Register Map plugin checkbox in the Add Device page.

  • Connect to the M2k Device

Test Cases with no XML available

The following test cases work with or without XML file.

Test 1 : Read

UID: TST.REGMAP.READ

Description: Verify that the user can read the register value.

OS: ANY

Precondition:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Press Read button
    • Expected result: The value “0x02” is displayed in the Value field

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 2 : Write

UID: TST.REGMAP.WRITE

Description: Verify that the user can write the register value.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Read current value of the register

  4. Change the value to 0x4a
    • Expected result: The value “0x4a” is displayed in the Value field

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 3 : Write wrong value

UID: TST.REGMAP.WRITE_WRONG_VALUE

Description: Verify that the user can not write the wrong value to the register.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Read current value of the register

  4. Change the value to 0xtest
    • Expected result: The value “0x00” is displayed in the Value field

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 4 : Change device

UID: TST.REGMAP.CHANGE_DEVICE

Description: Verify that the user can change the device.

OS: ANY

Precondition:
Steps:
  1. Open Register Map plugin

  2. Change device using the dropdown in the top right corner from ad9361-phy to cf-ad9361-lpc

    • Expected result: The device is changed reflected by changing the register table

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Tests with XML available

The following test cases require XML file of the device to be present in the system.

Test 5 : Show register map table

UID: TST.REGMAP.SHOW_TABLE

Description: Verify that the user can see the register map table.

OS: ANY

Precondition:
Steps:
  1. Open Register Map plugin
    • Expected result: The register map table is displayed in the plugin

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 6 : Search register

UID: TST.REGMAP.SEARCH

Description: Verify that the user can search the for a register.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Make sure device ad9361-phy is selected

  3. Input “test” in the search field

  4. Press Search button or enter

    • Expected result: Four registers are displayed in the table each of them has “test” in the name or description of the register or bitfields

    • Actual result:

  1. Input “010” in the search field
    • Expected result: Three results are displayed in the table one of them has “010” in the address and the rest have “010” in the name or description of the register or bitfields

    • Actual result:

  1. Input “not in here” in the search field
    • Expected result: No register is displayed in the table

    • Actual result:

  1. Clear the search field
    • Expected result: All registers are displayed in the table.

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 7 : Simple Register value updated on read

UID: TST.REGMAP.SIMPLE_REGISTER_VALUE_UPDATED_ON_READ

Description: Verify that the user can see the register value in the table updated

on read.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Press Read button
    • Expected result: The value in the table is updated to the new value.

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 8 : Simple Register value updated on write

UID: TST.REGMAP.SIMPLE_REGISTER_VALUE_UPDATED_ON_WRITE

Description: Verify that the user can see the register value in the table updated

on write.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Read current value of the register

  4. Change the value to 0x4a

  5. Press Write button
    • Expected result: The value in the table is updated to the new value

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 9 : Detailed Register value updated on read

UID: TST.REGMAP.DETAILED_REGISTER_VALUE_UPDATED_ON_READ

Description: Verify that the detailed register bitfields value is updated on read.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Press Read button
    • Expected result: The detailed register bitfields value is updated to the new value

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 10 : Detailed Register value updated on write

UID: TST.REGMAP.DETAILED_REGISTER_VALUE_UPDATED_ON_WRITE

Description: Verify that the detailed register bitfields value is updated on write.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Read current value of the register

  4. Change the value to 0x4a

  5. Press Write button
    • Expected result: The detailed register bitfields value is updated to the new value

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 11 : Change value of the bitfield inside the detailed register

UID: TST.REGMAP.CHANGE_BITFIELD_VALUE

Description: Verify that when value of the bitfield is changed the Value field is

updated. Changing the bitfield value should not change the value of the register until Write button is pressed.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Set the value of the register to “0x4c” using the value picker.

  4. Change the value of “reg002_b3” bitfield from on to off
    • Expected result: The Value field is updated to the “0x44” value

    • Actual result:

  1. Press Write button
    • Expected result: The register value is updated to “0x44”

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 12 : Change Value field updates detailed register bitfields

UID: TST.REGMAP.CHANGE_VALUE_FIELD

Description: Verify that when value of the Value field is changed the detailed

register bitfields are updated.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x2” using address picker

  3. Set the value of the register to “0x4c” using the value picker.

  4. Change the value of the Value field to “0x44”
    • Expected result: The detailed bitfield “reg002_b3” value is changed from on to off

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 13 : Change selected register

UID: TST.REGMAP.CHANGE_SELECTED_REGISTER

Description: Verify that when the register is changed the detailed register bitfields

are updated.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register address “0x20” using address picker
    • Expected result: The register “0x20” is displayed in the table and selected

    • Actual result:

  1. Using + button from address picker change the register to “0x21”
    • Expected result: The register “0x21” is displayed in the table and selected

    • Actual result:

  1. Using - button from address picker change the register to “0x20”
    • Expected result: The register “0x20” is displayed in the table and selected

    • Actual result:

  1. Click on the register “0x21” in the table
    • Expected result: The register “0x21” in the table is selected value from address picker is updated to “0x21”

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 14 : Toggle detailed register visible

UID: TST.REGMAP.TOGGLE_DETAILED_REGISTER_VISIBLE

Description: Verify that the user can toggle the detailed register visibility.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Press Toggle detailed register button
    • Expected result: The detailed register is hidden

    • Actual result:

  1. Press Toggle detailed register button
    • Expected result: The detailed register is visible

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 15 : Settings autoread

UID: TST.REGMAP.SETTINGS_AUTOREAD

Description: Verify that the autoread setting is working.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Press Settings button

  3. Check Autoread checkbox

  4. Select a register address “0x02” using address picker
    • Expected result: The value is updated to the read value

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 16 : Settings read interval

UID: TST.REGMAP.SETTINGS_READ_INTERVAL

Description: Verify that the read interval setting is working.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Press Settings button

  3. Input “2” in the “From register” field

  4. Input “4” in the “To register” field

  5. Press Read interval button
    • Expected result: registers “0x02”, “0x03” and “0x04” now have their values read

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 17 : Settings read interval with wrong interval

UID: TST.REGMAP.SETTINGS_READ_INTERVAL_WRONG_INTERVAL

Description: Verify that the read interval setting is not working with wrong

interval.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Press Settings button

  3. Input “4” in the “From register” field

  4. Input “2” in the “To register” field

  5. Press Read interval button
    • Expected result: Nothing happens

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 18 : Settings register dump

UID: TST.REGMAP.SETTINGS_REGISTER_DUMP

Description: Verify that the register dump is working.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Read value from registers “0x02”, “0x03” and “0x04”

  3. Press Settings button

  4. Press Find path button

  5. Select a “.csv” file to save the register dump
    • Expected result: file path is displayed in the File path field

    • Actual result:

  1. Press Register dump button
    • Expected result: The read register values will be saved in the selected file with the structure of each row containing register address and register value

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 19 : Settings write values

UID: TST.REGMAP.SETTINGS_WRITE_VALUES

Description: Verify that the write values setting is working.

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Press Settings button

  3. Press Find path button

  4. Select the “.csv” file generated in Test 18

  5. Press Write values button
    • Expected result: The values from the selected file are written to the registers

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 20 : Settings Dump register and write values disabled

UID: TST.REGMAP.SETTINGS_DUMP_REGIS_AND_WRITE_VALUES_DISABLED

Description: Verify that the Register dump and Write values buttons are disabled

when the file path is not selected.

OS: ANY

Precondition:
Steps:
  1. Open Register Map plugin

  2. Press Settings button

  3. Press Register dump button
    • Expected result: The button is disabled

    • Actual result:

  1. Press Write values button
    • Expected result: The button is disabled

    • Actual result:

  1. Use Find path button to select a file
    • Expected result: The Write values and Register dump buttons are enabled

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Tests 21 : Preferences color coding background color

UID: TST.REGMAP.PREFERENCES_COLOR_CODING_BACKGROUND_COLOR

Description: Verify that the background color of the register in the table is

changing to reflect the value of the register.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Preferences

  2. Go to RegmapPlugin tab

  3. Using the dropdown select Register background and bitfield background

  4. Open Register Map plugin

  5. Select a register with the address “0x2”

  6. Press Read button
    • Expected result:
      • The background color of the register is changed to reflect the value of the register

      • The background color of the bitfields is changed to reflect the value of the bitfield

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 22 : Preferences color coding text color

UID: TST.REGMAP.PREFERENCES_COLOR_CODING_TEXT_COLOR

Description: Verify that the text color of the register in the table is changing to

reflect the value of the register.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Preferences

  2. Go to RegmapPlugin tab

  3. Using the dropdown select Register text and bitfield text

  4. Open Register Map plugin

  5. Select a register with the address “0x2”

  6. Press Read button
    • Expected result:
      • The text color of the register is changed to reflect the value of the register

      • The text color of the bitfields is changed to reflect the value of the bitfield

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 23 : Preferences color for value

UID: TST.REGMAP.PREFERENCES_COLORS_VALUE_RANGE

Description: Verify that the colors used for the values are corect.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Preferences

  2. Go to RegmapPlugin tab

  3. Using the dropdown select Register text and bitfield text

  4. Open Register Map plugin

  5. Select a register with the address “0x2”

  6. Write value “0x6f” to the register

  7. Press Read button

  8. Select a register with the address “0x3”

  9. Write value “0x6f” to the register

  10. Press Read button - Expected result: The bitfields that have the same value will have the text value same color - Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 24 : Preferences color coding dynamic change

UID: TST.REGMAP.PREFERENCES_COLOR_CODING_DYNAMIC_CHANGE

Description: Verify that the color coding is changing dynamically.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Register Map plugin

  2. Select a register with the address “0x2”

  3. Press Read button

  4. Open Preferences

  5. Go to RegmapPlugin tab

  6. Using the dropdown select Register background and bitfield background

  7. Open Register Map plugin
    • Expected result: The background color of the register is changed to reflect the value of the register

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 25 : Preference settings save on close

UID: TST.REGMAP.PREFERENCES_SETTINGS_SAVE_ON_CLOSE

Description: Verify that the preferences are saved on close.

OS: ANY

Precondition:
Prerequisites:
Steps:
  1. Open Preferences

  2. Go to RegmapPlugin tab

  3. Using the dropdown select Register background and bitfield background

  4. Close Scopy

  5. Open Scopy

  6. Connect to the device

  7. Open Register Map plugin

  8. Select register with address “0x2”

  9. Press Read button
    • Expected result: The background color of the register is changed to reflect the value of the register

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 26 : Info button documentation

UID: TST.REGMAP.INFO_BUTTON_DOCUMENTATION

Description: Verify that the user can see the documentation for the register.

OS: ANY

Precondition:
Steps:
  1. Open Register Map plugin

  2. Press i button

  3. Press Documentation button
    • Expected result: An internet browser is opened with the documentation for the register

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 27 : Info button tutorial

UID: TST.REGMAP.INFO_BUTTON_TUTORIAL

Description: Verify that the user can see the tutorial for the register.

OS: ANY

Precondition:
Steps:
  1. Open Register Map plugin

  2. Press i button

  3. Press Tutorial button
    • Expected result: A tutorial explaining how to use the plugin is displayed

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 28 : Info button tutorial no XML

UID: TST.REGMAP.INFO_BUTTON_TUTORIAL_NO_XML

Description: Verify that the user can see the tutorial for the register when no XML

file is present.

OS: ANY

Precondition:
  • M2k is connected

Steps:
  1. Open Register Map plugin

  2. Press i button

  3. Press Tutorial button
    • Expected result: A tutorial explaining how to use the plugin is displayed and does not include explanation of the register map table

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL

Test 29 : Custom XML file

UID: TST.REGMAP.CUSTOM_XML_FILE

Description: Verify that the user can use a custom XML file.

OS: WINDOWS

Precondition:

Create an XML file with the following structure:

<ad9963>
    <Register>
    <Name>reg000</Name>
    <Address>0x000</Address>
    <Description>Comm</Description>
    <Exists>True</Exists>
    <Width>8</Width>
    <Notes></Notes>
    <BitFields>
    <BitField>
        <Name>Reset</Name>
        <Access>R/W</Access>
        <DefaultValue>0</DefaultValue>
        <Description></Description>
        <Visibility>Public</Visibility>
        <Width>1</Width>
        <Notes>The device is placed in reset when this bit is written high and remains in reset until the bit is written low.</Notes>
        <BitOffset>0</BitOffset>
        <RegOffset>5</RegOffset>
        <SliceWidth>1</SliceWidth>
    </BitField>
    <BitField>
        <Name>LSB_FIRST</Name>
        <Access>R/W</Access>
        <DefaultValue>0</DefaultValue>
        <Description></Description>
        <Visibility>Public</Visibility>
        <Width>1</Width>
        <Notes>Serial port communication, LSB or MSB first.</Notes>
        <Options>
        <Option>
            <Description>0 = MSB first</Description>
            <Value>0</Value>
        </Option>
        <Option>
            <Description>1 = LSB first</Description>
            <Value>1</Value>
        </Options>
        <BitOffset>0</BitOffset>
        <RegOffset>6</RegOffset>
        <SliceWidth>1</SliceWidth>
    </BitField>
    <BitField>
        <Name>SDIO</Name>
        <Access>R/W</Access>
        <DefaultValue>0</DefaultValue>
        <Description></Description>
        <Visibility>Public</Visibility>
        <Width>1</Width>
        <Notes>SDIO pin operation.</Notes>
        <Options>
        <Option>
            <Description>0 = SDIO - input only</Description>
            <Value>0</Value>
        </Option>
        <Option>
            <Description>1 = SDIO - bidirectional input/output</Description>
            <Value>1</Value>
        </Options>
        <BitOffset>0</BitOffset>
        <RegOffset>7</RegOffset>
        <SliceWidth>1</SliceWidth>
    </BitField>
    </BitFields>
    </Register>
</ad9963>
Steps:
  1. Open Scopy

  2. Enable the M2k.Emu with the “Register Map” plugin enabled

  3. Connect to the M2k.Emu

  4. Open Register Map plugin

  5. Select device “ad9963”
    • Expected result: The register map has no table displayed

    • Actual result:

  1. Close Scopy

  2. Copy the XML file where you have installed Scopy in the “plugins/xmls” folder

  3. Open Scopy

  4. Enable the M2k.Emu with the “Register Map” plugin enabled

  5. Connect to the M2k.Emu

  6. Open Register Map plugin

  7. Select device “ad9963”
    • Expected result:
      • The register map table is displayed and contains only the registers from the custom XML file

      • The detailed register is displayed and contains the data from the custom XML file

    • Actual result:

Tested OS:

Comments:

Result: PASS/FAIL