예제 #1
0
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" % self.__class__.__name__)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.click_register_button()
             self.click_dialog_next_button()
             self.input_username(username)
             self.input_password(password)
             self.click_dialog_register_button()
             self.click_dialog_next_button()
             self.click_dialog_subscribe_button()
             self.click_my_subscriptions_tab()
             if self.get_my_subscriptions_table_row_count() >= 1:
                 logger.info("It's successful to auto subscribe: %s" % self.get_my_subscriptions_table_my_subscriptions())
             else:
                 raise FailException("Test Faild - Failed to register and auto subscribe via GUI!")
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" % case_name)
예제 #2
0
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 self.__class__.__name__)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.check_consumer_cert_files(exist=False)
             self.click_register_button()
             self.click_dialog_next_button()
             self.input_username(username)
             self.input_password(password)
             self.check_manual_attach_checkbox()
             self.click_dialog_register_button_without_autoattach()
             self.check_consumer_cert_files(exist=True)
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 self.__class__.__name__)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_and_autosubscribe_in_gui(username, password)
             servicelevel = RHSMConstants().get_constant("servicelevel")
             self.set_service_level(servicelevel)
             self.click_preferences_menu()
             if self.check_menu_enabled("system-preferences-dialog",
                                        servicelevel.lower() + "-menu"):
                 logger.info(
                     "It's successful to check service_level_should_shown_correctly."
                 )
             else:
                 raise FailException(
                     "Test Failed - Failed to check service_level_should_shown_correctly!"
                 )
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
예제 #4
0
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" % self.__class__.__name__)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_and_autosubscribe_in_gui(username, password)
             self.click_preferences_menu()
             for item in self.get_available_release():
                 self.click_menu("system-preferences-dialog", item.lower() + "-menu")
                 self.click_close_button()
                 self.click_preferences_menu()
                 if self.check_object_exist("system-preferences-dialog", item.lower() + "-menu"):
                     logger.info("It's successful to set release %s." % item.lower())
                 else:
                     raise FailException("Test Faild - Failed to set release %s." % item.lower())
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" % case_name)
예제 #5
0
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 self.__class__.__name__)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_in_gui(username, password)
             self.click_all_available_subscriptions_tab()
             if self.check_object_exist("main-window",
                                        "search-subscriptions-hint-label"):
                 logger.info(
                     "It's successful to check display_proper_message_for_click_Update"
                 )
             else:
                 raise FailException(
                     "Test Faild - Failed to check display_proper_message_for_click_Update"
                 )
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 self.__class__.__name__)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_in_gui(username, password)
             self.click_all_available_subscriptions_tab()
             self.click_filters_button()
             if self.verifycheck_checkbox(
                     "filter-options-window",
                     "match-system-checkbox") and self.verifycheck_checkbox(
                         "filter-options-window",
                         "do-not-overlap-checkbox"):
                 logger.info(
                     "It's successful to check two_filter_options_enabled_by_default"
                 )
             else:
                 raise FailException(
                     "Test Faild - Failed to check two_filter_options_enabled_by_default"
                 )
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 case_name)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_in_gui(username, password)
             productid = RHSMConstants().get_constant("productid")
             #                 self.click_my_installed_products_tab()
             #                 self.check_my_installed_products_and_details()
             #                 self.click_my_subscriptions_tab()
             #                 self.check_my_subscriptions_and_details()
             #                 for item in self.sub_listavailpools(productid):
             #                     if not self.check_content_in_all_subscription_table(item["SubscriptionName"]):
             #                         raise FailException("Test Faild - Failed to list %s in all-subscription-table" % item["SubscriptionName"])
             #                 if self.get_my_subscriptions_table_row_count() >= 1:
             #                     logger.info("It's successful to auto subscribe: %s" % self.get_my_subscriptions_table_my_subscriptions())
             #                 else:
             #                     raise FailException("Test Faild - Failed to register and auto subscribe via GUI!")
             raise FailException("Not completed yet ......")
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
예제 #8
0
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 case_name)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_and_autosubscribe_in_gui(username, password)
             productid = RHSMConstants().get_constant("productid")
             #                 self.click_my_installed_products_tab()
             #                 for item in self.sub_listinstalledpools():
             #                     if not self.check_content_in_my_installed_products_table(item["SubscriptionName"]):
             #                         raise FailException("Test Faild - Failed to list %s in all-subscription-table" % item["SubscriptionName"])
             self.click_my_subscriptions_tab()
             for item in self.sub_listconsumedpools():
                 if not self.check_content_in_my_subscriptions_table(
                         item["SubscriptionName"]):
                     raise FailException(
                         "Test Faild - Failed to list %s in my-subscription-table"
                         % item["SubscriptionName"])
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 case_name)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_in_gui(username, password)
             self.click_all_available_subscriptions_tab()
             self.click_update_button()
             # check sub_listavailpools are all shown in gui
             productid = RHSMConstants().get_constant("productid")
             for item in self.sub_listavailpools(productid):
                 print item
                 if not self.check_content_in_all_subscription_table(
                         item["SubscriptionName"]):
                     raise FailException(
                         "Test Faild - Failed to list %s in all-subscription-table"
                         % item["SubscriptionName"])
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
예제 #10
0
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 case_name)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_and_autosubscribe_in_gui(username, password)
             cert = self.generate_cert()
             self.sub_unregister()
             self.close_rhsm_gui()
             self.open_subscription_manager()
             self.click_register_button()
             self.click_dialog_next_button()
             self.input_username(username)
             self.input_password(password)
             self.click_dialog_register_button()
             self.click_dialog_cancle_button()
             self.click_import_cert_menu()
             self.click_type_file_name_button()
             self.input_location(cert)
             self.click_import_cert_button()
             if self.check_window_open(
                     "information-dialog") and self.check_object_exist(
                         "information-dialog", "import-cert-success-label"):
                 logger.info(
                     "It's successful to check prompt message displayed ")
             else:
                 raise FailException(
                     "Test Faild - Failed to check prompt message displayed"
                 )
             # check whether entitlement certificates generated and productid in them or not
             productid = RHSMConstants().get_constant["productid"]
             self.check_entitlement_cert()
             self.click_my_subscriptions_tab()
             if self.get_my_subscriptions_table_my_subscriptions(
             ) == productid:
                 logger.info(
                     "It's successful to check subscriptions under my_subscriptions tab"
                 )
             else:
                 raise FailException(
                     "Test Faild - Failed to check subscriptions under my_subscriptions tab"
                 )
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
    def test_run(self):
        case_name = self.__class__.__name__
        logger.info("========== Begin of Running Test Case %s ==========" %
                    self.__class__.__name__)
        try:
            try:
                username = RHSMConstants().get_constant("username")
                password = RHSMConstants().get_constant("password")
                self.open_subscription_manager()
                self.click_register_button()
                self.click_dialog_next_button()
                self.input_username(username)
                self.input_password(password)
                self.check_manual_attach_checkbox()
                self.click_dialog_register_button_without_autoattach()
                if self.check_object_exist("main-window",
                                           "auto-subscribe-button"):
                    logger.info(
                        "It's successful to check auto subscribe button exist")
                else:
                    raise FailException(
                        "Test Faild - Failed to check auto subscribe button exist"
                    )
                self.click_autoattach_button()
                self.click_unregister_menu()
                if self.check_object_status("main-window",
                                            "auto-subscribe-button",
                                            "VISIBLE") == 0:
                    logger.info(
                        "It's successful to check auto-subscribe-button is not visible"
                    )
                else:
                    raise FailException(
                        "Test Faild - Failed to check auto-subscribe-button is not visible"
                    )

                if self.check_object_status("main-window", "register-button",
                                            "VISIBLE") == 1:
                    logger.info(
                        "It's successful to check register-button is visible")
                else:
                    raise FailException(
                        "Test Faild - Failed to check register-button is visible"
                    )
                self.assert_(True, case_name)
            except Exception, e:
                logger.error("Test Failed - ERROR Message:" + str(e))
                self.assert_(False, case_name)
        finally:
            self.capture_image(case_name)
            self.restore_gui_environment()
            logger.info("========== End of Running Test Case: %s ==========" %
                        case_name)
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 self.__class__.__name__)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_and_autosubscribe_in_gui(username, password)
             self.click_my_subscriptions_tab()
             if self.get_my_subscriptions_table_row_count() >= 1:
                 logger.info(
                     "It's successful to auto subscribe: %s" %
                     self.get_my_subscriptions_table_my_subscriptions())
             else:
                 raise FailException(
                     "Test Faild - Failed to register and auto subscribe via GUI!"
                 )
             self.click_remove_subscriptions_button()
             self.check_window_exist("rhsm-notification-dialog")
             if self.check_object_exist("rhsm-notification-dialog",
                                        "rhsm-notification-dialog"):
                 logger.info(
                     "It's successful to check rhsm-notification-dialog exist"
                 )
             else:
                 raise FailException(
                     "Test Faild - Failed to check rhsm-notification-dialog exist"
                 )
             if self.get_my_subscriptions_table_row_count() == 0:
                 logger.info(
                     "It's successful to check unsubscribed product disappear from the table"
                 )
             else:
                 raise FailException(
                     "Test Faild - Failed to check unsubscribed product disappear from the table"
                 )
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
예제 #13
0
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" % case_name)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_in_gui(username, password)
             raise FailException("Not completed yet ......")
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" % case_name)
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" %
                 case_name)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_and_autosubscribe_in_gui(username, password)
             self.click_view_system_facts_menu()
             self.check_org_displayed_in_facts(username, password)
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" %
                     case_name)
 def test_run(self):
     case_name = self.__class__.__name__
     logger.info("========== Begin of Running Test Case %s ==========" % self.__class__.__name__)
     try:
         try:
             username = RHSMConstants().get_constant("username")
             password = RHSMConstants().get_constant("password")
             self.open_subscription_manager()
             self.register_and_autosubscribe_in_gui(username, password)
             servicelevel = RHSMConstants().get_constant("servicelevel")
             self.set_service_level(servicelevel)
             self.click_preferences_menu()
             if self.check_menu_enabled("system-preferences-dialog", servicelevel.lower() + "-menu"):
                 logger.info("It's successful to check service_level_should_shown_correctly.")
             else:
                 raise FailException("Test Failed - Failed to check service_level_should_shown_correctly!")
             self.assert_(True, case_name)
         except Exception, e:
             logger.error("Test Failed - ERROR Message:" + str(e))
             self.assert_(False, case_name)
     finally:
         self.capture_image(case_name)
         self.restore_gui_environment()
         logger.info("========== End of Running Test Case: %s ==========" % case_name)