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 | |
rramyasr-in | 5f280c0 | 2022-11-11 06:41:00 -0600 | [diff] [blame] | 19 | ${xpath_overview_page_header} //h1[contains(text(), "Overview")] |
| 20 | ${xpath_server_information_view_more_button} (//*[text()="View more"])[1] |
| 21 | ${xpath_firmware_information_view_more_button} (//*[text()="View more"])[2] |
rramyasr-in | 4033439 | 2022-11-21 10:14:51 -0600 | [diff] [blame] | 22 | ${xpath_network_information_view_more_button} (//*[text()="View more"])[3] |
rramyasr-in | 5f280c0 | 2022-11-11 06:41:00 -0600 | [diff] [blame] | 23 | ${xpath_power_information_view_more_button} (//*[text()="View more"])[4] |
| 24 | ${xpath_event_logs_view_more_button} (//*[text()="View more"])[5] |
| 25 | ${xpath_inventory_and_leds_view_more_button} (//*[text()="View more"])[6] |
| 26 | ${xpath_launch_host_console} //*[@data-test-id='overviewQuickLinks-button-solConsole'] |
| 27 | ${xpath_led_button} //*[@data-test-id='overviewInventory-checkbox-identifyLed'] |
| 28 | ${view_all_Dumps} (//*[text()="View more"])[7] |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 29 | |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 30 | *** Test Cases *** |
| 31 | |
| 32 | Verify Existence Of All Sections In Overview Page |
| 33 | [Documentation] Verify existence of all sections in Overview page. |
| 34 | [Tags] Verify_Existence_Of_All_Sections_In_Overview_Page |
| 35 | |
rramyasr-in | 1a79b66 | 2022-06-13 00:25:50 -0500 | [diff] [blame] | 36 | Page Should Contain BMC date and time |
Ashwini Chandrappa | 516f70d | 2021-12-14 01:21:29 -0600 | [diff] [blame] | 37 | Page Should Contain Firmware information |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 38 | Page Should Contain Server information |
Ashwini Chandrappa | 516f70d | 2021-12-14 01:21:29 -0600 | [diff] [blame] | 39 | Wait Until Page Contains Network information timeout=10 |
rramyasr-in | 532c37f | 2021-12-03 03:39:14 -0600 | [diff] [blame] | 40 | Page Should Contain Power information |
| 41 | Page Should Contain Event logs |
| 42 | Page Should Contain Inventory and LEDs |
rramyasr-in | e6818d1 | 2022-01-13 07:23:40 -0600 | [diff] [blame] | 43 | Page Should Contain Dumps |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 44 | |
rramyasr-in | 19e553c | 2022-10-27 02:17:41 -0500 | [diff] [blame] | 45 | |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 46 | Verify Network Information In Overview Page |
| 47 | [Documentation] Verify values under network information section. |
George Keishing | f924895 | 2021-05-28 07:52:37 -0500 | [diff] [blame] | 48 | [Tags] Verify_Network_Information_In_Overview_Page |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 49 | |
| 50 | ${hostname}= Get BMC Hostname |
| 51 | Page Should Contain ${hostname} |
| 52 | |
| 53 | # Get all IP addresses and prefix lengths on system. |
| 54 | |
rramyasr-in | 690fcd4 | 2022-10-27 03:25:39 -0500 | [diff] [blame] | 55 | ${resp}= Redfish.Get Attribute /redfish/v1/Managers/bmc/EthernetInterfaces/eth0 IPv4StaticAddresses |
| 56 | ${ip_addr}= Set Variable ${resp[0]['Address']} |
| 57 | Page Should Contain ${ip_addr} |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 58 | |
manashsarma | 6d584de | 2020-08-30 02:33:07 -0500 | [diff] [blame] | 59 | |
manashsarma | e18f99e | 2020-08-28 10:12:57 -0500 | [diff] [blame] | 60 | Verify Server Information Section |
| 61 | [Documentation] Verify values under server information section in overview page. |
| 62 | [Tags] Verify_Server_Information_Section |
| 63 | |
| 64 | ${redfish_machine_model}= Redfish.Get Attribute /redfish/v1/Systems/system/ Model |
| 65 | Page Should Contain ${redfish_machine_model} |
| 66 | |
| 67 | ${redfish_serial_number}= Redfish.Get Attribute /redfish/v1/Systems/system/ SerialNumber |
| 68 | Page Should Contain ${redfish_serial_number} |
| 69 | |
| 70 | ${redfish_motherboard_manufacturer}= Redfish.Get Attribute |
manashsarma | 58de7d7 | 2020-09-07 21:05:21 -0500 | [diff] [blame] | 71 | ... /redfish/v1/Systems/system/ Manufacturer |
manashsarma | e18f99e | 2020-08-28 10:12:57 -0500 | [diff] [blame] | 72 | |
| 73 | Page Should Contain ${redfish_motherboard_manufacturer} |
| 74 | |
| 75 | |
manashsarma | 554ddec | 2020-08-26 00:46:02 -0500 | [diff] [blame] | 76 | Verify BMC Information Section |
| 77 | [Documentation] Verify BMC information section in overview page. |
| 78 | [Tags] Verify_BMC_Information_Section |
| 79 | |
| 80 | ${firmware_version}= Redfish Get BMC Version |
| 81 | Page Should Contain ${firmware_version} |
| 82 | |
| 83 | |
manashsarma | 43568c2 | 2020-08-19 12:16:24 -0500 | [diff] [blame] | 84 | Verify Edit Network Setting Button |
| 85 | [Documentation] Verify navigation to network setting page after clicking the button in overview page. |
| 86 | [Tags] Verify_Edit_Network_Setting_Button |
| 87 | |
rramyasr-in | 4033439 | 2022-11-21 10:14:51 -0600 | [diff] [blame] | 88 | Click Element ${xpath_network_information_view_more_button} |
rramyasr-in | 732cc3f | 2022-11-16 05:30:57 -0600 | [diff] [blame] | 89 | Wait Until Page Contains Element ${xpath_network_heading} |
manashsarma | 43568c2 | 2020-08-19 12:16:24 -0500 | [diff] [blame] | 90 | |
| 91 | |
manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 92 | Verify Event Under High Priority Events Section |
| 93 | [Documentation] Verify event under high priority events section in case of any event. |
| 94 | [Tags] Verify_Event_Under_High_Priority_Events_Section |
| 95 | |
| 96 | Redfish Purge Event Log |
| 97 | Click Element ${xpath_refresh_button} |
| 98 | Generate Test Error Log |
Ashwini Chandrappa | 243a1f2 | 2021-07-26 01:10:04 -0500 | [diff] [blame] | 99 | Click Element ${xpath_refresh_button} |
manashsarma | fb35366 | 2020-08-27 05:12:04 -0500 | [diff] [blame] | 100 | Wait Until Page Contains xyz.openbmc_project.Common.Error.InternalFailure timeout=30s |
| 101 | |
| 102 | |
rramyasr-in | 4033439 | 2022-11-21 10:14:51 -0600 | [diff] [blame] | 103 | Verify View More Event Logs Button |
| 104 | [Documentation] Verify view more event log button in overview page. |
| 105 | [Tags] Verify_View_More_Event_Logs_Button |
manashsarma | 7d0a412 | 2020-08-23 13:41:03 -0500 | [diff] [blame] | 106 | |
| 107 | Generate Test Error Log |
rramyasr-in | 4033439 | 2022-11-21 10:14:51 -0600 | [diff] [blame] | 108 | Page Should Contain Element ${xpath_event_logs_view_more_button} timeout=30 |
| 109 | Click Element ${xpath_event_logs_view_more_button} |
rramyasr-in | 5f280c0 | 2022-11-11 06:41:00 -0600 | [diff] [blame] | 110 | Wait Until Page Contains Element ${xpath_event_logs_heading} timeout=30 |
manashsarma | 7d0a412 | 2020-08-23 13:41:03 -0500 | [diff] [blame] | 111 | |
| 112 | |
rramyasr-in | b18e15e | 2022-08-11 05:22:20 -0500 | [diff] [blame] | 113 | Verify Host Console Button In Overview Page |
| 114 | [Documentation] Click host console button and verify page navigation to host console page. |
| 115 | [Tags] Verify_Host_Console_Button_In_Overview_Page |
manashsarma | a3a2536 | 2020-08-23 09:23:28 -0500 | [diff] [blame] | 116 | |
rramyasr-in | b18e15e | 2022-08-11 05:22:20 -0500 | [diff] [blame] | 117 | Click Element ${xpath_launch_host_console} |
| 118 | Wait Until Page Contains Element ${xpath_host_console_heading} |
manashsarma | a3a2536 | 2020-08-23 09:23:28 -0500 | [diff] [blame] | 119 | |
| 120 | |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 121 | Verify Server LED Turn On |
| 122 | [Documentation] Turn on server LED via GUI and verify its status via Redfish. |
| 123 | [Tags] Verify_Server_LED_Turn_On |
| 124 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 125 | # Turn Off the server LED via Redfish and refresh GUI. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 126 | Set IndicatorLED State Off |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 127 | Refresh GUI |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 128 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 129 | # Turn ON the LED via GUI. |
rramyasr-in | 436de60 | 2023-03-03 03:13:10 -0600 | [diff] [blame] | 130 | Click Element ${xpath_led_button} |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 131 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 132 | # Cross check that server LED ON state via Redfish. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 133 | Verify Identify LED State Via Redfish Lit |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 134 | |
| 135 | |
| 136 | Verify Server LED Turn Off |
| 137 | [Documentation] Turn off server LED via GUI and verify its status via Redfish. |
| 138 | [Tags] Verify_Server_LED_Turn_Off |
| 139 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 140 | # Turn On the server LED via Redfish and refresh GUI. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 141 | Set IndicatorLED State Lit |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 142 | Refresh GUI |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 143 | |
Ashwini Chandrappa | 90c6a81 | 2021-07-07 04:50:00 -0500 | [diff] [blame] | 144 | # Turn OFF the LED via GUI. |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 145 | Click Element At Coordinates ${xpath_led_button} 0 0 |
| 146 | |
| 147 | # Cross check that server LED off state via Redfish. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 148 | Verify Identify LED State Via Redfish Off |
manashsarma | ffb3093 | 2020-08-24 07:31:54 -0500 | [diff] [blame] | 149 | |
| 150 | |
manashsarma | 65c9e14 | 2020-08-23 07:27:52 -0500 | [diff] [blame] | 151 | Verify BMC Time In Overview Page |
| 152 | [Documentation] Verify that BMC date from GUI matches with BMC time via Redfish. |
| 153 | [Tags] Verify_BMC_Time_In_Overview_Page |
| 154 | |
| 155 | ${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/bmc DateTime |
| 156 | ${converted_date}= Convert Date ${date_time} result_format=%Y-%m-%d |
| 157 | |
| 158 | Page Should Contain ${converted_date} |
| 159 | |
| 160 | |
manashsarma | 43458ff | 2021-08-17 05:42:47 -0500 | [diff] [blame] | 161 | Verify BMC Information At Host Power Off State |
| 162 | [Documentation] Verify that BMC information is displayed at host power off state. |
| 163 | [Tags] Verify_BMC_Information_At_Host_Power_Off_State |
| 164 | |
| 165 | Redfish Power Off stack_mode=skip |
| 166 | ${firmware_version}= Redfish Get BMC Version |
| 167 | Page Should Contain ${firmware_version} |
| 168 | |
| 169 | |
rramyasr-in | 305d23a | 2022-01-19 01:32:04 -0600 | [diff] [blame] | 170 | Verify View More Button For Dumps |
| 171 | [Documentation] Verify view more button for dumps button in overview page. |
| 172 | [Tags] Verify_View_More_Button_For_Dumps |
| 173 | |
| 174 | Wait Until Page Contains Element ${view_all_Dumps} timeout=30 |
| 175 | Click Element ${view_all_Dumps} |
rramyasr-in | 5f280c0 | 2022-11-11 06:41:00 -0600 | [diff] [blame] | 176 | Wait Until Page Contains Element ${xpath_dumps_header} timeout=30 |
| 177 | |
| 178 | |
| 179 | Verify View More Button Under Server Information Section |
| 180 | [Documentation] Verify view more button under server information section in overview page. |
| 181 | [Tags] Verify_View_More_Button_Under_Server_Information_Section |
| 182 | |
rramyasr-in | 4033439 | 2022-11-21 10:14:51 -0600 | [diff] [blame] | 183 | Wait Until Page Contains Element ${xpath_server_information_view_more_button} timeout=30 |
| 184 | Click Element ${xpath_server_information_view_more_button} |
rramyasr-in | 5f280c0 | 2022-11-11 06:41:00 -0600 | [diff] [blame] | 185 | Wait Until Page Contains Element ${xpath_inventory_and_leds_heading} timeout=30 |
| 186 | |
| 187 | |
| 188 | Verify View More Button Under Firmware Information Section |
| 189 | [Documentation] Verify view more button under firmware information section in overview page. |
| 190 | [Tags] Verify_View_More_Button_Under_Firmware_Information_Section |
| 191 | |
| 192 | Wait Until Page Contains Element ${xpath_firmware_information_view_more_button} timeout=30 |
| 193 | Click Element ${xpath_firmware_information_view_more_button} |
| 194 | Wait Until Page Contains Element ${xpath_firmware_heading} timeout=30 |
| 195 | |
| 196 | |
| 197 | Verify View More Button Under Network Information Section |
| 198 | [Documentation] Verify view more button under network information section in overview page. |
George Keishing | 44cce89 | 2022-11-23 08:05:57 -0600 | [diff] [blame] | 199 | [Tags] Verify_View_More_Button_Under_Network_Information_Section |
rramyasr-in | 5f280c0 | 2022-11-11 06:41:00 -0600 | [diff] [blame] | 200 | |
rramyasr-in | 4033439 | 2022-11-21 10:14:51 -0600 | [diff] [blame] | 201 | Wait Until Page Contains Element ${xpath_network_information_view_more_button} timeout=30 |
| 202 | Click Element ${xpath_network_information_view_more_button} |
rramyasr-in | 5f280c0 | 2022-11-11 06:41:00 -0600 | [diff] [blame] | 203 | Wait Until Page Contains Element ${xpath_network_heading} timeout=30 |
| 204 | |
| 205 | |
| 206 | Verify View More Button Under Power Information Section |
| 207 | [Documentation] Verify view more button under power information section in overview page. |
George Keishing | 44cce89 | 2022-11-23 08:05:57 -0600 | [diff] [blame] | 208 | [Tags] Verify_View_More_Button_Under_Power_Information_Section |
rramyasr-in | 5f280c0 | 2022-11-11 06:41:00 -0600 | [diff] [blame] | 209 | |
| 210 | Wait Until Page Contains Element ${xpath_power_information_view_more_button} timeout=30 |
| 211 | Click Element ${xpath_power_information_view_more_button} |
| 212 | Wait Until Page Contains Element ${xpath_power_heading} timeout=30 |
| 213 | |
| 214 | |
| 215 | Verify View More Button Under Event Logs Section |
| 216 | [Documentation] Verify view more button under event logs section in overview page. |
| 217 | [Tags] Verify_View_More_Button_Under_Event_Logs_Section |
| 218 | |
| 219 | Wait Until Page Contains Element ${xpath_event_logs_view_more_button} timeout=30 |
| 220 | Click Element ${xpath_event_logs_view_more_button} |
| 221 | Wait Until Page Contains Element ${xpath_event_logs_heading} timeout=30 |
| 222 | |
| 223 | |
| 224 | Verify View More Button Under Inventory And LEDs Section |
| 225 | [Documentation] Verify view more button under inventory and leds section in overview page. |
| 226 | [Tags] Verify_View_More_Button_Under_Inventory_And_LEDs_Section |
| 227 | |
| 228 | Wait Until Page Contains Element ${xpath_inventory_and_leds_view_more_button} timeout=30 |
| 229 | Click Element ${xpath_inventory_and_leds_view_more_button} |
| 230 | Wait Until Page Contains Element ${xpath_inventory_and_leds_heading} timeout=30 |
| 231 | |
rramyasr-in | 305d23a | 2022-01-19 01:32:04 -0600 | [diff] [blame] | 232 | |
Rahul Maheshwari | b940e19 | 2020-07-07 01:52:24 -0500 | [diff] [blame] | 233 | *** Keywords *** |
| 234 | |
| 235 | Test Setup Execution |
| 236 | [Documentation] Do test case setup tasks. |
| 237 | |
| 238 | Click Element ${xpath_overview_menu} |
| 239 | Wait Until Page Contains Element ${xpath_overview_page_header} |
rramyasr-in | 7776e32 | 2022-10-10 11:01:13 -0500 | [diff] [blame] | 240 | 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] | 241 | |
rramyasr-in | 1324257 | 2022-11-08 01:44:52 -0600 | [diff] [blame] | 242 | |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 243 | Verify Identify LED State Via Redfish |
| 244 | [Documentation] Verify that Redfish identify LED system with given state. |
| 245 | [Arguments] ${expected_state} |
| 246 | # Description of argument(s): |
| 247 | # expected_state Expected value of Identify LED. |
| 248 | |
rramyasr-in | 436de60 | 2023-03-03 03:13:10 -0600 | [diff] [blame] | 249 | ${led_state}= Redfish.Get Attribute /redfish/v1/Systems/system IndicatorLED |
| 250 | Should Be True '${led_state}' == '${expected_state}' |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 251 | |
| 252 | |
| 253 | Set IndicatorLED State |
George Keishing | e23afb5 | 2022-03-17 08:25:49 -0500 | [diff] [blame] | 254 | [Documentation] Perform redfish PATCH operation. |
George Keishing | 52eb7c2 | 2022-03-11 10:58:53 -0600 | [diff] [blame] | 255 | [Arguments] ${led_state} ${expect_resp_code}=[200, 204] |
| 256 | # Description of argument(s): |
| 257 | # led_state IndicatorLED state to "off", "Lit" etc. |
| 258 | # expect_resp_code Expected HTTPS response code. Default [200, 204] |
| 259 | |
rramyasr-in | 436de60 | 2023-03-03 03:13:10 -0600 | [diff] [blame] | 260 | |
| 261 | Redfish.Patch /redfish/v1/Systems/system body={"IndicatorLED": "${led_state}"} |
| 262 | ... valid_status_codes=${expect_resp_code} |
| 263 | |