摘要: from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_argument('--headles 阅读全文
posted @ 2020-09-08 17:24 程程111 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 引自:https://blog.csdn.net/lengdaochuqiao/article/details/88170522 1.下载最新版fiddler ,强烈建议在官网下载:https://www.telerik.com/download/fiddler 2. 正常傻瓜式安装,下一步,下一步 阅读全文
posted @ 2020-09-01 20:30 程程111 阅读(1476) 评论(0) 推荐(0) 编辑
摘要: import pytest ''' 运行方式 1. pytest -s test01.py 把print信息打印出来运行用例 2. 通过main运行 前置后置方法 1. 函数级 setup teardown 2. 类级别 setup_class teardown_class 插件 1. 生成测试报告 阅读全文
posted @ 2020-08-31 21:55 程程111 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 简单使用 import unittest class TestMethod(unittest.TestCase): @classmethod def setUpClass(cls) -> None: print("类之前执行") @classmethod def tearDownClass(cls) 阅读全文
posted @ 2020-08-24 21:08 程程111 阅读(84) 评论(0) 推荐(0) 编辑
摘要: # smtplib 用于邮件的发信动作 import smtplib from email.mime.text import MIMEText # email 用于构建邮件内容 from email.header import Header # 用于构建邮件头 # 发信方的信息:发信邮箱,QQ 邮箱 阅读全文
posted @ 2020-08-24 20:41 程程111 阅读(119) 评论(0) 推荐(0) 编辑
摘要: import paramiko from datetime import date, timedelta def set_time(hostname): ssh = paramiko.SSHClient() # 把要连接的机器添加到known_hosts文件中 ssh.set_missing_hos 阅读全文
posted @ 2020-08-21 15:36 程程111 阅读(552) 评论(0) 推荐(0) 编辑
摘要: 1.添加日志 import logging logging.debug('This is debug message') logging.info('This is info message') logging.warning('This is warning message') import lo 阅读全文
posted @ 2020-08-18 17:51 程程111 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 引自:https://blog.csdn.net/u011519550/article/details/89855122 设置路径:file——setting——tools——terminal——application settings——shell path 改为:"D:\Git\bin\sh.e 阅读全文
posted @ 2020-08-18 11:10 程程111 阅读(582) 评论(0) 推荐(0) 编辑
摘要: import pymysql.cursors # 连接数据库 connect = pymysql.Connect( host='localhost', port=3306, user='root', passwd='magicimage', db='student', charset='utf8' 阅读全文
posted @ 2020-08-18 10:12 程程111 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1.鼠标操作 导包:from selenium.webdriver.common.action_chains import ActionChains 1.context_click() 右击 2.double_click() 双击 3.drag_and_drop() 拖动 4.move_to_ele 阅读全文
posted @ 2020-08-17 21:25 程程111 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1.定位方式 1.id driver.find_element_by_id('username').send_keys('byhy') 2.name driver.find_element_by_name('username').send_keys('byhy') 3.class_name driv 阅读全文
posted @ 2020-08-17 20:16 程程111 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1.数据 1.Csv login.csv文件: byhy,88888888 ReadCsv.py文件 import csv #导入csv包 class ReadCsv(): def csv(self): path = r'C:\Users\ADMIN\Desktop\自动化测试学习\hello\da 阅读全文
posted @ 2020-08-17 16:28 程程111 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 功能 1.web自动化测试 2.接口测试 3.压力测试 4.性能测试 5.通过jdbc进行数据库测试 6.java测试 优缺点 优点 1.开源,可扩展性好 2.GUI界面,小巧灵活 3.100% java,可移植行好 4.支持多线程,单线程 5.支持脚本取样器 缺点 1.不支持ip欺骗 2.单独使用 阅读全文
posted @ 2020-08-13 22:11 程程111 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 接口:url、请求方式、返回值(响应、页面、状态吗) 接口文档:url、请求方式、参数、返回值、状态码、错误状态码的含义 请求方式 get 获取 post 新增,更新 put 修改 delete 删除 面试讲解 1、如何理解接口 前端和后台传输数据的桥梁 2.接口测试和功能测试的区别 3.常见的接口 阅读全文
posted @ 2020-08-13 21:34 程程111 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 框架 步骤 先建立images,reports,tools文件夹 把HTMLTestRunner.py放进tools中 文件内容 https://www.cnblogs.com/wangxue1314/p/13493267.html 建立testcase文件,内容如下 import unittest 阅读全文
posted @ 2020-08-13 21:08 程程111 阅读(171) 评论(0) 推荐(0) 编辑
摘要: #导入HTMLTestRunner类 from unitTest.tools1.HTMLTestRunner import HTMLTestRunner import unittest discover = unittest.defaultTestLoader.discover("./cases", 阅读全文
posted @ 2020-08-13 11:54 程程111 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 功能 1.能组织多个用例去执行 2.提供丰富的断言方法 3.提供丰富的日志与测试结果 核心要素 1.TestCase 2.TestSuite 3.TextTestRunner 4.Fixture 用法 1.TestCase import unittest ''' 类,方法必须以test开头 ''' 阅读全文
posted @ 2020-08-13 11:43 程程111 阅读(180) 评论(0) 推荐(0) 编辑
摘要: """ A TestRunner for use with the Python unit testing framework. It generates a HTML report to show the result at a glance. The simplest way to use th 阅读全文
posted @ 2020-08-12 21:58 程程111 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 冒泡拍序 def bubble_sort(nums): for i in range(len(nums) - 1): for j in range(len(nums) - i - 1): if nums[j] > nums[j + 1]: nums[j], nums[j + 1] = nums[j 阅读全文
posted @ 2020-08-12 20:17 程程111 阅读(97) 评论(0) 推荐(0) 编辑
摘要: #创建表 CREATE TABLE table_name (column_name int) CREATE TABLE IF NOT EXISTS `runoob_tbl`( `runoob_id` INT UNSIGNED AUTO_INCREMENT, `runoob_title` VARCHA 阅读全文
posted @ 2020-08-12 19:16 程程111 阅读(78) 评论(0) 推荐(0) 编辑