随笔分类 -  性能测试

摘要:# coding:utf-8from locust import task, HttpUser, betweenimport osclass WebUser(HttpUser): # 任务集 用户行为脚本 wait_time = between(0, 0) #(思考时间) @task() # 权重 阅读全文
posted @ 2020-08-25 15:22 爱我所爱-333 阅读(323) 评论(0) 推荐(0)
摘要:from locust import Locust, TaskSet, task, between, eventsfrom gevent import monkeyfrom websocket import create_connectionimport randomimport stringimp 阅读全文
posted @ 2020-03-09 16:24 爱我所爱-333 阅读(1657) 评论(0) 推荐(0)
摘要:from locust import HttpLocust, TaskSet, task, betweenimport queueimport xlrdclass Login(TaskSet): @task def index(self): try: global data_result data_ 阅读全文
posted @ 2020-03-09 16:16 爱我所爱-333 阅读(631) 评论(0) 推荐(0)
摘要:1. linux环境安装 安装依赖组件: (1) yum install -y gcc (2) yum -y install zlib* (3) yum install libffi-devel 2. 查看当前python版本号 (1) python --version 当前为2.7,我们升级比较新 阅读全文
posted @ 2020-01-06 15:41 爱我所爱-333 阅读(1783) 评论(0) 推荐(0)
摘要:windows7 机器最大连接数: 1. Win+R运行regedit; 2. 找到HKEY_LOCAL_MACHINESYSTEM\CurrentControlSet\Services\Tcpip\Parameters; 3. 在右侧面板中找到EnableConnectionRateLimitin 阅读全文
posted @ 2019-12-25 15:32 爱我所爱-333 阅读(969) 评论(0) 推荐(0)
摘要:from threadpool import ThreadPool, makeRequestsfrom sseclient import SSEClientimport timedef connect(a): time.sleep(a % 1) # sse长连接请求结果,将实时打印返回的数据响应 m 阅读全文
posted @ 2019-12-25 14:58 爱我所爱-333 阅读(1762) 评论(0) 推荐(0)
摘要:记录一下做压力测试过程中,需要用到参数化(获取数据库满足条件的记录并将结果写入到text中)我这次用到二个接口参数化则用了unittest:# -*- coding:utf-8 -*-import unittestimport pymysqlclass Content(unittest.TestCa 阅读全文
posted @ 2019-12-04 14:19 爱我所爱-333 阅读(1282) 评论(0) 推荐(0)
摘要:1. 启动 在安装目录bin下以管理员身份运行jmeter.bat,启动jmeter 2. 测试计划: 默认启动jmeter时会加载一个测试引计划模板,修改名称为Baitest,点击保存,选择保存路径,后面的步骤,每次添加或修改了了一些选项,软件并不会自动保存到jmx文件中,所以进行测试后,如果需要 阅读全文
posted @ 2019-09-24 16:45 爱我所爱-333 阅读(181) 评论(0) 推荐(0)