03 2020 档案
摘要:def setUp(self): """每条用例执行之前都会执行"""def tearDown(self): """每条用例执行之后都会执行"""@classmethoddef setUpClass(cls): """该测试用例类中,所有的用例执行之前,会执行"""@classmethoddef t
阅读全文
摘要:import pymysql # 第一步:连接到数据库 conn = pymysql.connect(host="xxx", port=xx, user="xxx", password="xxx", charset="utf8", cursorclass = pymysql.cursors.Dict
阅读全文
摘要:import java.text.DecimalFormat; double obj= 1.56 // #.#-1位, #.##-2位,#.###-3位 DecimalFormat df = new DecimalFormat("#.#"); String obj1= df.format(obj);
阅读全文
摘要:mysql: select * from 库名.表名 sqlserver: select * from 库名..表名 select * from 库名.dbo.表名 如有不对,望大家指正
阅读全文
摘要:现在使用的是豆瓣的镜像下载的pandas插件 pip3 install --index-url https://pypi.douban.com/simple pandas 国内的其他镜像源清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/阿里云 http:/
阅读全文
摘要:https://www.cnblogs.com/TaleG/p/9187170.html
阅读全文
摘要:01 request模块基本操作 # 导入requests模块 import requests # 准备请求相关数据 url = "https://api.tuhu.cn/Product/GetTireList" headers = { "content-type": "application/js
阅读全文
摘要:强迫症法宝 转载自:https://blog.csdn.net/xiemanr/article/details/72583718 默认情况下,PyCharm中如果有无法错误或者不符合PEP8规范代码下面会有波浪线,语法错误波浪线为红色(如下图的第10行),不符合PEP8规范为浅黄色波浪线(如下图的第
阅读全文
摘要:https://blog.csdn.net/github_38996697/article/details/88998626
阅读全文
摘要:pip install BeautifulReport HTMLTestRunnerNew不能用pip安装,下载HTMLTestRunnerNew.py文件放到python安装目录下 pip install openpyxl —— 处理excel数据 pip install pyyaml ——yam
阅读全文
摘要:转载自:https://www.cnblogs.com/a00ium/p/10324638.html varsvars 中的变量仅对当前线程组内可见,跨线程组则需要使用属性。 保存字符串变量读取变量值使用 vars.put(var, value) 函数,例如 vars.put("IS_OPEN",
阅读全文
摘要:1、点击Composer 2、将原请求拖入 3、修改请求参数 4、点击Execute重新请求 完成~
阅读全文
摘要:转载自:https://www.cnblogs.com/changshuo/p/6594833.html jmeter中变量的嵌套一般有两种方式 1,调用__V函数 { "phone": "${phone}", "xxId": "${__V(xxId_${counter})}" } 2,使用${__
阅读全文
摘要:01日志等级 import logging logging.debug("这是一条debug级别的日志") logging.info("这是一条info级别的日志") logging.warning("这是一条warning级别的日志") logging.error("这是一条error级别的日志"
阅读全文
摘要:安装命令: pip install openpyxl pip install ddt
阅读全文
摘要:定义测试用例类:用例类必须继承于unittest.TestCase定义测试用例:在测试用例类中,每一个以test开头的方法就是一条用例unittest中测试用例执行的顺序:根据方法名按ASCII码进行排序的。unittest中会自动根据用例方法执行的时候,是否出现断言异常,来评判用例执行是否通过。
阅读全文
摘要:""" 类定义: 关键字:class 语法: class 类名: # 类里面的代码 类名的命名规范:遵循标识符的命名规范,风格采用大驼峰命名法(每个单词的第一个字母大写) 通过类创建对象: 对象 = 类名() """ class Cat: pass class MyTestClass: pass #
阅读全文

浙公网安备 33010602011771号