pytest config ini

基于 Python + Pytest + Allure 的UI自动化测试框架

一、框架目录结构概览 二、框架执行流程简介 三、框架目录结构简介 ......
框架 Python Pytest Allure

pytest + yaml 框架 -62.jenkins+allure+钉钉通知添加测试结果

前言 上一篇pytest + yaml 框架 -60.git+jenkins+allure+钉钉通知反馈 已经实现测试结果用钉钉通知。 本篇继续在钉钉通知里添加测试的汇总结果,此功能在pytest-yaml-yoyo v1.5.2版本上实现。 Environment Injector 插件 在运行完 ......
框架 jenkins 结果 pytest allure

pytest框架:marek用法

pytest中提供的makr标签: 主要用于在测试用例/测试类中给用例打上标记,实现测试分组的功能,对测试用例进行筛选。 注意:只能使用已注册的标记名,如果没有在pytest.ini文件中进行注册,会报waring警告信息。 如果没有注册的标签也想要使用,只是会有警告。我们可以加上“addopts ......
框架 pytest marek

VNC config

VNC config steps Vmware 安装 redhat 8.9 连接网络 subscription-manager register 注册 redhat账户 vi /etc/selinux/config, 设置SELINUX=disabled yum install tigervnc-s ......
config VNC

Jmeter46 配置元件,读取.properties,.ini, .txt 配置文件,为全局做自动化

配置元件主要是用与测试前的配置,将配置转换为变量设置到jmeter context中。 而jmeter默认并没有配置元件(.properties)读取器,但是由于jmeter是开源的,我们可以自己定义一个配置元件来读取配置文件。 插件下载地址:https://www.testautomationgu ......
全局 properties 元件 文件 Jmeter

Nginx 配置(Config)中遇到的错误(Error)

原文:https://ichochy.com/posts/software/20231125.html nginx location 正则错误写法 location 错误的写法 匹配请求目录地址 /555 server { location ~ ^/\d{2,3}$ { …… } } 分析正则 lo ......
错误 Config Nginx Error

spring xml配置文件之context:annotation-config

我们一般在含有Spring的项目中,可能会看到配置项中包含这个配置节点context:annotation-config。 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/sche ......

当你用neovim的mason插件管理lsp config,并且配置好bash的bashls后,却没有正常工作的解决方式

刚开始遇到这个情况我百思不得其解,检查了neovim checkhealth,以为是npm包管理的问题,然后删了下删了下 不但没有解决还把包管理整乱了…… 后来发现是我没仔细看bash-language-server这个包的官方文档。。。 以下是bash-language-server的官方仓库: ......
插件 方式 neovim config bashls

pytest框架中conftest.py的作用

conftest.py 是 pytest 框架中的一个特殊文件。它允许你为测试提供自定义的配置和钩子函数。以下是 conftest.py 的主要作用: 提供全局配置:你可以在 conftest.py 中定义全局的配置,然后在多个测试文件中重用这些配置。定义钩子函数:钩子函数是 pytest 的一个重 ......
框架 conftest 作用 pytest py

pytest框架学习-pytest_addoption钩子函数

适用场景:一套自动化代码,多套环境。 pytest_addoption 允许用户自定义注册一个命令行参数,方便用户通过命令行参数的形式给 pytest 传递不同的参数进行不同测试场景的切换。 pytest_addoption 钩子函数一般和内置 fixture pytestconfig 配合使用, ......

UBUNTU 18.04.6 在编译LINUX内核的时候执行MAKE ARCH=ARM SOCFPGA_DEFCONFIG提示Can't find default configuration "arch/x86/configs/socfpga_defconfig"

Intel 针对 SoC FPGA 芯片 提供的Linux 源码中已经提供好了一个名为socfpga_defconfig 的配置文件,我们对内核的配置和修改,建议基于此配置文件进行,因此在进行配置前,需要先将该配置文件导入到默认配置文件.config中,操作方法很简单。 在终端输入make ARCH ......

php.ini文件与php.d

`php.ini` 是 PHP 的主要配置文件,用于全局配置 PHP 的行为和功能。它包含了许多 PHP 的核心设置,如内存限制、错误报告级别、扩展加载等。 `php.ini` 文件通常位于 PHP 的安装目录下。而 `php.d` 文件夹中的配置文件是用于对特定的 PHP 扩展或模块进行个别配置的 ......
php 文件 ini

pytest 如何测试函数中抛出的异常

