Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test OpenBMC GUI "Overview" menu. |
| 4 | |
Rahul Maheshwari | 41747da | 2020-11-17 09:09:52 -0600 | [diff] [blame] | 5 | Resource ../../lib/gui_resource.robot |
manashsarma | 2544cb1 | 2020-08-23 14:25:08 -0500 | [diff] [blame] | 6 | Resource ../../../lib/logging_utils.robot |
manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 7 | Resource ../../../lib/list_utils.robot |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 8 | Resource ../../../lib/bmc_network_utils.robot |
| 9 | |
| 10 | Library String |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 11 | |
rramyasr-in | 1324257 | 2022-11-08 01:44:52 -0600 | [diff] [blame] | 12 | Suite Setup Run Keywords Launch Browser And Login GUI AND Redfish.Login |
| 13 | Suite Teardown Run Keywords Close Browser AND Redfish.Logout |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 14 | Test Setup Test Setup Execution |
| 15 | |
| 16 | |
| 17 | *** Variables *** |
| 18 | |
manashsarma | 43568c2 | 2020-08-19 12:16:24 -0500 | [diff] [blame] | 19 | ${xpath_overview_page_header} //h1[contains(text(), "Overview")] |
rramyasr-in | 22ed4ae | 2021-12-03 04:50:41 -0600 | [diff] [blame] | 20 | ${xpath_edit_network_settings_button} (//*[text()="View more"])[3] |
| 21 | ${view_all_event_logs} (//*[text()="View more"])[5] |
rramyasr-in | b18e15e | 2022-08-11 05:22:20 -0500 | [diff] [blame] | 22 | ${xpath_launch_host_console} //*[@data-test-id='overviewQuickLinks-button-solConsole'] |
rramyasr-in | 00b5545 | 2021-12-01 23:47:03 -0600 | [diff] [blame] | 23 | ${xpath_led_button} //*[@data-test-id='overviewInventory-checkbox-identifyLed'] |
rramyasr-in | 305d23a | 2022-01-19 01:32:04 -0600 | [diff] [blame] | 24 | ${view_all_Dumps} (//*[text()="View more"])[7] |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 25 | |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 26 | *** Test Cases *** |
| 27 | |
| 28 | Verify Existence Of All Sections In Overview Page |
| 29 | [Documentation] Verify existence of all sections in Overview page. |
| 30 | [Tags] Verify_Existence_Of_All_Sections_In_Overview_Page |
| 31 | |
rramyasr-in | 1a79b66 | 2022-06-13 00:25:50 -0500 | [diff] [blame] | 32 | Page Should Contain BMC date and time |
Ashwini Chandrappa | 516f70d | 2021-12-14 01:21:29 -0600 | [diff] [blame] | 33 | Page Should Contain Firmware information |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 34 | Page Should Contain Server information |
Ashwini Chandrappa | 516f70d | 2021-12-14 01:21:29 -0600 | [diff] [blame] | 35 | Wait Until Page Contains Network information timeout=10 |
rramyasr-in | 532c37f | 2021-12-03 03:39:14 -0600 | [diff] [blame] | 36 | Page Should Contain Power information |
| 37 | Page Should Contain Event logs |
| 38 | Page Should Contain Inventory and LEDs |
rramyasr-in | e6818d1 | 2022-01-13 07:23:40 -0600 | [diff] [blame] | 39 | Page Should Contain Dumps |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 40 | |
rramyasr-in | 19e553c | 2022-10-27 02:17:41 -0500 | [diff] [blame] | 41 | |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 42 | Verify Network Information In Overview Page |
| 43 | [Documentation] Verify values under network information section. |
George Keishing | f924895 | 2021-05-28 07:52:37 -0500 | [diff] [blame] | 44 | [Tags] Verify_Network_Information_In_Overview_Page |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 45 | |
| 46 | ${hostname}= Get BMC Hostname |
| 47 | Page Should Contain ${hostname} |
| 48 | |
| 49 | # Get all IP addresses and prefix lengths on system. |
| 50 | |
| 51 | ${ip_addr_list}= Get BMC IP Info |
| 52 | FOR ${ip_address} IN @{ip_addr_list} |
| 53 | ${ip}= Fetch From Left ${ip_address} \/ |
| 54 | Page Should Contain ${ip} |
| 55 | END |
| 56 | |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 57 | |
manashsarma | e18f99e | 2020-08-28 10:12:57 -0500 | [diff] [blame] | 58 | Verify Server Information Section |
| 59 | [Documentation] Verify values under server information section in overview page. |
| 60 | [Tags] Verify_Server_Information_Section |
| 61 | |
| 62 | ${redfish_machine_model}= Redfish.Get Attribute /redfish/v1/Systems/system/ Model |
| 63 | Page Should Contain ${redfish_machine_model} |
| 64 | |
| 65 | ${redfish_serial_number}= Redfish.Get Attribute /redfish/v1/Systems/system/ SerialNumber |
| 66 | Page Should Contain ${redfish_serial_number} |
| 67 | |
| 68 | ${redfish_motherboard_manufacturer}= Redfish.Get Attribute |
manashsarma | 58de7d7 | 2020-09-07 21:05:21 -0500 | [diff] [blame] | 69 | ... /redfish/v1/Systems/system/ Manufacturer |
manashsarma | e18f99e | 2020-08-28 10:12:57 -0500 | [diff] [blame] | 70 | |
| 71 | Page Should Contain ${redfish_motherboard_manufacturer} |
| 72 | |
| 73 | |
manashsarma | 554ddec | 2020-08-26 00:46:02 -0500 | [diff] [blame] | 74 | Verify BMC Information Section |
| 75 | [Documentation] Verify BMC information section in overview page. |
| 76 | [Tags] Verify_BMC_Information_Section |
| 77 | |
| 78 | ${firmware_version}= Redfish Get BMC Version |
| 79 | Page Should Contain ${firmware_version} |
| 80 | |
| 81 | |
manashsarma | 43568c2 | 2020-08-19 12:16:24 -0500 | [diff] [blame] | 82 | Verify Edit Network Setting Button |
| 83 | [Documentation] Verify navigation to network setting page after clicking the button in overview page. |
| 84 | [Tags] Verify_Edit_Network_Setting_Button |
| 85 | |
| 86 | Click Element ${xpath_edit_network_settings_button} |
| 87 | Wait Until Page Contains Element ${xpath_network_page_header} |
| 88 | |
| 89 | |
manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 90 | Verify Event Under High Priority Events Section |
| 91 | [Documentation] Verify event under high priority events section in case of any event. |
| 92 | [Tags] Verify_Event_Under_High_Priority_Events_Section |
| 93 | |
| 94 | Redfish Purge Event Log |
| 95 | Click Element ${xpath_refresh_button} |
| 96 | Generate Test Error Log |
Ashwini Chandrappa | 243a1f2 | 2021-07-26 01:10:04 -0500 | [diff] [blame] | 97 | Click Element ${xpath_refresh_button} |
manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 98 | Wait Until Page Contains xyz.openbmc_project.Common.Error.InternalFailure timeout=30s |
| 99 | |
| 100 | |
manashsarma | 7d0a412 | 2020-08-23 13:41:03 -0500 | [diff] [blame] | 101 | Verify View All Event Logs Button |
| 102 | [Documentation] Verify view all event log button in overview page. |
| 103 | [Tags] Verify_View_All_Event_Logs_Button |
| 104 | |
| 105 | Generate Test Error Log |
| 106 | Page Should Contain Element ${view_all_event_logs} timeout=30 |
| 107 | Click Element ${view_all_event_logs} |
| 108 | Wait Until Page Contains Element ${xpath_event_header} timeout=30 |
| 109 | |
| 110 | |
rramyasr-in | b18e15e | 2022-08-11 05:22:20 -0500 | [diff] [blame] | 111 | Verify Host Console Button In Overview Page |
| 112 | [Documentation] Click host console button and verify page navigation to host console page. |
| 113 | [Tags] Verify_Host_Console_Button_In_Overview_Page |
manashsarma | a3a2536 | 2020-08-23 09:23:28 -0500 | [diff] [blame] | 114 | |
rramyasr-in | b18e15e | 2022-08-11 05:22:20 -0500 | [diff] [blame] | 115 | Click Element ${xpath_launch_host_console} |
| 116 | Wait Until Page Contains Element ${xpath_host_console_heading} |
manashsarma | a3a2536 | 2020-08-23 09:23:28 -0500 | [diff] [blame] | 117 | |
| 118 | |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 119 | Verify Server LED Turn On |
| 120 | [Documentation] Turn on server LED via GUI and verify its status via Redfish. |
| 121 | [Tags] Verify_Server_LED_Turn_On |
| 122 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 123 | # Turn Off the server LED via Redfish and refresh GUI. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 124 | Set IndicatorLED State Off |
| 125 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 126 | Refresh GUI |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 127 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 128 | # Turn ON the LED via GUI. |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 129 | Click Element At Coordinates ${xpath_led_button} 0 0 |
| 130 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 131 | # Cross check that server LED ON state via Redfish. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 132 | Verify Identify LED State Via Redfish Lit |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 133 | |
| 134 | |
| 135 | Verify Server LED Turn Off |
| 136 | [Documentation] Turn off server LED via GUI and verify its status via Redfish. |
| 137 | [Tags] Verify_Server_LED_Turn_Off |
| 138 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 139 | # Turn On the server LED via Redfish and refresh GUI. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 140 | Set IndicatorLED State Lit |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 141 | Refresh GUI |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 142 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 143 | # Turn OFF the LED via GUI. |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 144 | Click Element At Coordinates ${xpath_led_button} 0 0 |
| 145 | |
| 146 | # Cross check that server LED off state via Redfish. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 147 | Verify Identify LED State Via Redfish Off |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 148 | |
| 149 | |
manashsarma | 65c9e14 | 2020-08-23 07:27:52 -0500 | [diff] [blame] | 150 | Verify BMC Time In Overview Page |
| 151 | [Documentation] Verify that BMC date from GUI matches with BMC time via Redfish. |
| 152 | [Tags] Verify_BMC_Time_In_Overview_Page |
| 153 | |
| 154 | ${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/bmc DateTime |
| 155 | ${converted_date}= Convert Date ${date_time} result_format=%Y-%m-%d |
| 156 | |
| 157 | Page Should Contain ${converted_date} |
| 158 | |
| 159 | |
manashsarma | 43458ff | 2021-08-17 05:42:47 -0500 | [diff] [blame] | 160 | Verify BMC Information At Host Power Off State |
| 161 | [Documentation] Verify that BMC information is displayed at host power off state. |
| 162 | [Tags] Verify_BMC_Information_At_Host_Power_Off_State |
| 163 | |
| 164 | Redfish Power Off stack_mode=skip |
| 165 | ${firmware_version}= Redfish Get BMC Version |
| 166 | Page Should Contain ${firmware_version} |
| 167 | |
| 168 | |
rramyasr-in | 305d23a | 2022-01-19 01:32:04 -0600 | [diff] [blame] | 169 | Verify View More Button For Dumps |
| 170 | [Documentation] Verify view more button for dumps button in overview page. |
| 171 | [Tags] Verify_View_More_Button_For_Dumps |
| 172 | |
| 173 | Wait Until Page Contains Element ${view_all_Dumps} timeout=30 |
| 174 | Click Element ${view_all_Dumps} |
| 175 | Wait Until Page Contains Element ${xpath_dumps_header} timeout=30 |
| 176 | |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 177 | *** Keywords *** |
| 178 | |
| 179 | Test Setup Execution |
| 180 | [Documentation] Do test case setup tasks. |
| 181 | |
| 182 | Click Element ${xpath_overview_menu} |
| 183 | Wait Until Page Contains Element ${xpath_overview_page_header} |
rramyasr-in | 7776e32 | 2022-10-10 11:01:13 -0500 | [diff] [blame] | 184 | Wait Until Element Is Not Visible ${xpath_page_loading_progress_bar} timeout=30 |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 185 | |
rramyasr-in | 1324257 | 2022-11-08 01:44:52 -0600 | [diff] [blame] | 186 | |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 187 | Verify Identify LED State Via Redfish |
| 188 | [Documentation] Verify that Redfish identify LED system with given state. |
| 189 | [Arguments] ${expected_state} |
| 190 | # Description of argument(s): |
| 191 | # expected_state Expected value of Identify LED. |
| 192 | |
| 193 | # Python module: get_member_list(resource_path) |
| 194 | ${systems}= Redfish_Utils.Get Member List /redfish/v1/Systems |
| 195 | FOR ${system} IN @{systems} |
| 196 | ${led_value}= Redfish.Get Attribute ${system} IndicatorLED |
| 197 | Should Be True '${led_value}' == '${expected_state}' |
| 198 | END |
| 199 | |
| 200 | |
| 201 | Set IndicatorLED State |
George Keishing | e23afb5 | 2022-03-17 08:25:49 -0500 | [diff] [blame] | 202 | [Documentation] Perform redfish PATCH operation. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 203 | [Arguments] ${led_state} ${expect_resp_code}=[200, 204] |
| 204 | # Description of argument(s): |
| 205 | # led_state IndicatorLED state to "off", "Lit" etc. |
| 206 | # expect_resp_code Expected HTTPS response code. Default [200, 204] |
| 207 | |
| 208 | # Python module: get_member_list(resource_path) |
| 209 | ${systems}= Redfish_Utils.Get Member List /redfish/v1/Systems |
| 210 | FOR ${system} IN @{systems} |
| 211 | Redfish.Patch ${system} body={"IndicatorLED":${led_state}} valid_status_codes=${expect_resp_code} |
| 212 | END |