예제 #1
0
 def readresultpath(self):
     """
     获取html报告保存的文件夹路径
     :return:
     """
     path = self.iniconfig.get("RESULTPATH", "resultpath")
     return getfullpathmethod(path)
예제 #2
0
 def __init__(self):
     # 获取ini文件的完整路径
     inifile = getfullpathmethod(r'requesttesttools\config\filepath.ini')
     # 实例化读取ini文件的类
     self.iniconfig = configparser.ConfigParser()
     # 进行文件读取
     self.iniconfig.read(inifile, encoding='utf8')
예제 #3
0
 def readtestcasepath(self):
     """
     获取用例保存的文件夹路径
     :return:
     """
     path = self.iniconfig.get("TESTCASEPATH", "testcasepath")
     return getfullpathmethod(path)
예제 #4
0
 def readexcel(self):
     """
     读取excel完整路径
     :return:
     """
     path = self.iniconfig.get("EXCELPATH", "testtoolexcelpath")
     return getfullpathmethod(path)
예제 #5
0
 def readjson(self):
     """
     返回json文件的完整路径
     :return:
     """
     path = self.iniconfig.get("JSONPATH", "paramspath")
     print(path)
     return getfullpathmethod(path)
예제 #6
0
 def get_current_path(self, path):
     """通过传参,获取当前文件的完整的文件路径"""
     return getfullpathmethod(path)
예제 #7
0
 def readlogspath(self):
     path = self.iniconfig.get("LOGSPATH", "logspath")
     return getfullpathmethod(path)