def test_h5gosolu(self, url, solution): # logger.info("测试web解决方案页面") h5mainpage = H5MainPage() if h5mainpage.goto_H5solution(url, solution) == True: report_PASS('H5' + solution + '解决方案页面巡检通过') else: report_FAIL('H5' + solution + '解决方案页面巡检失败')
def test_weblogin(self): # logger.info("测试web登录页面") loginpage = LoginPage() if loginpage.gotologinpage() == True: report_PASS('web登录页面巡检通过') else: report_FAIL('web登录页面巡检失败')
def test_h5gopro(self, url, product): # logger.info("测试h5能力产品页面") h5mainpage = H5MainPage() if h5mainpage.goto_H5product(url, product) == True: report_PASS('H5' + product + '能力页面巡检通过') else: report_FAIL('H5' + product + '能力页面巡检失败')
def test_webgopro(self, product): # logger.info("测试web能力产品页面") mainpage = MainPage() if mainpage.gotoproduct(product) == True: report_PASS(product + '能力页面巡检通过') else: report_FAIL(product + '能力页面巡检失败')
def test_h5mainpage(self): # logger.info("测试web登录页面") h5mainpage = H5MainPage() if h5mainpage.gotoh5mainpage() == True: report_PASS('H5首页巡检通过') else: report_FAIL('H5首页巡检失败')
def test_h5login(self): # logger.info("测试web登录页面") h5loginpage = H5LoginPage() if h5loginpage.gotologinpage() == True: report_PASS('H5登录页面巡检通过') else: report_FAIL('H5登录页面巡检失败')
def test_webgosolu(self, solution): # logging.info("测试web解决方案页面") mainpage = MainPage() if mainpage.gotosolution(solution) == True: report_PASS(solution + '解决方案页面巡检通过') else: report_FAIL(solution + '解决方案页面巡检失败')
def test_order(self): order_api = Order_api() if order_api.order_api(): report_PASS("订单接口成功") else: report_FAIL("订单接口失败")
def test_add_mycart(self): mycart = Mycart_api() if mycart.mycart_api() == '1': report_PASS("加入购物车成功") else: report_FAIL("加入购物车失败")
def test_admin_solution(self): admin = Admin() if admin.edit_solution(): report_PASS('编辑解决方案接口成功') else: report_FAIL('编辑解决方案接口失败')
def test_bottom(self): mainapi = MainApi() if mainapi.get_bottom(): report_PASS('底部接口巡检通过') else: report_FAIL('底部接口巡检失败')
def test_solution(self): mainapi = MainApi() if mainapi.get_solution(): report_PASS('解决方案接口巡检通过') else: report_FAIL('解决方案接口巡检失败')
def test_productapi(self): mainapi = MainApi() if mainapi.get_product(): report_PASS('产品接口巡检通过') else: report_FAIL('产品接口巡检失败')
def test_webmainpage(self): mainpage = MainPage() if mainpage.mainpagecheck() == True: report_PASS('web首页巡检通过') else: report_FAIL('web首页巡检失败')