Python 如何在postman中发送多个GET请求?

Python 如何在postman中发送多个GET请求?,python,json,postman,Python,Json,Postman,我的目的是在一次调用中发送多个请求时检查GET call的行为。 比如说 获取https://{IP}:8181/restconf/ 获取https://{IP}:8181/restconf/data 我想一次发送两个请求,这样我就可以获得两个请求的body参数。Postman没有任何并行请求功能。可能会有帮助,但请求是按顺序发生的 收集运行程序允许您按指定的顺序运行请求集。收集运行程序将记录您的请求测试结果,您的脚本可以在请求之间传递数据以及更改请求工作流 检查此项。纽曼命令行实用程序不是为并

我的目的是在一次调用中发送多个请求时检查GET call的行为。 比如说

  • 获取https://{IP}:8181/restconf/
  • 获取https://{IP}:8181/restconf/data

  • 我想一次发送两个请求,这样我就可以获得两个请求的body参数。

    Postman没有任何并行请求功能。可能会有帮助,但请求是按顺序发生的

    收集运行程序允许您按指定的顺序运行请求集。收集运行程序将记录您的请求测试结果,您的脚本可以在请求之间传递数据以及更改请求工作流


    检查此项。

    纽曼命令行实用程序不是为并行发送多个请求而设计的

    但您可以使用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文件,然后右键单击并使用run with powershell即可

    这将在多个cmd进程中执行newman


    您还可以将newmna用作nodejs库,并编写代码并行运行脚本

    Collection runner按顺序而不是并行执行请求。这是否回答了您的问题?