一般Python中异常可以用 raise 来抛出,此时单测中想要测试错误用例是否触发异常了,可以用pytest中的 with pytest.raises(xxx) 如下: import pytest import unittest class Info(object): """info class" ......
函数 pytest

pytest 运行出现collected 0 items

.py文件是否修改过名字,文件写好后,修改文件名的话,后续的代码无法记录到此文件中,可能导致collected 0 items 解决方法:重新新建文件拷贝一下,即可解决 ......
collected pytest items

pytest + yaml 框架 -60.git+jenkins+allure+钉钉通知反馈

前言 当我们自动化用例写完后,接下来就是如何运行用例,生成报告以及反馈通知了。 如果你们公司已经有jenkins了,那么直接集成到jenkins上构建你的自动化任务是非常方便的。 用例上传git仓库 第一步,将写好的自动化用例,上传到本公司的git仓库。 jenkins 自动拉取仓库代码 在jenk ......
框架 jenkins pytest allure yaml

My swaywm config

cp -r /etc/sway .config/sway # Default config for sway # # Copy this to ~/.config/sway/config and edit it to your liking. # # Read `man 5 sway` for a ......
swaywm config My

vue3 vite.config.ts 如何增加构建时间,并展示在index.html里面

首先需要安装vite-plugin-html插件 在vite.config.ts文件中增加如下代码: plugins: [ createHtmlPlugin({ minify: true, pages: [ { template: 'index.html', filename: 'index.htm ......
时间 config index vue3 vite

pytest + yaml 框架 -59.用例失败重跑机制pytest-rerunfailures

前言 有些接口可能不太稳定,第一次跑的时候由于网络原因或者其它原因失败,但是重新跑2次又成功了。 对于这种需要重新跑几次的场景,可以使用用例失败重跑机制,需安装pytest-rerunfailures 插件。 场景示例 失败重跑需要依赖 pytest-rerunfailures 插件,使用 pip ......

ModuleNotFoundError: No module named '_pytest.resultlog'

新环境运行Python时报错 ModuleNotFoundError: No module named '_pytest.resultlog' 上网查,看到解决方法 https://www.cnblogs.com/QiKa/p/14457269.html 解决办法:①升级pytest-rerunfa ......

rust cargo config一个方便的功能

cargo 除了默认的cargo.toml 文件之外,我们还可以进行一些额外的配置,可以用来干一些比较有意思的事情 比如.cargo/config.toml 文件就比较方便,当我们在基于rust 开发webassembly的时候是需要执行target的 为了兼容选择的是wasm32-unknown- ......
功能 config cargo rust

.net DI + option 强类型管理config

选项方式读取配置 推荐使用选项方式读取,和DI结合更好,且更好利用"reloadonchange”机制。 NuGet安装:Microsoft.Extensions.Options、Microsoft.Extensions.Configuration.Binder,当然也需要Microsoft.Ext ......
类型 config option net DI

pytest框架学习-fixture

一、fixture是什么 被@pytest.fixture()装饰器装饰的函数就是一个fixture,fixture可以灵活的为不同范围的测试用例提供前置和后置操作,以及向测试用例传递测试数据。 二、fixture定义 @pytest.fixture(scope=“function”,params= ......
框架 fixture pytest

pytest+allure+jekins+gitee自动化集成配置

Jenkins下载Allure插件,然后创建一个demo,进入该demo的配置中: 预处理文件夹和后面Allure配置的Path是要对应的,两个都是相对路径,在Tomcat\webapp\jenkins\workspace\xxxdemo路径下,这个路径是创建demo后生成的,git上拉下来的代码和 ......
pytest allure jekins gitee

记Redux下载后,运行examples/todos时,报错Error: error:0308010C:digital envelope routines::unsupported 和 Failed to load config "react-app" to extend from.

1、Redux 下载 下载地址 git clone https://github.com/reactjs/redux.git 进入examples/todos,下载依赖: npm install 2、问题复现及解决 执行命令 npm run start 此时终端报错: Error: error:03 ......
quot unsupported react-app 0308010C examples

Python报错:pkg-config could not find libraries ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample']

参考: https://github.com/PyAV-Org/PyAV/issues/238 https://pyav.org/docs/6.1.2/installation.html#mac-os-x 报错信息: C:\Users\liuxue>pip install av Collecting ......
39 pkg-config swresample libraries avformat

pkg-config使用指南

pkg-config使用指南 简述 ubuntu等linux系统的一个包配置, 管理工具。 通常的使用场景是, 可以通过该命令获取相关包的配置。例如头文件包含路径和库链接路径。 用法 pkg-config --list-all # show all system libs pkg-config -- ......
使用指南 pkg-config 指南 config pkg

Pytest:Fixture参数

Fixture作用域之scope 用于控制Fixture的作用范围,作用类似于Pytest的setup/teardownscope参数可以是session, module,class,function,默认为function,作用范围顺序:session》module》class》function ......
参数 Fixture Pytest

Pytest:Fixture调用

fixture的优势 fixture是在测试函数运行前后,由pytest执行的外壳函数。fixture中的代码可以定制,满足多变的测试需求,包括定义传入测试中的数据集,配置测试前系统的初始状态,为批量测试提供数据源,等等。命名方式灵活,不局限于 setup 和teardown 这几个命名 fixtu ......
Fixture Pytest

如何用Pytest做性能测试?5个步骤轻松学会!

Pytest其实也是可以做性能测试或者基准测试的。是非常方便的。 可以考虑使用Pytest-benchmark类库进行。 安装pytest-benchmark 首先,确保已经安装了pytest和pytest-benchmark插件。可以使用以下命令安装插件: pip install pytest p ......
步骤 性能 Pytest

yaml/json/ini 配置读取

ConfigParser 安装 ConfigParser 是解析配置文件的第三方库,须要安装 pip install ConfigParser pip install ConfigParser ConfigParser 介绍 ConfigParser是用来读取配置文件(能够是.conf,txt,in ......
yaml json ini