随笔分类 -  自动化测试

摘要:#导入多线程模块:import threadingimport osimport requests # 发送请求import timefrom bs4 import BeautifulSoup # 解析文本#导入线程池执行器和进程池执行器:from concurrent.futures import 阅读全文
posted @ 2020-01-18 20:47 干it的小张 阅读(174) 评论(0) 推荐(0)
摘要:import osimport requests # 发送请求from bs4 import BeautifulSoup # 解析文本import reimport threadingbase_path = os.path.dirname(os.path.abspath(__file__))img_ 阅读全文
posted @ 2020-01-18 19:51 干it的小张 阅读(203) 评论(0) 推荐(0)
摘要:#导入多线程模块:import threadingimport osimport requests # 发送请求from bs4 import BeautifulSoup # 解析文本base_path = os.path.dirname(os.path.abspath(__file__))img_ 阅读全文
posted @ 2020-01-18 19:44 干it的小张 阅读(149) 评论(0) 推荐(0)
摘要:import osimport requests# 导入进程:from multiprocessing import Poolfrom bs4 import BeautifulSoup# 定义下载图片功能:def download_img(url, dirname=""): res = reques 阅读全文
posted @ 2020-01-18 18:28 干it的小张 阅读(147) 评论(0) 推荐(0)
摘要:1、脚本内容:# 导入模块:import os# 分别创建文件夹:os.makedirs("py_tests/scripts")os.makedirs("py_tests/scripts/test_case_dir1")os.makedirs("py_tests/report")os.makedir 阅读全文
posted @ 2020-01-18 16:19 干it的小张 阅读(473) 评论(0) 推荐(0)
摘要:快速入门 pytest是Python的单元测试框架,同自带的unittest框架类似,但pytest框架使用起来更简洁,效率更高。 pytest特点 入门简单易上手,文档支持较好。 支持单元测试和功能测试。 支持参数化。 可以跳过指定用例,或对某些预期失败的case标记成失败。 支持重复执行失败的c 阅读全文
posted @ 2020-01-18 15:16 干it的小张 阅读(752) 评论(0) 推荐(0)
摘要:前言 所有的从事软件生产的都要学习软件质量,包括软件分析人员、设计人员、开发人员、测试人员、维护人员。 在软件质量管理中,我们要主要学习软件质量的定义、软件质量管理体系、软件质量模型、软件质量活动。 其中,我们要着重关注软件质量模型部分。 质量与质量管理体系 质量就是就是把客户的质量要求转化为设计参 阅读全文
posted @ 2020-01-18 14:53 干it的小张 阅读(1199) 评论(0) 推荐(0)
摘要:1、可执行文件里面的代码:import osprint("计算1~20内的两数之和,包含1和20")def add(x,y): return int(x) + int(y)while True: try: num1 = input("请输入一个值或输入q退出:").strip() if num1.u 阅读全文
posted @ 2020-01-18 11:02 干it的小张 阅读(2408) 评论(0) 推荐(0)
摘要:测试方法的划分 一般的,从看不看代码来划分黑、白盒测试。看代码和内部接口称为白盒测试,否则是黑盒测试方法。 而从软件是否运行的角度来划分静态和动态测试。不运行代码是静态测试,反之就是动态测试。 那么从我们人来参与的角度来看人工测试和自动化测试的。 黑、白、灰盒测试 刚才说了,我们从看不看代码来划分黑 阅读全文
posted @ 2020-01-18 08:30 干it的小张 阅读(495) 评论(0) 推荐(0)
摘要:软件生命周期 那么,软件测试要经过一个什么样的过程呢,这就要从软件的生命周期开始说起了。软件生命周期又称为软件生存周期或系统开发生命周期,是软件的产生直到报废的生命周期。整个生命周期包括问题定义与规划、需求分析、系统设计、软件编程、软件测试、软件运维等阶段。 在周期内,我们无论是开发还是测试都依赖于 阅读全文
posted @ 2020-01-18 08:12 干it的小张 阅读(303) 评论(0) 推荐(0)
摘要:import os#导入发送请求模块:import requests#导入解析文本模块:from bs4 import BeautifulSoup#返回上一级目录:base_path = os.path.dirname(os.path.abspath(__file__))#路径和图片文件夹拼接:im 阅读全文
posted @ 2020-01-18 00:47 干it的小张 阅读(575) 评论(0) 推荐(0)
摘要:import osimport requestsfrom bs4 import BeautifulSoupbase_path = os.path.dirname(os.path.abspath(__file__))img1_path = os.path.join(base_path,"img1")r 阅读全文
posted @ 2020-01-17 21:46 干it的小张 阅读(247) 评论(0) 推荐(0)
摘要:import os#导入发送请求模块:import requests#导入解析文本模块:from bs4 import BeautifulSoup#返回上一级目录:base_path = os.path.dirname(os.path.abspath(__file__))#路径和图片文件夹拼接:im 阅读全文
posted @ 2020-01-17 21:44 干it的小张 阅读(837) 评论(0) 推荐(0)
摘要:import requests#伪造请求:h = { "user-agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/53 阅读全文
posted @ 2020-01-17 21:06 干it的小张 阅读(211) 评论(0) 推荐(0)
摘要:import requestsfrom fake_useragent import UserAgenth = { "user-agent": UserAgent().chrome}response = requests.get(url="https://www.zhihu.com/question/ 阅读全文
posted @ 2020-01-17 20:50 干it的小张 阅读(890) 评论(0) 推荐(0)
摘要:楔子 在爬虫中进行request请求,很多时候,都需要添加请求头,不然服务器会认为是非法的请求,从而拒绝你的访问。 import requests url = 'https://www.zhihu.com/question/315387406/answer/812734512' response = 阅读全文
posted @ 2020-01-17 20:26 干it的小张 阅读(225) 评论(0) 推荐(0)
摘要:import requestsh = { "user-agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"} 阅读全文
posted @ 2020-01-17 20:17 干it的小张 阅读(449) 评论(0) 推荐(0)
摘要:1、 网址:http://neeo.cc:6002/pinter/bank/page/login 2、 用户名:admin 密码:1234 3、 查看余额 4、 5、 不需要登录的代码和结果如下: p = {"userName":"admin"} response = requests.get(ur 阅读全文
posted @ 2020-01-17 19:13 干it的小张 阅读(688) 评论(0) 推荐(0)
摘要:import timeimport randomimport getpass# 处理图片from PIL import Imagefrom selenium import webdriverfrom selenium.webdriver.common.action_chains import Act 阅读全文
posted @ 2020-01-17 17:46 干it的小张 阅读(249) 评论(0) 推荐(0)
摘要:1、保存图片: import requestsurl = "http://dmimg.5054399.com/allimg/pkm/pk/22.jpg"response = requests.get(url = url)查看状态码: print(response.status_code)查看文本数据 阅读全文
posted @ 2020-01-17 00:26 干it的小张 阅读(508) 评论(0) 推荐(0)