示例#1
0
class AccountCenter(unittest.TestCase):


    def setUp(self):
        self.commonActions=CommonActions()
        self.acActions=AcountCenterActions()
        self.driver=self.commonActions.login()


    def tearDown(self):
        self.driver.quit()


    def qtest_ac001(self):
        u"""账户中心-账户金额校验"""
        driver=self.driver
        data=self.acActions.checkUserInfo(driver)
        result=self.acActions.verifyUserInfo(driver, data)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()
        
    def qtest_ac002(self):
        u"""账户中心-添加银行卡"""
        driver=self.driver
        data=self.acActions.cardAdd(driver,13,3,13,4)
        
        driver.close()

    def test_ac003(self):
        u"""账户中心-添加银行卡"""
        driver=self.driver
        data=self.acActions.cardAdd(driver,14,3,14,4)
        
        driver.close()
示例#2
0
class ModifyInfoCases(unittest.TestCase):
    def setUp(self):
        self.commonActions = CommonActions()
        self.mdActions = ModifyInfo()
        self.driver = self.commonActions.login()

    def tearDown(self):
        self.driver.quit()

    def qtest_md001(self):
        driver = self.driver
        self.mdActions.modifyInfo(driver, 1, 4, 6, 1, 18, 1, 19, 1, 20, 1, 1,
                                  9, 1, 10)
        result = self.mdActions.verifyModifyInfo(driver)

        print result
        self.assertEqual(True, result,
                         u'修改个人信息:' + sys._getframe().f_code.co_name)
        time.sleep(20)
        driver.close()
示例#3
0
class advantageActions(unittest.TestCase):


    def setUp(self):
        self.commonActions=CommonActions()
        self.adActions=AdvantageActions()
        self.driver=self.commonActions.login()


    def tearDown(self):
        self.driver.quit()


    def qtest_adRecharge001(self):
        u"""优势话费充值"""
        driver=self.driver
        self.adActions.adRecharge(driver, 1, 0, 16, 5)
        result=self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()
        
    def qtest_adRecharge002(self):
        u"""优势话费充值"""
        driver=self.driver
        self.adActions.adRecharge(driver, 2, 0, 17, 5)
        result=self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()

    def qtest_adRecharge003(self):
        u"""优势话费充值"""
        driver=self.driver
        self.adActions.adRecharge(driver, 3, 0, 18, 5)
        result=self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()
        
    def qtest_adRecharge004(self):
        u"""优势话费充值"""
        driver=self.driver
        self.adActions.adRecharge(driver, 4, 0, 19, 5)
        result=self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()

    def qtest_adRecharge005(self):
        u"""优势话费充值"""
        driver=self.driver
        self.adActions.adRecharge(driver, 5, 0, 20, 5)
        result=self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()
        
    def qtest_adRecharge006(self):
        u"""优势话费充值"""
        driver=self.driver
        self.adActions.adRecharge(driver, 6, 0, 22, 5)
        result=self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()
        
    def qtest_adRecharge007(self):
        u"""优势话费充值"""
        driver=self.driver
        self.adActions.adRecharge(driver, 7, 0, 23, 5)
        result=self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()
        
    def qtest_adRecharge008(self):
        u"""优势话费充值-不是优势地区"""
        driver=self.driver
        info=self.adActions.disAdRecharge(driver, 8, 0)
        
        result=self.adActions.verifyDisAdRecharge(info)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()
        
    def qtest_adRecharge009(self):
        u"""优势话费充值-不是优势地区"""
        driver=self.driver
        info=self.adActions.disAdRecharge(driver, 9, 0)
        
        result=self.adActions.verifyAdRechargeErrorNum(info)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        driver.close()
