jmeter连接redis取数据
1、导入fastjson-1.2.2.jar、jedis-2.2.1.jar到 jmeter\lib\ext\ 下 2、新建BeanShell Sampler import com.alibaba.fastjson.JSON; import redis.clients.jedis.Jedis; im ...
Ant Jmeter Jenkins生成html测试报告
Ant配置1、 将jmeter安装目录或者源码目录下\apache-jmeter-3.1\extras的ant-jmeter-1.1.1.jar复制到ant安装目录下apache-ant-1.10.3\lib 2、在Ant安装目录下新建build.xml文件,参考如下文件内容修改: <?xml ve ...
jenkins通过API触发构建任务
添加一个可变参数 配置token 参数用 ${参数名称} 引用 外部调用url地址:ip:port/view/视图名称/job/任务名称/buildWithParameters?token=test&type=test&name=test&version_name=test&version_code ...
python日志模块配置
import logging logging.basicConfig(filename= 'out.log',filemode= 'w+', level= logging.DEBUG, format= '%(asctime)s - %(levelname)s - %(message)s') file ...
python连接websocket wss
def websocket_wss(): try: wss = create_connection(wss_url, timeout=10) if wss.status == 101: wss.send(data) print(ws.recv()) except BaseException as m ...
python格式化输出当前时间
import time def get_now_time(): now_time = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())) return now_time ...
python基础
列表 # list.append():在末尾追加新的元素值 list1 = [1, 2, 3, 4] list1.append(5) print(list1) # list.extend():在末尾追加另一个列表 list2 = [1, 2, 3, 4] list2.extend([5, 6, 7] ...
threading线程
import threading # 线程模块 def function(num): pass thread_1 = threading.Thread(target=function, args=(1,)) # 创建线程 thread_1.start() # 启动线程 thread_1.getNam ...
pytest allure 生成html测试报告
前提:需要 java 1.8 以上、python3环境 一、下载pytest pip install pytest 二、下载Allure Pytest Adaptor插件 pip install pytest-allure-adaptor 三、下载allure压缩包 地址:https://githu ...
python django 简单接口测试页面
项目创建订单只能是接口创建的,之前都是用jar包放到jmeter里调用下单,给产品或者运维用不太方便,就想用django写一个带前端界面的下单web程序 项目结构 代码,比较渣 # coding=utf-8 from django.shortcuts import render from confi ...
python sha256 键值对参数格式接口测试
# coding=utf-8 import requests import time import uuid import hashlib import hmac import random import urllib3 import threading from config import rea ...
linux搭建jenkins持续基础
一、环境搭建 注:以下操作都是在 /home/deploy/ 路径下 1、Java 下载:wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oracle ...