示例#1
0
# -*- 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 week_10.API_5.common.my_log import MyLog
from week_10.API_5.common.http_request import HttpRequest
from week_10.API_5.common.do_excel import DoExcel
from week_10.API_5.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  #全局变量
示例#2
0
 def setUp(self):  #测试之前的准备工作
     self.t = DoExcel(project_path.case_path, 'register')  #写入测试结果的对象
示例#3
0
 def setUp(self):  #测试之前的准备工作
     self.t = DoExcel(project_path.case_path, 'invest')  #写入测试结果的对象
示例#4
0
# -*- 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 week_10.API_5.common.my_log import MyLog
from week_10.API_5.common.http_request import HttpRequest
from week_10.API_5.common.do_excel import DoExcel
from week_10.API_5.common import project_path
from week_10.API_5.common.get_data import GetData

#测试充值
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)
    # @unpack
示例#5
0
# -*- 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 week_10.API_5.common.my_log import MyLog
from week_10.API_5.common.http_request import HttpRequest
from week_10.API_5.common.do_excel import DoExcel
from week_10.API_5.common import project_path
from week_10.API_5.common.get_data import GetData

#测试充值
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

    #写用例
    @data(*test_data)
    # @unpack
示例#6
0
 def setUp(self):#测试之前的准备工作
     self.t=DoExcel(project_path.case_path,'add_loan')#写入测试结果的对象
示例#7
0
# -*- 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 week_10.API_5.common.my_log import MyLog
from week_10.API_5.common.http_request import HttpRequest
from week_10.API_5.common.do_excel import DoExcel
from week_10.API_5.common import project_path
from week_10.API_5.common.get_data import GetData
from week_10.API_5.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