摘要: def convert_n_bytes(n, b): bits = b * 8 return (n + 2 ** (bits - 1)) % 2 ** bits - 2 ** (bits - 1) def convert_4_bytes(n): return convert_n_bytes(n, 4) def getHashCode(s): h = 0 ... 阅读全文
posted @ 2018-12-10 15:54 十年之光 阅读(91) 评论(0) 推荐(0) 编辑
摘要: global_cache.py # -*- codeding: utf-8 -*- import configparser import hashlib import os from common.base import ENV class globalInfo: def get_path(self): current_path = '' if os... 阅读全文
posted @ 2018-12-10 15:47 十年之光 阅读(167) 评论(0) 推荐(0) 编辑
摘要: import string import random import time import uuid class GenUtil: """ 生成测试数据。 """ __instance = None # 实例 def __new__(cls, *args, **kwargs): ''' 单实例 : 阅读全文
posted @ 2018-12-10 15:31 十年之光 阅读(308) 评论(0) 推荐(0) 编辑
摘要: base.pyimport os from common import fileUtil def __read_config(): base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) settings_file = os.path.join(os.path.join(os.path.rea... 阅读全文
posted @ 2018-12-10 15:14 十年之光 阅读(602) 评论(0) 推荐(0) 编辑
摘要: https://github.com/easonhan007/HTMLTestRunner/blob/master/BSTestRunner.py 下载BSTestRunner.py这个文件,然后扔到你觉得合适的地方,我当前是放在common文件夹(公共方法下) 在测试套件下导入BSTestRunn 阅读全文
posted @ 2018-12-10 15:10 十年之光 阅读(922) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/renpingsheng/p/7065565.html#1 阅读全文
posted @ 2018-12-10 14:53 十年之光 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 测试套件文件下的testcase import importlib import sys, time, unittest from gevent import os import os from common import file_util, BSTestRunner from testcases 阅读全文
posted @ 2018-12-10 14:40 十年之光 阅读(151) 评论(0) 推荐(0) 编辑