Esempio n. 1
0
    def setUp(self):
        """

        :return:
        """
        self.log = MyLog.get_log()
        self.logger = self.log.get_logger()
Esempio n. 2
0
 def setUp(self):
     """
     :return:
     """
     self.log = MyLog.get_log()
     self.logger = self.log.get_logger()
     warnings.simplefilter("ignore", ResourceWarning)
Esempio n. 3
0
    def setUp(self):
        """

        :return:
        """
        self.log = MyLog.get_log()
        self.logger = self.log.get_logger()
        # login
        self.login_token = login_status.login()
Esempio n. 4
0
 def __init__(self):
     global scheme, host, port, timeout
     scheme = localReadConfig.get_http("scheme")
     port = localReadConfig.get_http("port")
     timeout = localReadConfig.get_http("timeout")
     self.log = Log.get_log()
     self.logger = self.log.get_logger()
     self.headers = {}
     self.params = {}
     self.data = {}
     self.url = None
     self.files = {}
     self.state = 0
Esempio n. 5
0
    def __init__(self):
        global log, logger, resultPath, on_off
        log = Log.get_log()
        logger = log.get_logger()
        resultPath = log.get_report_path()
        on_off = localReadConfig.get_email("on_off")
        self.caseListFile = os.path.join(readConfig.proDir, "caselist.txt")
        #accept file test
        self.caseFile = os.path.join(readConfig.proDir, "testCase")

        print(self.caseFile)

        # self.caseFile = None
        self.caseList = []
        self.email = MyEmail.get_email()
Esempio n. 6
0
    def __init__(self):
        global host, user, password, port, sender, title
        host = localReadConfig.get_email("mail_host")
        user = localReadConfig.get_email("mail_user")
        password = localReadConfig.get_email("mail_pass")
        port = localReadConfig.get_email("mail_port")
        sender = localReadConfig.get_email("sender")
        title = localReadConfig.get_email("subject")
        # content = localReadConfig.get_email("content")

        # get receiver list
        self.value = localReadConfig.get_email("receiver")
        self.receiver = []
        for n in str(self.value).split("/"):
            self.receiver.append(n)

        # defined email subject
        date = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
        self.subject = "接口测试报告" + " " + date

        self.log = MyLog.get_log()
        self.logger = self.log.get_logger()
        self.msg = MIMEMultipart('related')
Esempio n. 7
0
import xlrd
from xlutils3.copy import copy
import re

try:
    from xml.etree import ElementTree as ElementTree
except ImportError:
    from xml.etree import cElementTree as ElementTree
from commonsrc import configHttp as configHttp
from commonsrc.Log import MyLog as Log
import json

localReadConfig = readConfig.ReadConfig()
proDir = readConfig.proDir
localConfigHttp = configHttp.ConfigHttp()
log = Log.get_log()
logger = log.get_logger()

caseNo = 0


def get_visitor_token():
    """
    create a token for visitor
    :return:
    """

    host = localReadConfig.get_http("url")
    headers = {
        "Host": "www.mujin.assignee.com",
        "Connection": "keep-alive",
Esempio n. 8
0
 def __init__(self):
     self.log = Log.get_log()
     self.logger = self.log.get_logger()
     self.db = None
     self.cursor = None