password
查看人数
type
Post
status
Published
date
Nov 6, 2023
slug
08e655e1-45a6-48c0-8a3d-10977f6a08da
summary
locust 脚本自动生成,使用Python进行网络请求并解析返回数据包括生成指定路径的locust文件,使用json模块转换数据格式,使用uncurl库解析curl命令为requests代码,以及实例化MyUser类并设置等待时间。
category
技术分享
icon
tags
locust
Python
作者
状态
待发布
json请求数据动态生成locust 脚本
curl转locust脚本
locust的HTML测试报告生成
from locust.html import get_html_report #方法的位置
res=get_html_report(env) with open(‘report.html’, ‘w’) as f: f.write(res)
根据不同的系统杀locust
杀掉所有在运行的locust进程:ps -ef |grep locust|grep -v grep | awk ‘{print $2}’ | xargs kill -9
win: taskkill /f /IM locust.exe
判断系统
有关使用上的问题,欢迎您在底部评论区留言,一起交流~
- 作者:躁静有徒
- 链接:https://zaojingyoutu.top//article/08e655e1-45a6-48c0-8a3d-10977f6a08da
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。
相关文章
