Organized power ON and OFF test cases in GI Bucket
Changes:
- Test Cases: These test cases do not depend on either
Power ON or Power OFF state.
- Power On Test Cases : Contain all test cases that require
the system to be powered ON.
- Power Off Test Cases : Contain all test cases that require
the system to be powered Off.
Tested:
- Successfully ran this from gui/gui_test
Change-Id: I1e13cc69add5ba35622e08f3f25f65bce053cee8
Signed-off-by: rramyasr in <rramyasr@in.ibm.com>
diff --git a/gui/gui_test/logs_and_services_menu/test_progress_logs_sub_menu.robot b/gui/gui_test/logs_and_services_menu/test_progress_logs_sub_menu.robot
index 541193e..b39dd56 100644
--- a/gui/gui_test/logs_and_services_menu/test_progress_logs_sub_menu.robot
+++ b/gui/gui_test/logs_and_services_menu/test_progress_logs_sub_menu.robot
@@ -51,7 +51,7 @@
[Tags] Verify_Existence_Of_All_Fields_In_Progress_Logs_Page
[Template] Page Should Contain
- # Expected parameters
+ # Expected parameters.
Created
Time stamp offset
Boot count
diff --git a/gui/gui_test/operations_menu/test_firmware_sub_menu.robot b/gui/gui_test/operations_menu/test_firmware_sub_menu.robot
index 1ed65b7..97ae993 100644
--- a/gui/gui_test/operations_menu/test_firmware_sub_menu.robot
+++ b/gui/gui_test/operations_menu/test_firmware_sub_menu.robot
@@ -34,6 +34,8 @@
Page Should Contain Access key expiration
+*** Power Off Test Cases ***
+
Verify Existence Of All Buttons In Firmware Page At Host Power Off
[Documentation] Verify existence of all buttons in firmware page at host power off.
[Tags] Verify_Existence_Of_All_Buttons_In_Firmware_Page_At_Host_Power_Off
@@ -57,6 +59,8 @@
Element Should Be Visible ${xpath_switch_to_running}
+*** Power On Test Cases ***
+
Verify Existence Of All Sub Sections Under BMC And Server Section At Power On State
[Documentation] Verify existence of all sub sections under BMC and server section at power on state.
[Tags] Verify_Existence_Of_All_Sub_Sections_Under_BMC_And_Server_Section_At_Power_On_State
diff --git a/gui/gui_test/operations_menu/test_reboot_bmc_sub_menu.robot b/gui/gui_test/operations_menu/test_reboot_bmc_sub_menu.robot
index 2a8b765..b828dbd 100644
--- a/gui/gui_test/operations_menu/test_reboot_bmc_sub_menu.robot
+++ b/gui/gui_test/operations_menu/test_reboot_bmc_sub_menu.robot
@@ -73,6 +73,8 @@
Wait Until Element Is Visible ${xpath_reboot_bmc_button} timeout=10
+*** Power On Test Cases ***
+
Verify Reboot BMC Page With Readonly User When Host On State
[Documentation] Verify Reboot BMC page with readonly user when Host On state.
[Tags] Verify_Reboot_BMC_Page_With_Readonly_User_When_Host_On_State
@@ -89,6 +91,8 @@
Verify Error And Unauthorized Message On GUI
+*** Power Off Test Cases ***
+
Verify Reboot BMC Page With Readonly User When Host Off State
[Documentation] Verify Reboot BMC page with readonly user when Host Off state.
[Tags] Verify_Reboot_BMC_Page_With_Readonly_User_When_Host_Off_State
diff --git a/gui/gui_test/operations_menu/test_server_power_operations_sub_menu.robot b/gui/gui_test/operations_menu/test_server_power_operations_sub_menu.robot
index 4bd634e..ba459de 100644
--- a/gui/gui_test/operations_menu/test_server_power_operations_sub_menu.robot
+++ b/gui/gui_test/operations_menu/test_server_power_operations_sub_menu.robot
@@ -36,6 +36,40 @@
Page Should Contain Element ${xpath_server_power_heading}
+Verify Existence Of All Sections In Server Power Operations Page
+ [Documentation] Verify existence of all sections in Server Power Operations page.
+ [Tags] Verify_Existence_Of_All_Sections_In_Server_Power_Operations_Page
+
+ # Added a delay for the page to load boot settings section.
+ Wait Until Page Contains Server power operations timeout=5
+ Page Should Contain Current status
+ Page Should Contain Operations
+ Page Should Contain Settings
+
+
+Verify Existence Of All Input Boxes In Host Os Boot Settings
+ [Documentation] Verify existence of all input boxes in host os boot settings.
+ [Tags] Verify_Existence_Of_All_Input_Boxes_In_Host_Os_Boot_Settings
+
+ # Added a delay for the page to load boot settings section.
+ Wait Until Page Contains Boot settings timeout=5
+ Page Should Contain Element ${xpath_enable_onetime_boot_checkbox}
+ Page Should Contain Element ${xpath_boot_option_select}
+
+
+Verify Save Button With Readonly User
+ [Documentation] Verify Save button On Server Power Operation page with readonly user.
+ [Tags] Verify_Save_Button_With_Readonly_User
+ [Setup] Run Keywords Create Readonly User And Login To GUI
+ ... AND Navigate to Server Power Operation Page
+ [Teardown] Delete Readonly User And Logout Current GUI Session
+
+ Click Element ${xpath_save_button}
+ Verify Error And Unauthorized Message On GUI
+
+
+*** Power On Test Cases ***
+
Verify Immediate Shutdown
[Documentation] Verify shutdown after clicking immediate shutdown button.
[Tags] Verify_Immediate_Shutdown
@@ -62,36 +96,6 @@
Wait Until Keyword Succeeds 10 min 15 sec Element Should Contain ${xpath_current_power_state} Off
-Verify Existence Of All Sections In Server Power Operations Page
- [Documentation] Verify existence of all sections in Server Power Operations page.
- [Tags] Verify_Existence_Of_All_Sections_In_Server_Power_Operations_Page
-
- # Added a delay for the page to load boot settings section.
- Wait Until Page Contains Server power operations timeout=5
- Page Should Contain Current status
- Page Should Contain Operations
- Page Should Contain Settings
-
-
-Verify Existence Of All Input Boxes In Host Os Boot Settings
- [Documentation] Verify existence of all input boxes in host os boot settings.
- [Tags] Verify_Existence_Of_All_Input_Boxes_In_Host_Os_Boot_Settings
-
- # Added a delay for the page to load boot settings section.
- Wait Until Page Contains Boot settings timeout=5
- Page Should Contain Element ${xpath_enable_onetime_boot_checkbox}
- Page Should Contain Element ${xpath_boot_option_select}
-
-
-Verify System State At Power Off
- [Documentation] Verify state of the system in power off state.
- [Tags] Verify_System_State_At_Power_Off
-
- Redfish Power Off stack_mode=skip
- Page Should Contain Element ${xpath_current_power_state}
- Element Should Contain ${xpath_current_power_state} Off
-
-
Verify System State At Power On
[Documentation] Verify state of the system in power on state.
[Tags] Verify_System_State_At_Power_On
@@ -101,15 +105,6 @@
Wait Until Keyword Succeeds 15 sec 5 sec Element Should Contain ${xpath_current_power_state} On
-Verify PowerOn Button Should Present At Power Off
- [Documentation] Verify existence of poweron button at power off.
- [Tags] Verify_PowerOn_Button_Should_Present_At_Power_Off
-
- Redfish Power Off stack_mode=skip
- # TODO: Implement power off using GUI later.
- Page Should Contain Element ${xpath_poweron_button}
-
-
Verify Shutdown And Reboot Buttons Presence At Power On
[Documentation] Verify existence of shutdown and reboot buttons at power on.
[Tags] Verify_Shutdown_And_Reboot_Buttons_Presence_At_Power_On
@@ -120,7 +115,6 @@
Page Should Contain Element ${xpath_shutdown_button}
Page Should Contain Element ${xpath_reboot_button}
-
Verify Host Immediate Reboot
[Documentation] Verify host reboot after triggering immediate reboot.
[Tags] Verify_Host_Immediate_Reboot
@@ -169,7 +163,27 @@
Perform Server Operations With Readonly User ${xpath_shutdown_immediate_radio} ${xpath_shutdown_button}
-Verify Server Power Operations Page With Readonly User When Host Off State
+*** Power Off Test Cases ***
+
+Verify System State At Power Off
+ [Documentation] Verify state of the system in power off state.
+ [Tags] Verify_System_State_At_Power_Off
+
+ Redfish Power Off stack_mode=skip
+ Page Should Contain Element ${xpath_current_power_state}
+ Element Should Contain ${xpath_current_power_state} Off
+
+
+Verify PowerOn Button Should Present At Power Off
+ [Documentation] Verify existence of poweron button at power off.
+ [Tags] Verify_PowerOn_Button_Should_Present_At_Power_Off
+
+ Redfish Power Off stack_mode=skip
+ # TODO: Implement power off using GUI later.
+ Page Should Contain Element ${xpath_poweron_button}
+
+
+ Verify Server Power Operations Page With Readonly User When Host Off State
[Documentation] Verify Server Power Operations page with readonly user when Host Off state.
[Tags] Verify_Server_Power_Operations_Page_With_Readonly_User_When_Host_Off_State
[Setup] Run Keywords Power Off Server AND Create Readonly User And Login To GUI
@@ -184,17 +198,6 @@
Click Element ${xpath_unauthorized_popup}
-Verify Save Button With Readonly User
- [Documentation] Verify Save button On Server Power Operation page with readonly user.
- [Tags] Verify_Save_Button_With_Readonly_User
- [Setup] Run Keywords Create Readonly User And Login To GUI
- ... AND Navigate to Server Power Operation Page
- [Teardown] Delete Readonly User And Logout Current GUI Session
-
- Click Element ${xpath_save_button}
- Verify Error And Unauthorized Message On GUI
-
-
*** Keywords ***
Navigate to Server Power Operation Page
diff --git a/gui/gui_test/overview_menu/test_overview_menu.robot b/gui/gui_test/overview_menu/test_overview_menu.robot
index ef83af6..77b8dc2 100644
--- a/gui/gui_test/overview_menu/test_overview_menu.robot
+++ b/gui/gui_test/overview_menu/test_overview_menu.robot
@@ -191,15 +191,6 @@
Page Should Contain ${converted_date}
-Verify BMC Information At Host Power Off State
- [Documentation] Verify that BMC information is displayed at host power off state.
- [Tags] Verify_BMC_Information_At_Host_Power_Off_State
- [Setup] Run Keywords Power On Server AND Test Setup Execution
-
- ${firmware_version}= Redfish Get BMC Version
- Page Should Contain ${firmware_version}
-
-
Verify View More Button For Dumps
[Documentation] Verify view more button for dumps button in overview page.
[Tags] Verify_View_More_Button_For_Dumps
@@ -345,6 +336,17 @@
Verify Error And Unauthorized Message On GUI
+*** Power Off Test Cases ***
+
+ Verify BMC Information At Host Power Off State
+ [Documentation] Verify that BMC information is displayed at host power off state.
+ [Tags] Verify_BMC_Information_At_Host_Power_Off_State
+ [Setup] Run Keywords Power On Server AND Test Setup Execution
+
+ ${firmware_version}= Redfish Get BMC Version
+ Page Should Contain ${firmware_version}
+
+
*** Keywords ***
Test Setup Execution
@@ -358,16 +360,17 @@
Verify Identify LED State Via Redfish
[Documentation] Verify that Redfish identify LED system with given state.
[Arguments] ${expected_state}
+
# Description of argument(s):
# expected_state Expected value of Identify LED.
${led_state}= Redfish.Get Attribute /redfish/v1/Systems/${SYSTEM_ID} IndicatorLED
Should Be True '${led_state}' == '${expected_state}'
-
Set IndicatorLED State
[Documentation] Perform redfish PATCH operation.
[Arguments] ${led_state} ${expect_resp_code}=[200, 204]
+
# Description of argument(s):
# led_state IndicatorLED state to "off", "Lit" etc.
# expect_resp_code Expected HTTPS response code. Default [200, 204]