blob: 971d2bd9a26b8e02af501a3ae22c1008f78e8fe1 [file] [log] [blame]
Rahul Maheshwarib940e192020-07-07 01:52:24 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "Overview" menu.
4
Rahul Maheshwari41747da2020-11-17 09:09:52 -06005Resource ../../lib/gui_resource.robot
manashsarma2544cb12020-08-23 14:25:08 -05006Resource ../../../lib/logging_utils.robot
manashsarmafb353662020-08-27 05:12:04 -05007Resource ../../../lib/list_utils.robot
manashsarma6d584de2020-08-30 02:33:07 -05008Resource ../../../lib/bmc_network_utils.robot
9
10Library String
Rahul Maheshwarib940e192020-07-07 01:52:24 -050011
12Suite Setup Launch Browser And Login GUI
13Suite Teardown Close Browser
14Test Setup Test Setup Execution
15
16
17*** Variables ***
18
manashsarma43568c22020-08-19 12:16:24 -050019${xpath_overview_page_header} //h1[contains(text(), "Overview")]
20${xpath_edit_network_settings_button} //*[@data-test-id='overviewQuickLinks-button-networkSettings']
manashsarma7d0a4122020-08-23 13:41:03 -050021${view_all_event_logs} //*[@data-test-id='overviewEvents-button-eventLogs']
manashsarmaa3a25362020-08-23 09:23:28 -050022${xpath_launch_serial_over_lan} //*[@data-test-id='overviewQuickLinks-button-solConsole']
manashsarmaffb30932020-08-24 07:31:54 -050023${xpath_led_button} //*[@data-test-id='overviewQuickLinks-checkbox-serverLed']
Rahul Maheshwarib940e192020-07-07 01:52:24 -050024
25*** Test Cases ***
26
27Verify Existence Of All Sections In Overview Page
28 [Documentation] Verify existence of all sections in Overview page.
29 [Tags] Verify_Existence_Of_All_Sections_In_Overview_Page
30
31 Page Should Contain BMC information
32 Page Should Contain Server information
33 Page Should Contain Network information
34 Page Should Contain Power consumption
35 Page Should Contain High priority events
36
37
manashsarmafb353662020-08-27 05:12:04 -050038Verify Message In High Priority Events Section For No Events
39 [Documentation] Verify message under high priority events section in case of no events.
40 [Tags] Verify_Message_In_High_Priority_Events_Section_For_No_Events
41
42 Redfish Purge Event Log
43 Click Element ${xpath_refresh_button}
44 Wait Until Page Contains no high priority events to display timeout=10
45
46
manashsarma6d584de2020-08-30 02:33:07 -050047Verify Network Information In Overview Page
48 [Documentation] Verify values under network information section.
49 [Tags] Verify_Network_Information_In_Overview Page
50
51 ${hostname}= Get BMC Hostname
52 Page Should Contain ${hostname}
53
54 # Get all IP addresses and prefix lengths on system.
55
56 ${ip_addr_list}= Get BMC IP Info
57 FOR ${ip_address} IN @{ip_addr_list}
58 ${ip}= Fetch From Left ${ip_address} \/
59 Page Should Contain ${ip}
60 END
61
62 ${macaddr}= Get BMC MAC Address
63 Page Should Contain ${macaddr}
64
65
66Verify Message In High Priority Events Section For No Events
67 [Documentation] Verify message under high priority events section in case of no events.
68 [Tags] Verify_Message_In_High_Priority_Events_Section_For_No_Events
69
70 Redfish Purge Event Log
71 Click Element ${xpath_refresh_button}
72 Wait Until Page Contains no high priority events to display timeout=10
73
74
manashsarmae18f99e2020-08-28 10:12:57 -050075Verify Server Information Section
76 [Documentation] Verify values under server information section in overview page.
77 [Tags] Verify_Server_Information_Section
78
79 ${redfish_machine_model}= Redfish.Get Attribute /redfish/v1/Systems/system/ Model
80 Page Should Contain ${redfish_machine_model}
81
82 ${redfish_serial_number}= Redfish.Get Attribute /redfish/v1/Systems/system/ SerialNumber
83 Page Should Contain ${redfish_serial_number}
84
85 ${redfish_motherboard_manufacturer}= Redfish.Get Attribute
manashsarma58de7d72020-09-07 21:05:21 -050086 ... /redfish/v1/Systems/system/ Manufacturer
manashsarmae18f99e2020-08-28 10:12:57 -050087
88 Page Should Contain ${redfish_motherboard_manufacturer}
89
90
manashsarma554ddec2020-08-26 00:46:02 -050091Verify BMC Information Section
92 [Documentation] Verify BMC information section in overview page.
93 [Tags] Verify_BMC_Information_Section
94
95 ${firmware_version}= Redfish Get BMC Version
96 Page Should Contain ${firmware_version}
97
98
manashsarma43568c22020-08-19 12:16:24 -050099Verify Edit Network Setting Button
100 [Documentation] Verify navigation to network setting page after clicking the button in overview page.
101 [Tags] Verify_Edit_Network_Setting_Button
102
103 Click Element ${xpath_edit_network_settings_button}
104 Wait Until Page Contains Element ${xpath_network_page_header}
105
106
manashsarmafb353662020-08-27 05:12:04 -0500107Verify Event Under High Priority Events Section
108 [Documentation] Verify event under high priority events section in case of any event.
109 [Tags] Verify_Event_Under_High_Priority_Events_Section
110
111 Redfish Purge Event Log
112 Click Element ${xpath_refresh_button}
113 Generate Test Error Log
114 Wait Until Page Contains xyz.openbmc_project.Common.Error.InternalFailure timeout=30s
115
116
manashsarma7d0a4122020-08-23 13:41:03 -0500117Verify View All Event Logs Button
118 [Documentation] Verify view all event log button in overview page.
119 [Tags] Verify_View_All_Event_Logs_Button
120
121 Generate Test Error Log
122 Page Should Contain Element ${view_all_event_logs} timeout=30
123 Click Element ${view_all_event_logs}
124 Wait Until Page Contains Element ${xpath_event_header} timeout=30
125
126
manashsarmaa3a25362020-08-23 09:23:28 -0500127Verify Serial Over LAN Console Button In Overview Page
128 [Documentation] Click serial over LAN button and verify page navigation to serial over LAN page.
129 [Tags] Verify_Serial_Over_LAN_Console_Button_In_Overview_Page
130
131 Click Element ${xpath_launch_serial_over_lan}
Rahul Maheshwarib0374262020-11-02 01:38:31 -0600132 Wait Until Page Contains Element ${xpath_sol_console_heading}
manashsarmaa3a25362020-08-23 09:23:28 -0500133
134
manashsarmaffb30932020-08-24 07:31:54 -0500135Verify Server LED Turn On
136 [Documentation] Turn on server LED via GUI and verify its status via Redfish.
137 [Tags] Verify_Server_LED_Turn_On
138
139 # Turn Off the server LED via Redfish.
140 Redfish.Patch /redfish/v1/Systems/system body={"IndicatorLED":"Off"} valid_status_codes=[200, 204]
141
142 # Refresh GUI.
143 Click Element ${xpath_refresh_button}
144 Wait Until Page Contains Element ${xpath_led_button}
145
146 # Turn on the server LED via GUI and sleep.
147 Click Element At Coordinates ${xpath_led_button} 0 0
148
149 # Cross check that server LED on state via Redfish.
150 ${led_status}= Redfish.Get Attribute /redfish/v1/Systems/system IndicatorLED
151 Should Be True '${led_status}' == 'Lit'
152
153
154Verify Server LED Turn Off
155 [Documentation] Turn off server LED via GUI and verify its status via Redfish.
156 [Tags] Verify_Server_LED_Turn_Off
157
158 # Turn On the server LED via Redfish.
159 Redfish.Patch /redfish/v1/Systems/system body={"IndicatorLED":"Lit"} valid_status_codes=[200, 204]
160
161 # Refresh GUI.
162 Click Element ${xpath_refresh_button}
163 Wait Until Page Contains Element ${xpath_led_button}
164
165 # Now turn off the LED via GUI.
166 Click Element At Coordinates ${xpath_led_button} 0 0
167
168 # Cross check that server LED off state via Redfish.
169 ${led_status}= Redfish.Get Attribute /redfish/v1/Systems/system IndicatorLED
170 Should Be True '${led_status}' == 'Off'
171
172
manashsarma65c9e142020-08-23 07:27:52 -0500173Verify BMC Time In Overview Page
174 [Documentation] Verify that BMC date from GUI matches with BMC time via Redfish.
175 [Tags] Verify_BMC_Time_In_Overview_Page
176
177 ${date_time}= Redfish.Get Attribute ${REDFISH_BASE_URI}Managers/bmc DateTime
178 ${converted_date}= Convert Date ${date_time} result_format=%Y-%m-%d
179
180 Page Should Contain ${converted_date}
181
182
Rahul Maheshwarib940e192020-07-07 01:52:24 -0500183*** Keywords ***
184
185Test Setup Execution
186 [Documentation] Do test case setup tasks.
187
188 Click Element ${xpath_overview_menu}
189 Wait Until Page Contains Element ${xpath_overview_page_header}
190