摘要: 前提: 安装:pip install pytest 一、pytest_常用运行参数 import pytest class TestClass: def test_01(self): print(1) assert True def test_02(self): print(2) assert 1 阅读全文
posted @ 2022-09-14 16:46 键上一指禅 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 一、allure下载及配置 1.allure下载网址:https://github.com/allure-framework/allure2/releases 2.下载zip后缀的文件,解压后可放任意位置 3.将bin路径配置到环境变量中 二、allure使用 1.安装:pip install al 阅读全文
posted @ 2022-09-14 16:15 键上一指禅 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 一、json取值封装模块 # -*- coding: UTF-8 -*- from logzero import logger def get_value(body, columns): if isinstance(body, dict): body = body try: if len(colum 阅读全文
posted @ 2022-09-14 16:04 键上一指禅 阅读(68) 评论(0) 推荐(0) 编辑
摘要: import yagmail import traceback from logzero import logger def send_mail(receiver=None, carbon_copy=None, subject=None, content=None, attachments_repo 阅读全文
posted @ 2022-09-14 15:28 键上一指禅 阅读(25) 评论(0) 推荐(0) 编辑
摘要: filename = 'test_Case001.xlsx' # 打开表 workbook = load_workbook(filename) # 获取excel中所有sheet名 worksheet_list = workbook.sheetnames # 根据sheet索引 定位表单 works 阅读全文
posted @ 2022-09-14 15:03 键上一指禅 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 一、准备配置文件 config.ini [section1] option1_1 = value1_1 option1_2 = value1_2 [section2] option2_1 = 123456 二、配置文件相关操作 import configparser import os # 创建实例 阅读全文
posted @ 2022-09-14 14:55 键上一指禅 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 一、元组(tuple) tuple_a = (1, 2, 3, 4, 5) # 1、index(元素):从tuple中找出某个值第一个匹配项的索引位置 res1 = tuple_a.index(1) # 2、count(元素):返回元素出现的次数 res2 = tuple_a.count(1) 二、 阅读全文
posted @ 2022-09-14 14:17 键上一指禅 阅读(69) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示