# @Author : lemon_huahua # @Email : [email protected] # @File : test_cases.py import unittest from ddt import ddt, data from API_Program.Example.API_6.common import project_path from API_Program.Example.API_6.common.do_excel import DoExcel from API_Program.Example.API_6.common.do_mysql import DoMysql from API_Program.Example.API_6.common.get_data import GetData from API_Program.Example.API_6.common.http_request import HttpRequest from API_Program.Example.API_6.common.my_log import MyLog # 测试充值 test_data = DoExcel(project_path.case_path, 'invest').read_data('InvestCASE') # 获取测试数据 my_log = MyLog() # COOKIES=None#设置cookies的初始值为None @ddt class TestCases(unittest.TestCase): def setUp(self): # 测试之前的准备工作 self.t = DoExcel(project_path.case_path, 'invest') # 写入测试结果的对象 def tearDown(self): pass # 写用例 @data(*test_data)
def setUp(self): # 测试之前的准备工作 self.t = DoExcel(project_path.case_path, 'invest') # 写入测试结果的对象
def setUp(self): # 测试之前的准备工作 self.t = DoExcel(project_path.case_path, 'recharge') # 写入测试结果的对象
# @Author : lemon_huahua # @Email : [email protected] # @File : test_cases.py import unittest from ddt import ddt, data from API_Program.Example.API_6.common import project_path from API_Program.Example.API_6.common.do_excel import DoExcel from API_Program.Example.API_6.common.do_mysql import DoMysql from API_Program.Example.API_6.common.get_data import GetData from API_Program.Example.API_6.common.http_request import HttpRequest from API_Program.Example.API_6.common.my_log import MyLog # 测试充值 test_data = DoExcel(project_path.case_path, 'recharge').read_data('RechargeCASE') # 获取测试数据 my_log = MyLog() # COOKIES=None#设置cookies的初始值为None @ddt class TestCases(unittest.TestCase): def setUp(self): # 测试之前的准备工作 self.t = DoExcel(project_path.case_path, 'recharge') # 写入测试结果的对象 def tearDown(self): pass # 写用例
# -*- coding: utf-8 -*- # @Time : 2019/3/13 20:09 # @Author : lemon_huahua # @Email : [email protected] # @File : test_cases.py import unittest from ddt import ddt, data from API_Program.Example.API_6.common.my_log import MyLog from API_Program.Example.API_6.common.http_request import HttpRequest from API_Program.Example.API_6.common.do_excel import DoExcel from API_Program.Example.API_6.common import project_path #测试注册--传参 test_data = DoExcel(project_path.case_path, 'register').read_data('RegisterCASE') #获取测试数据 my_log = MyLog() @ddt class TestCases(unittest.TestCase): def setUp(self): #测试之前的准备工作 self.t = DoExcel(project_path.case_path, 'register') #写入测试结果的对象 def tearDown(self): pass #写用例 @data(*test_data) # @unpack def test_cases(self, case): global TestResult #全局变量
def setUp(self):#测试之前的准备工作 self.t=DoExcel(project_path.case_path,'add_loan')#写入测试结果的对象
# -*- coding: utf-8 -*- # @Time : 2019/3/13 20:09 # @Author : lemon_huahua # @Email : [email protected] # @File : test_cases.py import unittest from ddt import ddt,data from API_Program.Example.API_6.common.my_log import MyLog from API_Program.Example.API_6.common.http_request import HttpRequest from API_Program.Example.API_6.common.do_excel import DoExcel from API_Program.Example.API_6.common import project_path from API_Program.Example.API_6.common.get_data import GetData from API_Program.Example.API_6.common.do_mysql import DoMysql #测试充值 test_data=DoExcel(project_path.case_path,'add_loan').read_data('AddLoanCASE')#获取测试数据 my_log=MyLog() # COOKIES=None#设置cookies的初始值为None @ddt class TestCases(unittest.TestCase): def setUp(self):#测试之前的准备工作 self.t=DoExcel(project_path.case_path,'add_loan')#写入测试结果的对象 def tearDown(self): pass #写用例 @data(*test_data) # @unpack