01 2020 档案
python自动化:微信小程序
摘要:1. 确保手机已与电脑连接 2. 开启微信debug模式 在微信聊天界面输入:debugx5.qq.com,勾选"打开TBS内核Inspector调试功能” 3. 查看微信里面webview版本 在电脑chrome浏览器输入:chrome://inspect/#devices,再打开微信的公众号页面 阅读全文
posted @ 2020-01-16 20:59 badbadboy 阅读(2217) 评论(0) 推荐(0)
python自动化:微信公众号
摘要:1. 确保手机已与电脑连接 2. 开启微信debug模式 在微信聊天界面输入:debugx5.qq.com,勾选"打开TBS内核Inspector调试功能” 3. 查看微信里面webview版本 在电脑chrome浏览器输入:chrome://inspect/#devices,再打开微信的公众号页面 阅读全文
posted @ 2020-01-16 19:37 badbadboy 阅读(1598) 评论(0) 推荐(0)
locust的使用
摘要:一、简介 locust是一款易于使用的分布式用户负载测试工具。它用于对网站(或其他系统)进行负载测试,并确定系统可以处理多少并发用户。 二、安装 pip install locustio==0.11.0 (python3.7安装最新版的locust可能会报错,无法正常安装,所以需要指定版本安装) 三 阅读全文
posted @ 2020-01-14 20:11 badbadboy 阅读(882) 评论(0) 推荐(0)
数据查询语句
摘要:一、数据查询语句:DQL 作用:查询 二、DQL #基本查询(可不加where 条件) select * from 表名 where 条件; select 列1,列2 from 表名 where 条件; #过滤掉重复列 select distinct 列1 from 表名; #合并为一行 selec 阅读全文
posted @ 2020-01-13 20:17 badbadboy 阅读(269) 评论(0) 推荐(0)
数据操作语句
摘要:一、数据操作语句:DML 作用:对表中数据的增、删、改 二、DML #插入数据(列和值要一一对应) insert into 表名(列1,列2,列3) values('列值1','列值2','列值3'); inser into 表名 values('列值1','列值2','列值3'),('列值1',' 阅读全文
posted @ 2020-01-13 19:38 badbadboy 阅读(241) 评论(0) 推荐(0)
数据定义语句
摘要:一、数据库的完整性约束 1. 主键:primary key 2. 外键:foreign key 3. 非空:not null 4. 检查:enum/set 5. 默认值:default 6. 唯一:unique 7. 自增长:auto_increment 二、数据库的三大范式 1. 确保每列保持原子 阅读全文
posted @ 2020-01-12 19:47 badbadboy 阅读(1447) 评论(0) 推荐(0)
linux的常用命令
摘要:动态实时查看后端日志:tail -f xx 查看端口号是否被占用:netstat -anp | grep 端口号 启动tomcat:sh startup.sh 关闭tomcat:sh shutdown.sh 查看xx的进程:ps -ef | grep xx 强制关闭xx的进程:kill -9 xx 阅读全文
posted @ 2020-01-12 12:53 badbadboy 阅读(186) 评论(0) 推荐(0)
python的多线程
摘要:实现代码如下: #多线程 import threading import time class test: def test1(self,a): for i in range(3): print(a) time.sleep(2) def test2(self,b): for i in range(5 阅读全文
posted @ 2020-01-11 21:10 badbadboy 阅读(160) 评论(0) 推荐(0)
python的多进程
摘要:实现代码如下: #多进程 import time import multiprocessing class test: def test1(self,a): for i in range(3): print(a) time.sleep(1) def test2(self,b): for i in r 阅读全文
posted @ 2020-01-11 20:14 badbadboy 阅读(189) 评论(0) 推荐(0)
python实现读写txt文件
摘要:一、读写模式: w:向文件中写入内容,w会清空原来文本内容 a:向文件中追加内容 r:从文件中读取内容 wb:以二进制形式写入内容。 rb:以二进制形式读文件内容 ab:以二进制形式追加内容 a+、r+、w+:混合形式,即可读可写 二、读 1. 方法一: f = open(文件路径,读模式) #将文 阅读全文
posted @ 2020-01-11 19:22 badbadboy 阅读(716) 评论(0) 推荐(0)
python的封包和解包
摘要:#封包 def as1(*a): print(a) as1(1,2,3) #解包 def as2(a): print(*a) as2([1,2,3]) 阅读全文
posted @ 2020-01-11 19:13 badbadboy 阅读(527) 评论(0) 推荐(0)
python的time库常用的函数介绍
摘要:#time库 import time #线程推迟时间 time.sleep(3) #时间戳 print(time.time()) #返回日期、时间、星期 print(time.strftime('%Y/%m/%d %H:%M:%S %A')) #返回时间信息元祖 print(time.localti 阅读全文
posted @ 2020-01-11 19:05 badbadboy 阅读(565) 评论(0) 推荐(0)
pythonGUI自动化:selenium+unittest+ddt+内反射+htmltestrunner数据驱动框架
摘要:一、xc_case:存放测试用例脚本,xc_common:存放自动化测试脚本,xc_datas:存放测试数据和配置文件,xc_driven:存放浏览器驱动脚本,xc_report:存放生成的报 告,xc_tools:存放一些工具,get_main.py为执行程序 注:xc_common里的脚本为每个 阅读全文
posted @ 2020-01-09 21:11 badbadboy 阅读(551) 评论(0) 推荐(0)
python的参数传递方式
摘要:#参数传递方式 a=1 b=22 #第一种 print(f'{a}hello{b}') #第二种 #整数:%d 小数:%f 字符串:%s print('%dhello%d'%(a,b)) 阅读全文
posted @ 2020-01-09 19:22 badbadboy 阅读(179) 评论(0) 推荐(0)
python的数据类型
摘要:1. 数字 #整型 print(int(3.41)) #浮点型 print(float(3)) #复数 print(complex(2,3)) #四舍五入为整数 print(round(3.45)) 2. 字符串 #字符串str a=' asaDf ' #转为字符串 b=12345 print(st 阅读全文
posted @ 2020-01-09 19:20 badbadboy 阅读(218) 评论(0) 推荐(0)
正则表达式
摘要:推荐:https://any86.github.io/any-rule/ 一、基本语法 1、[] [abc] 查找方括号之间的任何字符 [^abc] 查找任何不在方括号之间的字符 [0-9] 查找任何从0-9的数字 [A-z] 查找任何从大写A到小写z的字符 2、元字符 . 查找单个字符,除换行符 阅读全文
posted @ 2020-01-09 13:07 badbadboy 阅读(174) 评论(0) 推荐(0)
pythonGUI自动化:常见问题
摘要:1. html的class属性,class="light-chip alternate-fakebox show-fakebox-icon"的中间存在空格,表示有三个属性名称,定位时选取一个就好,不然无法定位到 阅读全文
posted @ 2020-01-08 20:44 badbadboy 阅读(303) 评论(0) 推荐(0)
pythonGUI自动化:绕过验证码登录
摘要:1. 获取cookies 实现代码如下: import time from selenium import webdriver class cookies_login: wd=webdriver.Chrome() def getCookies(self): wd=self.wd wd.maximiz 阅读全文
posted @ 2020-01-08 19:48 badbadboy 阅读(509) 评论(0) 推荐(0)
博客推荐
摘要:博客推荐: https://www.cnblogs.com/ailiailan/tag/ https://www.jianshu.com/u/fa34032097b5 https://www.cnblogs.com/yoyoketang/tag/ https://www.cnblogs.com/im 阅读全文
posted @ 2020-01-07 20:39 badbadboy 阅读(179) 评论(0) 推荐(0)
python自动化:获取apk的packagename和activity
摘要:实现代码如下: # 找出packagename和activity import os import re class packagename_activity: def get_packagename(self, path): aapt = [] os.system(f'aapt dump badg 阅读全文
posted @ 2020-01-07 20:04 badbadboy 阅读(488) 评论(0) 推荐(0)
python自动化:获取设备编号
摘要:实现代码如下: #遍历设备编号 import os class devices: def get_devices(self): lists=(os.popen('adb devices').read()) devices=(lists.strip().split('\n')) devices_lis 阅读全文
posted @ 2020-01-07 19:59 badbadboy 阅读(793) 评论(0) 推荐(0)
python自动化:appium中获取toast
摘要:实现代码如下: from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC class toast: def is_t 阅读全文
posted @ 2020-01-07 19:50 badbadboy 阅读(284) 评论(0) 推荐(0)
pythonGUI自动化:grid兼容性测试
摘要:推荐博文:https://blog.csdn.net/zb455405775/article/details/80652842 阅读全文
posted @ 2020-01-05 20:30 badbadboy 阅读(260) 评论(0) 推荐(0)
pythonGUI自动化:selenium定位元素方式
摘要:单个元素 1. 通过id定位:wd.find_element_by_id() 2. 通过name定位:wd.find_element_by_name() 3. 通过class定位:wd.find_element_by_class_name() 4. 通过tag定位:wd.find_element_b 阅读全文
posted @ 2020-01-05 20:04 badbadboy 阅读(435) 评论(0) 推荐(0)
pythonGUI自动化:selenium常用的操作
摘要:1. 实现代码如下: from selenium import webdriver import time #谷歌浏览器 wd=webdriver.Chrome() #火狐浏览器 #wd=webdriver.Firefox() #IE浏览器 #wd=webdriver.Ie() #窗口最大化 wd. 阅读全文
posted @ 2020-01-05 13:35 badbadboy 阅读(472) 评论(0) 推荐(0)
pythonGUI自动化:selenium环境的搭建
摘要:1. python中安装好selenium包 pip install selenium 2. 查看chrome、firefox、ie的版本 3. 根据浏览器的版本下载对应的driverserver chrome:http://npm.taobao.org/mirrors/chromedriver/ 阅读全文
posted @ 2020-01-04 19:44 badbadboy 阅读(327) 评论(0) 推荐(0)
pythonGUI自动化:uiautomation的常见使用
摘要:一、在web系统GUI自动化测试中,可以用uiautomation进行辅助 二、程序窗口:WindowControl() 按钮:ButtonControl() 文件显示:TextControl() 输入框:EditControl() 三、一般定位的属性有:ClassName、Name、Process 阅读全文
posted @ 2020-01-04 19:30 badbadboy 阅读(16819) 评论(0) 推荐(1)
自动化测试适用场景和难点
摘要:一、适用场景 1. 项目周期够长 2. 需求不再频繁变动 3. 代码复用性高 二、难点 1. 技术要求 2. 稳定的界面或接口 3. 质量意识 4. 通过手工测试熟悉整个系统 阅读全文
posted @ 2020-01-04 12:23 badbadboy 阅读(3458) 评论(0) 推荐(0)
软件测试理论
摘要:一、软件质量模型 1、功能性:功能是否满足用户需求 2、易用性:是否好用 3、可靠性:在指定条件下,软件是否正常运行 4、效率:性能好不好 5、维护性:软件可被修改的能力 6、可移植性:在不同软硬件环境下的适应能力 二、应用: 1、产品型软件:针对大众的软件 形成文档:PRD (产品需求文档) 2、 阅读全文
posted @ 2020-01-02 20:05 badbadboy 阅读(522) 评论(0) 推荐(0)
软件测试理论中的注意事项
摘要:1. 怎么让测试覆盖率更加全面 1. 从测试点横向测试 2. 从测试类型纵向测试 阅读全文
posted @ 2020-01-02 19:31 badbadboy 阅读(232) 评论(0) 推荐(0)
python自动化:monkey测试的云测
摘要:该代码还存在优化的地方,后续优化方向:结合unittest、ddt、内反射搭建自动化测试框架 实现代码如下: import os import threading from xctest_app.xc_tools.get_aapt import * from xctest_app.xc_tools. 阅读全文
posted @ 2020-01-02 13:37 badbadboy 阅读(626) 评论(0) 推荐(0)
python自动化:通过uiautomator2实现云测
摘要:该代码还存在优化的地方,后续优化方向:结合unittest、ddt、内反射搭建自动化测试框架 实现代码如下: #通过u2实现云测 import threading import uiautomator2 as u2 import os,time from xctest_app.xc_tools.ge 阅读全文
posted @ 2020-01-02 13:28 badbadboy 阅读(436) 评论(0) 推荐(0)
python自动化:通过appium实现云测
摘要:该代码还存在优化的地方,后续优化方向:结合unittest、ddt、内反射搭建自动化测试框架 实现代码如下: #通过appium实现云测 import os import threading import time from appium import webdriver from xctest_a 阅读全文
posted @ 2020-01-02 13:26 badbadboy 阅读(491) 评论(0) 推荐(0)
uiautomator2介绍
摘要:一、安装 pip install uiautomator2 pip install pillow 安装移动代理服务(需要adb连接上手机): python -m uiautomator2 init 二、连接手机的方式 1. 根据地址连接:d=u2.connect(udid) 2. 根据usb连接:d 阅读全文
posted @ 2020-01-02 11:22 badbadboy 阅读(813) 评论(0) 推荐(0)