摘要:
@classmethod def setUpClass(cls): print "start!" @classmethod def tearDownClass(cls): time.sleep(1) print "end!" 阅读全文
摘要:
# html报告文件路径 report_abspath = os.path.join(report_path, "result.html") fp = open(report_abspath, "wb") runner = HTMLTestRunner.HTMLTestRunner(stream=f 阅读全文
摘要:
# 用法 globals()["a"] = "用例a的返回结果" # 用例b引用 b = globals()["a"] print(b) import repostid = re.findall(r"postid=(.+?)&", r2.url)print postid # 这里是list# 提取为 阅读全文
摘要:
diascover加载测试用例 1.discover方法里面有三个参数: -case_dir:这个是待执行用例的目录。 -pattern:这个是匹配脚本名称的规则,test*.py意思是匹配test开头的所有脚本。 -top_level_dir:这个是顶层目录的名称,一般默认等于None就行了。 2 阅读全文
摘要:
def test_01(self): '''前面输入账号密码,让正确运行到assert这一步,断言故意设置为False不成功''' try: self.driver.find_element_by_id("input1").send_keys(u"啊啊啊") self.driver.find_ele 阅读全文
摘要:
注册地址:https://github.com/ 创建一个repository name,输入框随便取一个名字(不要用中文!!!) git是本地客户端管理代码的一个工具,下载地址:https://git-scm.com/download/win 安装完成后,本地随便建个文件夹,如github,在文件 阅读全文
摘要:
github地址https://github.com/openatx/weditor python -m weditor --shortcut adb devices 在页面上输入手机设备号,点Connet按钮,看到出现一个小草的图标,就是连接成功了 python -m weditor --shor 阅读全文
摘要:
安装:yum install -y httpd-tools 验证:ab -V ab -help:-n requests 要执行请求总数,默认会执行一个请求 -c concurrency 一次执行多个请求的数量,也就是并发数 -t timelimit 用于基准测试的最大秒数,使用它在固定的总时间内对服 阅读全文