blob: 45a24bbd3da38a9c138d57f8bf2e7c0c2b44ef9b [file] [log] [blame]
Sivas SRR40c1f042018-01-05 11:00:02 -06001*** Settings ***
2
3Documentation Test Open BMC GUI Power Operations under GUI Header.
4
Rahul Maheshwarib89977a2019-02-05 00:21:48 -06005Resource ../../../lib/state_manager.robot
Sivas SRR40c1f042018-01-05 11:00:02 -06006Resource ../../lib/resource.robot
7
Rahul Maheshwari62b045b2018-11-29 00:58:34 -06008Test Setup Test Setup Execution
Rahul Maheshwari2a674e22018-12-06 01:40:56 -06009Test Teardown Close Browser
Sivas SRR40c1f042018-01-05 11:00:02 -060010
Anusha Dathatri883ff7c2019-10-01 01:56:30 -050011Force Tags Header_Power_Operations
12
Sivas SRR40c1f042018-01-05 11:00:02 -060013*** Test Cases ***
14
15Power On The Host
Sivas SRRf4248852018-01-14 10:33:24 -060016 [Documentation] Power on the host.
Sivas SRR40c1f042018-01-05 11:00:02 -060017 [Tags] Power_On_the_Host
18
Sivas SRRffa42692018-01-17 05:17:35 -060019 Expected Initial Test State Off
Sivas SRR40c1f042018-01-05 11:00:02 -060020 GUI Power On
Sivas SRRffa42692018-01-17 05:17:35 -060021 Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
22 Wait Until Page Contains Running
Sivas SRR40c1f042018-01-05 11:00:02 -060023
Sivas SRRffa42692018-01-17 05:17:35 -060024Click Immediate Shutdown Then No
25 [Documentation] Click the "Immediate shutdown" button and then click the
26 ... "No" button.
27 [Tags] Click_Immediate_Shutdown_Then_No
Sivas SRRf4248852018-01-14 10:33:24 -060028
Sivas SRRffa42692018-01-17 05:17:35 -060029 Expected Initial Test State Running
Sivas SRRf4248852018-01-14 10:33:24 -060030 Controller Server Power Click Button power__hard-shutdown
31 Controller Power Operations Confirmation Click Button ${power_operations}
32 ... ${power_off} ${confirm_msg} ${no}
Sivas SRRf4248852018-01-14 10:33:24 -060033
Sivas SRRffa42692018-01-17 05:17:35 -060034 Is Host Running
35 Wait Until Page Contains Running
Sivas SRR40c1f042018-01-05 11:00:02 -060036
Sivas SRRffa42692018-01-17 05:17:35 -060037Click Cold Reboot Then No
38 [Documentation] Click the "Cold reboot" button and then click the "No"
39 ... button.
40 [Tags] Click_Cold_Reboot_Then_No
Sivas SRR40c1f042018-01-05 11:00:02 -060041
Sivas SRRffa42692018-01-17 05:17:35 -060042 Expected Initial Test State Running
Sivas SRR40c1f042018-01-05 11:00:02 -060043 Controller Server Power Click Button power__cold-boot
44 Controller Power Operations Confirmation Click Button ${power_operations}
Sivas SRRf4248852018-01-14 10:33:24 -060045 ... ${cold_boot} ${confirm_msg} ${no}
Sivas SRRffa42692018-01-17 05:17:35 -060046
47 Is Host Running
Sivas SRR40c1f042018-01-05 11:00:02 -060048 Page Should Contain Running
49
Sivas SRRffa42692018-01-17 05:17:35 -060050Click Warm Reboot Then No
51 [Documentation] Click the "Warm reboot" button and then click the "No"
52 ... button.
53 [Tags] Click_Warm_Reboot_Then_No
Sivas SRRf4248852018-01-14 10:33:24 -060054
Sivas SRRffa42692018-01-17 05:17:35 -060055 Expected Initial Test State Running
56 Controller Server Power Click Button power__warm-boot
57 Controller Power Operations Confirmation Click Button ${power_operations}
58 ... ${warm_boot} ${confirm_msg} ${no}
59 Is Host Running
60 Page Should Contain Running
61
62Click Orderly Shutdown Then No
63 [Documentation] Click the "Orderly shutdown" button and then click the
64 ... "No" button.
65 [Tags] Click_Orderly_Shutdown_Then_No
66
67 Expected Initial Test State Running
68 Controller Server Power Click Button power__soft-shutdown
69 Controller Power Operations Confirmation Click Button ${power_operations}
70 ... ${shut_down} ${confirm_msg} ${no}
71 Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
72 Page Should Contain Running
73
74Click Warm Reboot Then Yes
75 [Documentation] Click the "Warm reboot" button and then click the "Yes"
76 ... button.
77 [Tags] Click_Warm_Reboot_Then_Yes
78
79 Expected Initial Test State Running
80 Controller Server Power Click Button power__warm-boot
81 Controller Power Operations Confirmation Click Button ${power_operations}
82 ... ${warm_boot} ${confirm_msg} ${yes}
83 Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
84 Page Should Contain Running
85
86Click Cold Reboot Then Yes
87 [Documentation] Click the "Cold reboot" button and then click the "Yes"
88 ... button.
89 [Tags] Click_Cold_Reboot_Then_Yes
90
91 Expected Initial Test State Running
Sivas SRRf4248852018-01-14 10:33:24 -060092 Controller Server Power Click Button power__cold-boot
93 Controller Power Operations Confirmation Click Button ${power_operations}
94 ... ${cold_boot} ${confirm_msg} ${yes}
95 Page Should Contain Standby
Sivas SRRffa42692018-01-17 05:17:35 -060096 Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
Sivas SRRf4248852018-01-14 10:33:24 -060097 Page Should Contain Running
98
Sivas SRRffa42692018-01-17 05:17:35 -060099Click Orderly Shutdown Then Yes
100 [Documentation] Click the "Orderly shutdown" button and then click the
101 ... "Yes" button.
102 [Tags] Click_Orderly_Shutdown_Then_Yes
Sivas SRRf4248852018-01-14 10:33:24 -0600103
Sivas SRRffa42692018-01-17 05:17:35 -0600104 Expected Initial Test State Running
Sivas SRR40c1f042018-01-05 11:00:02 -0600105 Controller Server Power Click Button power__soft-shutdown
106 Controller Power Operations Confirmation Click Button ${power_operations}
107 ... ${shut_down} ${confirm_msg} ${yes}
108 Page Should Contain Off
Sivas SRRffa42692018-01-17 05:17:35 -0600109 Wait Until Keyword Succeeds 6 min 10 sec Is Host Off
110
111Click Immediate Shutdown Then Yes
112 [Documentation] Click "Immediate shutdown" button and then click the "Yes"
113 ... button.
114 [Tags] Click_Immediate_Shutdown_Then_Yes
115
116 Expected Initial Test State Running
Rahul Maheshwari3a70d5f2018-12-10 05:14:09 -0600117
118 # By this time GUI logs out. So relaunching it.
119 Close Browser
120 Launch Browser And Login OpenBMC GUI
121
Sivas SRRffa42692018-01-17 05:17:35 -0600122 Controller Server Power Click Button power__hard-shutdown
123 Controller Power Operations Confirmation Click Button ${power_operations}
124 ... ${power_off} ${confirm_msg} ${yes}
125
126 Wait Until Page Contains Off
127 Wait Until Keyword Succeeds 6 min 10 sec Is Host Off
Sivas SRR40c1f042018-01-05 11:00:02 -0600128
129OpenBMC GUI Logoff
Sivas SRRf4248852018-01-14 10:33:24 -0600130 [Documentation] Log out from openBMC GUI.
Sivas SRR40c1f042018-01-05 11:00:02 -0600131 [Tags] OpenBMC_GUI_Logoff
132
133 Log ${xpath_openbmc_url}
134 Log To Console ${xpath_openbmc_url}
135 Click Element header
136
Rahul Maheshwari62b045b2018-11-29 00:58:34 -0600137
Sivas SRRffa42692018-01-17 05:17:35 -0600138*** Keywords ***
139
Rahul Maheshwari62b045b2018-11-29 00:58:34 -0600140Test Setup Execution
141 [Documentation] Do testcase setup tasks.
Sivas SRRffa42692018-01-17 05:17:35 -0600142
Rahul Maheshwari2a674e22018-12-06 01:40:56 -0600143 # Launch the GUI and navigate to server power page.
144 Launch Browser And Login OpenBMC GUI
Rahul Maheshwari62b045b2018-11-29 00:58:34 -0600145 Click Element ${xpath_select_server_power}
146 Wait Until Page Contains Server power operations
Rahul Maheshwari2a674e22018-12-06 01:40:56 -0600147