- 博客(28)
- 资源 (1)
- 收藏
- 关注
原创 C语言printf占位符
整数类型占位符%d 或 %i:输出有符号十进制整数。%u:输出无符号十进制整数。%o:输出无符号八进制整数。%x:输出无符号十六进制整数(小写字母)。%X:输出无符号十六进制整数(大写字母)。%p:输出指针地址的十六进制表示。长整型占位符%ld:输出有符号长整型(long)十进制整数。%lu:输出无符号长整型(unsigned long)十进制整数。%lo:输出无符号长整型(unsigned long)八进制整数。%lx:输出无符号长整型(unsigned long)十六进制整数(小
2024-11-15 16:53:24
295
原创 mro、super学习
C对象初始化时调用super,在mro列表中进入A对象初始化,此时super(A,self).__init__()中self为C实例c,参考上述mro实现,返回B类,进行B对象的初始化,再进行Base初始化。
2023-05-24 16:49:06
84
原创 VMware虚拟机操作汇总
一、ubantu虚拟机安装1. 安装流程VMware Workstation Pro 16 安装 Ubuntu 20.04_青柠小苍兰的博客-优快云博客_vmware16pro安装ubuntuhttps://blog.youkuaiyun.com/qq_45642410/article/details/1137569502.VMware tools安装完美解决VMware Tools一直灰色 无法安装问题!从问题分析 到成功安装 !保姆级教学!!_假欢何曾低头的博客-优快云博客_vm虚拟机安装t..
2022-02-09 11:15:28
1736
3
原创 logging学习
一.logging.info()默认级别warninglogging.info("%s 我们是冠军 %s", "yes", "!!!")""" 输出:INFO:root:yes 我们是冠军 !!!"""二.组件:记录器、处理器、过滤器和格式器1.记录器loggerlogger = logging.getLogger(__name__) Logger.setLevel()指定记录器将处理的最低严重性日志消息,其中 debug 是最低内置严重性级别, critic.
2021-12-09 15:04:42
600
原创 pytest学习
官方文档:Full pytest documentation — pytest documentationhttps://docs.pytest.org/en/latest/contents.htmlplugin解读:https://github.com/potatoImp/pytestCodeParsinghttps://github.com/potatoImp/pytestCodeParsing一、运行方式命令行方式1.pytest -sv:-s打印用例中print内...
2021-11-18 11:41:30
1174
原创 shell脚本学习
shell太难了,只可意会。。。一、find . -name '*.txt' |xargs -I ^ sh -c "echo -ne "\n ^: "; grep main ^"find . -name '*.txt' |xargs -I ^ sh -c 'echo "\n ^: "; grep main ^'1.找到所有txt文件2.xargs -I替换字符串,xargs解析时被^替换,对于每个参数都执行次命令3.sh -c执行子shell4.打印换行,打印替换字符串.
2021-10-15 11:48:32
119
原创 汇编学习1——基础知识
知识小点:1.存储器不是内存,寄存器在cpu中2.cpu对存储器读写: a.存储单元地址(地址信息) b.器件的选择,读或写命令(控制信息) c.读或写数据(数据信息) d.计算机中连接cpu和其他芯片的导线称为总线,逻辑上分为:地址总线、数据总线、 控制总线3.存储单元从零开始顺序编号4.存储器分为随机存储器ram和只读存储器rom...
2021-07-26 11:36:13
86
原创 生成测试数据
#制定长度内生产随机数import randomimport stringimport csvdef get_ranstring(minlen,maxlen,pre,number): num=random.randint(minlen,maxlen) str='' for i in range(1,11): str=str+string.ascii_letters #''.join指已引号内为间隔符join后面的值 username=''..
2021-06-20 23:31:13
102
原创 页面自动化——框架
自动化测试框架:分层+po模式po模式:基础封装层BasePage,po页面对象层,TestCase测试用例层。再加上日志处理模块,ini文件读取模块,ddt数据qu
2021-06-02 23:20:14
331
2
原创 页面自动化——知识小点
1.驱动放在C:\Users\<当前用户名>\AppData\Local\Programs\Python\Python38 python安装路径下C:\Users\Administrator\AppData\Local\Programs\Python\Python38
2021-05-30 22:55:55
250
1
原创 安卓手机自动化测试——webview/h5切换
#打开手机app加载到h5页面,chrome浏览器搜索chrome://inspect/#devices,获取当前app驱动版本。返回的地址就是h5页面 #chromedriver和chrome版本对应https://blog.youkuaiyun.com/cz9025/article/details/70160273 #chromedriver驱动获取地址http://chromedriver.storage.googleapis.com/index.html #驱动存放地址\appium-chromedri.
2021-05-21 22:43:05
574
原创 安卓手机自动化测试_unittest业务场景测试
#装饰器#忽略warning提示#断言失败截图import timeimport warningsimport unittestfrom appium.webdriver.webdriver import WebDriverfrom selenium.webdriver.support.wait import WebDriverWaitfrom test import errorscreenclass TestSuite_ydflow(unittest.TestCase):
2021-05-19 23:57:38
200
原创 安卓手机自动化测试_新增note
#隐式等待、智能等待、重载父类、适应业务场景调用做的改动#父类from appium.webdriver.webdriver import WebDriverfrom selenium.webdriver.support.wait import WebDriverWaitclass yd_addnote: def __init__(self): self.caps={} self.caps['automationName']='UIAutomator2
2021-05-16 15:43:29
128
原创 安卓手机自动化测试_业务场景测试+失败用例截图
#失败用例截图 #获取空间内元素,返回一个列表 num=driver.find_elements_by_class_name('android.wdget.LinearLayout') if len(num)>0: print('bad') nowtime=time.strftime('%Y%m%d%H%M%S',time.localtime(time.time())) driver.get_
2021-05-16 15:36:29
152
原创 安卓手机自动化测试_app安装卸载
目的:实现安卓手机app安装卸载,并且兼容性测试#父类#注意点:类初始化、is_app_installed、remove_app、insall_app、is_enable、智能等待from appium.webdriver.webdriver import WebDriverimport timefrom selenium import webdriverfrom selenium.webdriver.support.wait import WebDriverWaitclass YD
2021-05-12 22:40:20
276
原创 安卓手机自动化测试
#########环境准备1.安装jdk+sdk2.安装appium(用node语言写的),安装node3.导入appium_Python_Client类库。appium做代理服务器4.手机模拟器genymotion或者真机连接电脑5.真机连接步骤数据线连接电脑,打开usb调试,打开调试授权(手机有驱动程序)##########找设备名adb devices#包名模块名获取,手机打开对应程序执行adb shell dumpsys activity activities |
2021-05-06 22:47:19
186
1
原创 pymysq连接数据库
#连接数据库import pymysql#打开数据库连接db=pymysql.connect(host="127.0.0.1",user='root',passwd='123456',database='jwmall',charset='utf8', port=3306)#使用cursor方法获取操作游标cursor=db.cursor()#使用execute方法执行sqlcursor.execute('select * from mmall_user')#使用fetchone方法获取
2021-05-04 23:04:27
94
原创 使用unittest框架接口测试
#os读取文件路径#token传递#htmltestrunner报告#unittest测试套import unittestimport requestsimport csvimport osfrom HTMLTestRunner import HTMLTestRunner#htmltestrunner.py文件下载:http://tungwaiyip.info/software/HTMLTestRunner.htmlclass test_updatauser_v3(unitt
2021-05-02 21:56:39
147
1
原创 unittest框架和执行方式
1.setUp、tearDown、self.assertIn和main方法执行#执行顺序以asc码顺序#依次执行当前文件对应测试类的所有测试方法class testregister(unittest.TestCase): #使用setUP初始化 def setUp(self): self.url = 'http://localhost:8080/jwshoplogin/user/register.do' self.userinfo = {'use
2021-04-27 23:22:51
198
原创 接口测试练习
1.使用csv文件读取url,data等参数2.使用csv打印接口测试结果报告import requestsimport csvclass workflow_frogetpassword_v6_test(): def userinterface_test(self,url,userinfo,expresult,interfacename): #定义字典数据,存储实际接口响应结果和测试结论 resultdata={} #发送请求获取响应
2021-04-25 00:18:33
918
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人