blob: 56bd9c6d67a4ba3a16e372a9f1a1de96e78cba1a [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
11*** Test Cases ***
12
13Power On The Host
Sivas SRRf4248852018-01-14 10:33:24 -060014 [Documentation] Power on the host.
Sivas SRR40c1f042018-01-05 11:00:02 -060015 [Tags] Power_On_the_Host
16
Sivas SRRffa42692018-01-17 05:17:35 -060017 Expected Initial Test State Off
Sivas SRR40c1f042018-01-05 11:00:02 -060018 GUI Power On
Sivas SRRffa42692018-01-17 05:17:35 -060019 Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
20 Wait Until Page Contains Running
Sivas SRR40c1f042018-01-05 11:00:02 -060021
Sivas SRRffa42692018-01-17 05:17:35 -060022Click Immediate Shutdown Then No
23 [Documentation] Click the "Immediate shutdown" button and then click the
24 ... "No" button.
25 [Tags] Click_Immediate_Shutdown_Then_No
Sivas SRRf4248852018-01-14 10:33:24 -060026
Sivas SRRffa42692018-01-17 05:17:35 -060027 Expected Initial Test State Running
Sivas SRRf4248852018-01-14 10:33:24 -060028 Controller Server Power Click Button power__hard-shutdown
29 Controller Power Operations Confirmation Click Button ${power_operations}
30 ... ${power_off} ${confirm_msg} ${no}
Sivas SRRf4248852018-01-14 10:33:24 -060031
Sivas SRRffa42692018-01-17 05:17:35 -060032 Is Host Running
33 Wait Until Page Contains Running
Sivas SRR40c1f042018-01-05 11:00:02 -060034
Sivas SRRffa42692018-01-17 05:17:35 -060035Click Cold Reboot Then No
36 [Documentation] Click the "Cold reboot" button and then click the "No"
37 ... button.
38 [Tags] Click_Cold_Reboot_Then_No
Sivas SRR40c1f042018-01-05 11:00:02 -060039
Sivas SRRffa42692018-01-17 05:17:35 -060040 Expected Initial Test State Running
Sivas SRR40c1f042018-01-05 11:00:02 -060041 Controller Server Power Click Button power__cold-boot
42 Controller Power Operations Confirmation Click Button ${power_operations}
Sivas SRRf4248852018-01-14 10:33:24 -060043 ... ${cold_boot} ${confirm_msg} ${no}
Sivas SRRffa42692018-01-17 05:17:35 -060044
45 Is Host Running
Sivas SRR40c1f042018-01-05 11:00:02 -060046 Page Should Contain Running
47
Sivas SRRffa42692018-01-17 05:17:35 -060048Click Warm Reboot Then No
49 [Documentation] Click the "Warm reboot" button and then click the "No"
50 ... button.
51 [Tags] Click_Warm_Reboot_Then_No
Sivas SRRf4248852018-01-14 10:33:24 -060052
Sivas SRRffa42692018-01-17 05:17:35 -060053 Expected Initial Test State Running
54 Controller Server Power Click Button power__warm-boot
55 Controller Power Operations Confirmation Click Button ${power_operations}
56 ... ${warm_boot} ${confirm_msg} ${no}
57 Is Host Running
58 Page Should Contain Running
59
60Click Orderly Shutdown Then No
61 [Documentation] Click the "Orderly shutdown" button and then click the
62 ... "No" button.
63 [Tags] Click_Orderly_Shutdown_Then_No
64
65 Expected Initial Test State Running
66 Controller Server Power Click Button power__soft-shutdown
67 Controller Power Operations Confirmation Click Button ${power_operations}
68 ... ${shut_down} ${confirm_msg} ${no}
69 Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
70 Page Should Contain Running
71
72Click Warm Reboot Then Yes
73 [Documentation] Click the "Warm reboot" button and then click the "Yes"
74 ... button.
75 [Tags] Click_Warm_Reboot_Then_Yes
76
77 Expected Initial Test State Running
78 Controller Server Power Click Button power__warm-boot
79 Controller Power Operations Confirmation Click Button ${power_operations}
80 ... ${warm_boot} ${confirm_msg} ${yes}
81 Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
82 Page Should Contain Running
83
84Click Cold Reboot Then Yes
85 [Documentation] Click the "Cold reboot" button and then click the "Yes"
86 ... button.
87 [Tags] Click_Cold_Reboot_Then_Yes
88
89 Expected Initial Test State Running
Sivas SRRf4248852018-01-14 10:33:24 -060090 Controller Server Power Click Button power__cold-boot
91 Controller Power Operations Confirmation Click Button ${power_operations}
92 ... ${cold_boot} ${confirm_msg} ${yes}
93 Page Should Contain Standby
Sivas SRRffa42692018-01-17 05:17:35 -060094 Wait Until Keyword Succeeds 10 min 10 sec Is Host Running
Sivas SRRf4248852018-01-14 10:33:24 -060095 Page Should Contain Running
96
Sivas SRRffa42692018-01-17 05:17:35 -060097Click Orderly Shutdown Then Yes
98 [Documentation] Click the "Orderly shutdown" button and then click the
99 ... "Yes" button.
100 [Tags] Click_Orderly_Shutdown_Then_Yes
Sivas SRRf4248852018-01-14 10:33:24 -0600101
Sivas SRRffa42692018-01-17 05:17:35 -0600102 Expected Initial Test State Running
Sivas SRR40c1f042018-01-05 11:00:02 -0600103 Controller Server Power Click Button power__soft-shutdown
104 Controller Power Operations Confirmation Click Button ${power_operations}
105 ... ${shut_down} ${confirm_msg} ${yes}
106 Page Should Contain Off
Sivas SRRffa42692018-01-17 05:17:35 -0600107 Wait Until Keyword Succeeds 6 min 10 sec Is Host Off
108
109Click Immediate Shutdown Then Yes
110 [Documentation] Click "Immediate shutdown" button and then click the "Yes"
111 ... button.
112 [Tags] Click_Immediate_Shutdown_Then_Yes
113
114 Expected Initial Test State Running
Rahul Maheshwari3a70d5f2018-12-10 05:14:09 -0600115
116 # By this time GUI logs out. So relaunching it.
117 Close Browser
118 Launch Browser And Login OpenBMC GUI
119
Sivas SRRffa42692018-01-17 05:17:35 -0600120 Controller Server Power Click Button power__hard-shutdown
121 Controller Power Operations Confirmation Click Button ${power_operations}
122 ... ${power_off} ${confirm_msg} ${yes}
123
124 Wait Until Page Contains Off
125 Wait Until Keyword Succeeds 6 min 10 sec Is Host Off
Sivas SRR40c1f042018-01-05 11:00:02 -0600126
127OpenBMC GUI Logoff
Sivas SRRf4248852018-01-14 10:33:24 -0600128 [Documentation] Log out from openBMC GUI.
Sivas SRR40c1f042018-01-05 11:00:02 -0600129 [Tags] OpenBMC_GUI_Logoff
130
131 Log ${xpath_openbmc_url}
132 Log To Console ${xpath_openbmc_url}
133 Click Element header
134
Rahul Maheshwari62b045b2018-11-29 00:58:34 -0600135
Sivas SRRffa42692018-01-17 05:17:35 -0600136*** Keywords ***
137
Rahul Maheshwari62b045b2018-11-29 00:58:34 -0600138Test Setup Execution
139 [Documentation] Do testcase setup tasks.
Sivas SRRffa42692018-01-17 05:17:35 -0600140
Rahul Maheshwari2a674e22018-12-06 01:40:56 -0600141 # Launch the GUI and navigate to server power page.
142 Launch Browser And Login OpenBMC GUI
Rahul Maheshwari62b045b2018-11-29 00:58:34 -0600143 Click Element ${xpath_select_server_power}
144 Wait Until Page Contains Server power operations
Rahul Maheshwari2a674e22018-12-06 01:40:56 -0600145