示例#4
0
class MobilePhoneRecharge(unittest.TestCase):
    def setUp(self):

        self.actions=CommonActions()
        self.driver=self.actions.login()
        self.settIng=SetParameters()
        
    def qtest_mpRecharge001(self):
        u"""话费充值"""
        #18200583387充值10元
        driver=self.driver
        self.actions.mbRecharge(driver,6, 4, 16, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge002(self):
        u"""话费充值"""
        driver=self.driver
        #18200583387充值10元
        self.actions.mbRecharge(driver,7, 4, 17, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge003(self):
        u"""话费充值"""
        #18200583387充值10元
        driver=self.driver
        self.actions.mbRecharge(driver,8, 4, 18, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge004(self):
        u"""话费充值"""
        #18200583387充值10元
        driver=self.driver
        self.actions.mbRecharge(driver,8, 4, 19, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge005(self):
        u"""话费充值"""
        #18200583387充值10元
        driver=self.driver
        self.actions.mbRecharge(driver,9, 4, 20, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge006(self):
        u"""话费充值"""
        #18200583387充值10元
        driver=self.driver
        self.actions.mbRecharge(driver,10, 4, 21, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge007(self):
        u"""话费充值"""
        #18200583387充值10元
        driver=self.driver
        self.actions.mbRecharge(driver,11, 4, 22, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge008(self):
        u"""话费充值"""
        #18200583387充值10元
        driver=self.driver
        self.actions.mbRecharge(driver,12, 4, 23, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
    def qtest_mpRecharge009(self):
        u"""话费充值"""
        #18200583387省市检查
        driver=self.driver
        result=self.actions.rechargeProvinceCheck(driver,12, 4)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
    def qtest_mpRecharge010(self):
        u"""话费充值"""
        #18200583387省市检查
        driver=self.driver
        result=self.actions.rechargeProvinceCheck(driver,11, 4)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge011(self):
        u"""话费充值"""
        #18200583387省市检查
        driver=self.driver
        result=self.actions.rechargeProvinceCheck(driver,10, 4)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge012(self):
        u"""话费充值"""
        #18200583387省市检查
        driver=self.driver
        result=self.actions.rechargeProvinceCheck(driver,9, 4)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge013(self):
        u"""话费充值"""
        #18200583387省市检查
        driver=self.driver
        result=self.actions.rechargeProvinceCheck(driver,8, 4)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge014(self):
        u"""话费充值"""
        #18200583387省市检查
        driver=self.driver
        result=self.actions.rechargeProvinceCheck(driver,7, 4)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge015(self):
        u"""话费充值"""
        #18200583387省市检查
        driver=self.driver
        result=self.actions.rechargeProvinceCheck(driver,6, 4)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge016(self):
        u"""话费充值"""
        #18200583387余额查询
        driver=self.driver
        queryInfo=self.actions.balanceQuery(driver,6, 4)
        result=self.actions.varifybalanceQuery(queryInfo)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge017(self):
        u"""话费充值"""
        #电话号码位数不够
        driver=self.driver
        self.actions.mbRechargeError(driver,14, 4, 16, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge018(self):
        u"""话费充值"""
        #不是电话号码
        driver=self.driver
        self.actions.mbRechargeError(driver,15, 4, 16, 5)
        result=self.actions.verifyMbRechargeError(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
 
    def qtest_mpRecharge019(self):
        u"""话费充值"""
        #取消支付
        driver=self.driver
        number=self.actions.mbRechargeCancle(driver,16, 4, 16, 5)
        result=self.actions.verifymbRechargeCancle(driver,number)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def qtest_mpRecharge020(self):
        u"""话费充值"""
        #继续支付
        driver=self.driver
        self.actions.mbRechargeContinue(driver,16, 4, 16, 5)
        result=self.actions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    def test_mpRecharge023(self):
        u"""话费充值"""
        #订单取消
        driver=self.driver
        result=self.actions.mbRechargeCancleOrder(driver,17, 4, 16, 5)
        print result
        self.assertEqual(True, result, u'话费充值校验失败:'+sys._getframe().f_code.co_name)
        
        self.driver.close()
        
    
    def tearDown(self):
        self.driver.quit()
示例#5
0
class TeleRecharge(unittest.TestCase):
    def setUp(self):

        self.commonActions = CommonActions()
        self.teleActions = TeleActions()
        self.driver = self.commonActions.login()

    def qtest_teleRecharge001(self):
        u"""话费充值"""
        #18200583387充值10元
        driver = self.driver
        self.teleActions.teleRecharge(driver, 1, 0, 1, 1)
        result = self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge002(self):
        u"""话费充值"""
        #18200583387充值10元
        driver = self.driver
        self.teleActions.teleRecharge(driver, 2, 0, 2, 1)
        result = self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge003(self):
        u"""话费充值"""
        #18200583387充值10元
        driver = self.driver
        self.teleActions.teleRecharge(driver, 3, 0, 3, 1)
        result = self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge004(self):
        u"""话费充值"""
        #18200583387充值10元
        driver = self.driver
        self.teleActions.teleRecharge(driver, 4, 0, 4, 1)
        result = self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge005(self):
        u"""话费充值"""
        #省市检查
        driver = self.driver
        result = self.teleActions.teleRechargeProvinceCheck(driver, 7, 0, 7, 1)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge006(self):
        u"""话费充值"""
        #省市检查
        driver = self.driver
        result = self.teleActions.teleRechargeProvinceCheck(driver, 8, 0, 8, 1)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge007(self):
        u"""话费充值"""
        #核对号码
        driver = self.driver
        result = self.teleActions.teleRechargeNumCheck(driver, 9, 0, 9, 1)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge008(self):
        u"""话费充值"""
        #取消支付
        driver = self.driver
        area_num = self.teleActions.cancleRecharge(driver, 5, 0, 5, 1)
        result = self.teleActions.verifyCancleRecharge(driver, area_num)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge009(self):
        u"""话费充值"""
        #继续支付
        driver = self.driver
        self.teleActions.continueRecharge(driver, 6, 0, 6, 1)
        result = self.commonActions.verifyMbRecharge(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge010(self):
        u"""话费充值"""
        #不支持该类号码
        driver = self.driver
        self.teleActions.teleRechargeError(driver, 10, 0, 10, 1)
        result = self.teleActions.verifyTeleRechargeNotSupport(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge011(self):
        u"""话费充值"""
        #号码异常
        driver = self.driver
        self.teleActions.teleRechargeError(driver, 11, 0, 11, 1)
        result = self.teleActions.verifyTeleRechargeError(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge012(self):
        u"""话费充值"""
        #号码异常
        driver = self.driver
        self.teleActions.teleRechargeError(driver, 12, 0, 12, 1)
        result = self.teleActions.verifyTeleRechargeError(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge013(self):
        u"""话费充值"""
        #号码异常
        driver = self.driver
        self.teleActions.teleRechargeError(driver, 13, 0, 13, 1)
        result = self.teleActions.verifyTeleRechargeError(driver)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge014(self):
        u"""话费充值"""
        #进货价验证
        driver = self.driver
        result = self.teleActions.teleRechargePriceCheck(
            driver, 14, 0, 14, 1, 5, 8)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge015(self):
        u"""话费充值"""
        #进货价验证
        driver = self.driver
        result = self.teleActions.teleRechargePriceCheck(
            driver, 15, 0, 15, 1, 6, 8)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge016(self):
        u"""话费充值"""
        #进货价验证
        driver = self.driver
        result = self.teleActions.teleRechargePriceCheck(
            driver, 16, 0, 16, 1, 7, 8)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def qtest_teleRecharge017(self):
        u"""话费充值"""
        #进货价验证
        driver = self.driver
        result = self.teleActions.teleRechargePriceCheck(
            driver, 17, 0, 17, 1, 8, 8)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def test_teleRecharge018(self):
        u"""话费充值"""
        #订单取消
        driver = self.driver
        area_num = self.teleActions.cancleOrder(driver, 18, 0, 18, 1)
        result = self.teleActions.verifyCancleOrder(driver, area_num)
        print result
        self.assertEqual(True, result,
                         u'固话充值校验失败:' + sys._getframe().f_code.co_name)
        driver.close()

    def tearDown(self):
        self.driver.quit()