blob: 14079ec469187ec020469ccd79427a2aee6230ab [file] [log] [blame]
Sivas SRR40c1f042018-01-05 11:00:02 -06001*** Settings ***
2
3Documentation Test Open BMC GUI Power Operations under GUI Header.
4
Sivas SRRffa42692018-01-17 05:17:35 -06005Resource ../../../../lib/state_manager.robot
Sivas SRR40c1f042018-01-05 11:00:02 -06006Resource ../../lib/resource.robot
7
Sivas SRRffa42692018-01-17 05:17:35 -06008Suite Setup Login OpenBMC GUI with failure enable
Sivas SRR40c1f042018-01-05 11:00:02 -06009Suite Teardown Close Browser
10
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
115 Controller Server Power Click Button power__hard-shutdown
116 Controller Power Operations Confirmation Click Button ${power_operations}
117 ... ${power_off} ${confirm_msg} ${yes}
118
119 Wait Until Page Contains Off
120 Wait Until Keyword Succeeds 6 min 10 sec Is Host Off
Sivas SRR40c1f042018-01-05 11:00:02 -0600121
122OpenBMC GUI Logoff
Sivas SRRf4248852018-01-14 10:33:24 -0600123 [Documentation] Log out from openBMC GUI.
Sivas SRR40c1f042018-01-05 11:00:02 -0600124 [Tags] OpenBMC_GUI_Logoff
125
126 Log ${xpath_openbmc_url}
127 Log To Console ${xpath_openbmc_url}
128 Click Element header
129
Sivas SRRffa42692018-01-17 05:17:35 -0600130*** Keywords ***
131
132Expected Initial Test State
133 [Documentation] Power on the host if "Running" expected, Power off the
134 ... host if "Off" expected as per the requirement of initial test state.
135 [Arguments] ${expectedState}
136 # Description of argument(s):
137 # expectedState Test initial host state.
138
139 Run Keyword If '${expectedState}' == 'Running'
140 ... Initiate Host Boot
141
142 Run Keyword If '${expectedState}' == 'Off'
143 ... Initiate Host PowerOff
144
145Login OpenBMC GUI with failure enable
146
147 Open Browser With URL ${xpath_openbmc_url}
148 Login OpenBMC GUI ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
149
Sivas SRR40c1f042018-01-05 11:00:02 -0600150
151
152