def run_tihuoshenqingchaxun_data():
    path = cases_path.get('tihuoshenqingchaxun_data')
    dis = unittest.TestLoader()
    cases = dis.discover(path, pattern='*.py')

    now = datetime.now()
    report_file = open(report_every.format(
        report_name.get('tihuoshenqingchaxun_data')),
                       'w',
                       encoding='utf8')
    runner_tihuoshenqing_data = HTMLTestRunner(
        stream=report_file,
        title=report_name.get('tihuoshenqingchaxun_data'),
        description='配货项目测试报告')
    runner_tihuoshenqing_data.run(cases)
Esempio n. 2
0
def run_apply():

    path = cases_path.get('apply')
    dis = unittest.TestLoader()
    cases = dis.discover(path, pattern='*.py')

    now = datetime.now()
    report_file = open(report_every.format(report_name.get('apply')),
                       'w',
                       encoding='utf8')
    runner_buy_count = HTMLTestRunner(stream=report_file,
                                      title=report_name.get('apply'),
                                      description='配货项目测试报告')

    runner_buy_count.run(cases)
def run_fabu():
    path = cases_path.get('fabu')
    dis = unittest.TestLoader()
    cases = dis.discover(path, pattern='*.py')

    now = datetime.now()
    report_file = open(
        report_every.format(report_name.get('fabu_data')), 'w', encoding='utf8')
    runner_add = HTMLTestRunner(
        stream=report_file,
        title=report_name.get('fabu_data'),
        description='配货项目测试报告')

    fabu_304(user_fabu)

    runner_add.run(cases)
Esempio n. 4
0
def run_shenqingtihuo():

    path = cases_path.get('shenqingtihuo')

    dis = unittest.TestLoader()
    cases = dis.discover(path, pattern='*.py')  ##从指定的目录下,以.py结尾的文件中自动去寻找测试用例





    now = datetime.now()
    report_file = open(
        report_every.format(report_name.get('shenqingtihuo')), 'w', encoding='utf8')
    runner_shenqingtihuo = HTMLTestRunner(
        stream=report_file, title=report_name.get('shenqingtihuo'), description='配货项目测试报告')

    runner_shenqingtihuo.run(cases)