Register Map - Test suite
Note
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:
M2k.Emu is connected
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
- 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:
AdalmPluto.Device is connected
- Prerequisites:
Read is passed
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
Read current value of the register
- 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:
AdalmPluto.Device is connected
- Prerequisites:
Read is passed
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
Read current value of the register
- 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:
AdalmPluto.Device or AdalmPluto.Emu is connected
- Steps:
Open Register Map plugin
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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Steps:
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
- Steps:
Open Register Map plugin
Make sure device ad9361-phy is selected
Input “test” in the search field
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:
- 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:
- Input “not in here” in the search field
Expected result: No register is displayed in the table
Actual result:
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Simple Register value updated on read is passed
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
Read current value of the register
Change the value to 0x4a
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Detailed Register value updated on read is passed
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
Read current value of the register
Change the value to 0x4a
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
Set the value of the register to “0x4c” using the value picker.
- Change the value of “reg002_b3” bitfield from on to off
Expected result: The Value field is updated to the “0x44” value
Actual result:
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
- Steps:
Open Register Map plugin
Select a register address “0x2” using address picker
Set the value of the register to “0x4c” using the value picker.
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
- Steps:
Open Register Map plugin
- Select a register address “0x20” using address picker
Expected result: The register “0x20” is displayed in the table and selected
Actual result:
- Using + button from address picker change the register to “0x21”
Expected result: The register “0x21” is displayed in the table and selected
Actual result:
- Using - button from address picker change the register to “0x20”
Expected result: The register “0x20” is displayed in the table and selected
Actual result:
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
- Steps:
Open Register Map plugin
- Press Toggle detailed register button
Expected result: The detailed register is hidden
Actual result:
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
Read is passed
- Steps:
Open Register Map plugin
Press Settings button
Check Autoread checkbox
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
Read is passed
- Steps:
Open Register Map plugin
Press Settings button
Input “2” in the “From register” field
Input “4” in the “To register” field
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Settings read interval is passed
- Steps:
Open Register Map plugin
Press Settings button
Input “4” in the “From register” field
Input “2” in the “To register” field
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Show register map table is passed
- Steps:
Open Register Map plugin
Read value from registers “0x02”, “0x03” and “0x04”
Press Settings button
Press Find path button
- Select a “.csv” file to save the register dump
Expected result: file path is displayed in the File path field
Actual result:
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Prerequisites:
Settings register dump is passed
- Steps:
Open Register Map plugin
Press Settings button
Press Find path button
Select the “.csv” file generated in Test 18
- 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:
AdalmPluto.Device is connected
XML file of the device is present in the system
- Steps:
Open Register Map plugin
Press Settings button
- Press Register dump button
Expected result: The button is disabled
Actual result:
- Press Write values button
Expected result: The button is disabled
Actual result:
- 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:
AdalmPluto.Device or AdalmPluto.Emu is connected
XML file of the device is present in the system
- Prerequisites:
Read is passed
Show register map table is passed
- Steps:
Open Preferences
Go to RegmapPlugin tab
Using the dropdown select Register background and bitfield background
Open Register Map plugin
Select a register with the address “0x2”
- 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:
AdalmPluto.Device or AdalmPluto.Emu is connected
XML file of the device is present in the system
- Prerequisites:
Read is passed
Show register map table is passed
- Steps:
Open Preferences
Go to RegmapPlugin tab
Using the dropdown select Register text and bitfield text
Open Register Map plugin
Select a register with the address “0x2”
- 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:
AdalmPluto.Device or AdalmPluto.Emu is connected
XML file of the device is present in the system
- Prerequisites:
Read is passed
Show register map table is passed
- Steps:
Open Preferences
Go to RegmapPlugin tab
Using the dropdown select Register text and bitfield text
Open Register Map plugin
Select a register with the address “0x2”
Write value “0x6f” to the register
Press Read button
Select a register with the address “0x3”
Write value “0x6f” to the register
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:
AdalmPluto.Device or AdalmPluto.Emu is connected
XML file of the device is present in the system
- Prerequisites:
Read is passed
Show register map table is passed
- Steps:
Open Register Map plugin
Select a register with the address “0x2”
Press Read button
Open Preferences
Go to RegmapPlugin tab
Using the dropdown select Register background and bitfield background
- 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:
AdalmPluto.Device or AdalmPluto.Emu is connected
XML file of the device is present in the system
- Prerequisites:
Read is passed
Show register map table is passed
- Steps:
Open Preferences
Go to RegmapPlugin tab
Using the dropdown select Register background and bitfield background
Close Scopy
Open Scopy
Connect to the device
Open Register Map plugin
Select register with address “0x2”
- 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 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:
Open Scopy
Enable the M2k.Emu with the “Register Map” plugin enabled
Connect to the M2k.Emu
Open Register Map plugin
- Select device “ad9963”
Expected result: The register map has no table displayed
Actual result:
Close Scopy
Copy the XML file where you have installed Scopy in the “plugins/xmls” folder
Open Scopy
Enable the M2k.Emu with the “Register Map” plugin enabled
Connect to the M2k.Emu
Open Register Map plugin
- 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