postman - 有没有办法在邮递员中同时并行运行多个请求?
问题描述
我想检查接收服务器是否可以一次处理发送给它的多个请求。
解决方案
newman 命令行实用程序不是为并行发送多个请求而设计的,
但您可以使用 powershell尝试多次运行集合。
$TargetPath=".\newman"
if (test-path ".\newman") {Remove-Item -r $TargetPath -Force}
New-Item -ItemType "directory" -path ".\newman\reports"
New-Item -ItemType "directory" -path ".\newman\logs"
For ($i=0; $i -le 10; $i++) {
$TestNewmanArgs="a.json -r cli,htmlextra --reporter-htmlextra-export newman\report-$i.html"
$argz="run $TestNewmanArgs -k
"$i"
Start-Process -FilePath "C:\Roaming\npm\newman" -ArgumentList $argz -PassThru
}
只需将其存储为 ps 文件,然后右键单击并使用 powershell 运行
这将在多个 cmd 进程中执行 newman
您还可以将 newmna 用作 nodejs 库并编写代码以并行运行脚本
推荐阅读
- python - Pandas 在不同大小的行中求和值
- node.js - 没有从 getIdToken() 获取令牌,但是当我显示文档数据时,它显示 accessToken
- scmmanager - 服务器 2012 上的 scm-manager Windows 服务
- html - Bootstrap 4 较低的屏幕尺寸排序
- c - How do I make my C program count more than just one character?
- flutter - Flutter, not sure how to implement a PageRouteBuilder(), when using a WidgetBuilder to configure my routes
- asp.net - 在 ASP.NET 4.8 和 ASP.NET Core 3.1 之间共享身份验证 cookie
- javascript - 这用于对数组进行排序是如何工作的?
- kubernetes - Kubernetes:无法连接到服务器:net/http:TLS 握手超时
- laravel - 为什么模型内部的 $this->id 返回 null?