Exemple #1
0
"""
import sys

import pytest

from Common import Log
from Common import Shell
from Conf import Config

if __name__ == '__main__':
    conf = Config.Config()
    log = Log.MyLog()
    log.info('初始化配置文件, path=' + conf.conf_path)

    shell = Shell.Shell()
    xml_report_path = conf.xml_report_path
    html_report_path = conf.html_report_path

    # 定义测试集
    allure_list = '--allure_features=Home,Personal'

    args = ['-s', '-q', '--alluredir', xml_report_path, allure_list]
    log.info('执行用例集为:%s' % allure_list)
    self_args = sys.argv[1:]
    pytest.main(args)
    cmd = 'allure generate %s -o %s' % (xml_report_path, html_report_path)

    try:
        shell.invoke(cmd)
    except Exception:
Exemple #2
0
from Common.Shell import *

jar_path = 'E:/huangjing/TokenUtils.jar'
command = "java -jar " + jar_path + " " + "18637692102"

print(Shell().invoke(command))